ScholarQuill logoScholarQuillUniversity Notes
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
Study Tools
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
Contact
ScholarQuill logo
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
ScholarQuill logoScholarQuillUniversity Notes
Study PortalCC-215Entity Sets
Ctrl + K
Login
Explore
Search
Semester
Papers
CGPA
    CC-215

    Database Systems

    Progress0 / 34 done
    Topics34
    1Basic Database Concepts2Database Approach vs File Based System3Database Architecture4Three Level Schema Architecture5Data Independence6Relational Data Model7Attributes8Schemas9Tuples10Domains11Relation Instances12Keys of Relations13Integrity Constraints14Relational Algebra15Selection in Relational Algebra16Projection in Relational Algebra17Cartesian Product in Relational Algebra18Types of Joins19Normalization20Functional Dependencies21Normal Forms22Entity-Relationship Model23Entity Sets24Attributes in Entity-Relationship Model25Relationship in Entity-Relationship Model26Entity-Relationship Diagrams27Structured Query Language (SQL)28Joins in SQL29Sub-Queries in SQL30Grouping and Aggregation in SQL31Concurrency Control32Database Backup and Recovery33Indexes34NoSQL Systems
    5 min read
    Topic 23 of 34
    Topic Study Note Illustration
    23

    Entity Sets

    An Entity Set is a collection of similar entities in a database. In the Entity-Relationship (ER) Model , an entity represents a real-world object or concept, while...

    Entity Sets in the Entity-Relationship (ER) Model

    An Entity Set is a collection of similar entities in a database. In the Entity-Relationship (ER) Model, an entity represents a real-world object or concept, while an entity set is a set of entities that share the same properties (attributes) but may represent different instances of that object or concept.

    In simpler terms, an entity set is a collection or group of entities that are described by the same set of attributes. Each entity in the set represents an individual instance of the object or concept the entity set models.


    Key Characteristics of Entity Sets

    1. Collection of Entities: An entity set consists of multiple entities of the same type. Each entity within the set is an individual instance or occurrence of the entity.

    2. Attributes: All entities in an entity set share the same set of attributes, although the values of those attributes differ between individual entities.

    3. Uniqueness: Each entity in an entity set is uniquely identifiable by a primary key or a set of attributes that collectively form a unique identifier.

    4. Entity Set vs. Entity: An entity refers to a single object (e.g., a specific person or item), whereas an entity set refers to the collection of all similar entities (e.g., all people or all products). For example, the "Student" entity set might contain entities like Alice, Bob, and Charlie, each with specific attributes (StudentID, Name, etc.).


    Example of an Entity Set

    Let’s consider a simple example of a Student entity set. The Student entity set may include individual entities such as:

    StudentID Name Age Address
    101 Alice 20 123 Main St.
    102 Bob 22 456 Elm St.
    103 Charlie 21 789 Oak St.

    Here, the Student entity set is a collection of all students, and each student is an instance of the Student entity. The Student entity set contains the attributes StudentID, Name, Age, and Address, but the values for these attributes will vary for each student.


    Representation of an Entity Set in ER Diagrams

    • Entity Set Representation: In ER diagrams, an entity set is represented by a rectangle. The name of the entity set is written inside the rectangle.
    • Attributes: Attributes associated with the entity set are represented by ovals connected to the entity set rectangle. If an attribute is a primary key, it is typically underlined.
    • Entity Instances: The actual data instances are not shown directly in the ER diagram, but in practice, each entity instance represents a row in the table corresponding to the entity set.

    Types of Entity Sets

    1. Strong (Regular) Entity Sets:

      • A strong entity set is an entity set that can be uniquely identified by its own attributes alone, without needing any reference to other entity sets. It typically has a primary key that uniquely identifies each entity instance.
      • Example: A Student entity set is a strong entity set, where StudentID uniquely identifies each student.
    2. Weak Entity Sets:

      • A weak entity set is an entity set that cannot be uniquely identified by its own attributes alone. It depends on a strong (owner) entity set for identification and uses a partial key in conjunction with the strong entity's key to form a unique identifier.
      • Example: A Dependent entity set might represent the children or relatives of employees. The Dependent entity cannot be uniquely identified without referencing the Employee entity, making it a weak entity.

    Key Points on Entity Sets

    • Identifying Attribute(s): The attribute(s) that uniquely identify each entity in an entity set are known as the primary key. In the Student entity set, StudentID could be the primary key.

    • Instances of an Entity Set: Each entity in an entity set is an instance that represents a specific occurrence of the entity. For example, "Alice" is an instance of the Student entity set.

    • Entity Set Cardinality: The cardinality of an entity set refers to the number of instances of that entity set. It can range from zero (no instances) to many (any number of instances). The cardinality can change over time as data is added or deleted.


    Entity Set Example in a University System

    Consider a University Database where we have the following entity sets:

    1. Student:

      • Attributes: StudentID, Name, Age, Major, Email
      • Primary Key: StudentID
    2. Course:

      • Attributes: CourseID, CourseName, Credits
      • Primary Key: CourseID
    3. Instructor:

      • Attributes: InstructorID, Name, Email
      • Primary Key: InstructorID
    4. Department:

      • Attributes: DepartmentID, DepartmentName, Building
      • Primary Key: DepartmentID

    Relationship Between Entity Sets

    Entity sets are often related to one another in the ER model. These relationships are represented as diamonds and connect the respective entity sets. For instance:

    • A Student can be enrolled in multiple Courses. This is a many-to-many relationship between the Student entity set and the Course entity set.
    • An Instructor teaches multiple Courses, which is a one-to-many relationship between the Instructor entity set and the Course entity set.

    Conclusion

    An entity set is a fundamental concept in the ER model. It represents a collection of similar entities and forms the basis for designing a database schema. Understanding entity sets is key to properly structuring the data and establishing relationships between the data elements in the database design process.

    ← Previous topic 22
    Entity-Relationship Model
    Next topic 24 →
    Attributes in Entity-Relationship Model

    Past Papers

    Open this section to view and download past papers

    Click on Show Past Papers to load available exam papers.

    Reading Progress
    0%
    5mremaining
    894words
    Beginnerlevel
    On This Page

    No headings found

    Study Toolkit

    Subject Portal

    Database Systems