Entity
Last updated
Last updated
A definable thing - such as a person, object, concept or event, that can have data stored about it. Think of entities as nouns. Examples: a customer, student, car or product.
Organisation require information in order to carry out tasks and activities for which they are responsible. The information that these organisations need could be categorized in a number of ways, for example,
An entity may represent a category of people, things, events, locations or concepts within the area under consideration. An entity instance is a specific example of an entity. For example, Syed Jafer is an entity instance of an student entity.
Denoted with Rectangle.
A group of definable things, such as students. Examples include:
Student: A generic type representing all students.
Course: Represents all courses offered by the university.
Department: Represents academic departments.
Specific Entities
A specific student, e.g., John Doe, Student_ID: 12345.
A specific course, e.g., Calculus I, Course_ID: MATH101.
A specific department, e.g., Mathematics Department.
Represents an entity type at a specific point in time. Examples include:
Students enrolled in "Fall 2024" semester: This subset might include John Doe, Jane Smith, and Alice Brown.
Courses offered in "Spring 2025": Includes MATH101, ENG202, and CS301.
Departments active as of "2024": Includes Mathematics, Physics, and Computer Science.
Related Instances
Instance of Student: John Doe, enrolled in Spring 2024.
Instance of Course: MATH101, offered by the Mathematics Department.
🥁 For now, dont think about primary key, foreign key or something.
Strong Entity
Student: A strong entity because it can be uniquely identified using its own attributes like Student_ID.
Example attributes:
Student_ID (Primary Key)
Name
Date_of_Birth
Weak Entity
Dependent: A weak entity related to a student, such as a family member. It depends on the Student entity for identification. Even though it has a unique ID, Conceptually its dependant on student.
Example: Dependent_ID is meaningful only when associated with a specific Student_ID.
Associative Entity
Enrollment: An entity that associates Students and Courses.
Example attributes:
Enrollment_ID (Primary Key)
Student_ID (Foreign Key)
Course_ID (Foreign Key)
Semester
The Associative Entity is there to establish a Many to Many Relationship between Two or More Entities.
For Example, A Student can enroll in many courses. Also a course can be enrolled by many students. But we can't able to manage these details without an additional Entity (Table). This Entity is denoted as Associative Entity.
Also, Associative Entity, can contain additional values like duration in above example.
SHOULD BE:
• An object that will have many instances in the database
• An object that will be composed of multiple attributes
• An object that we are trying to model
SHOULD NOT BE:
• A user of the database system
• An output of the database system (e.g. a report)