BCA-C104-SM04
BCA-C104-SM04
Purpose of ERD
Components of an ER Diagrams
1. Entity
Entity Set
1. Key attribute
2. Composite attribute
3. Single-valued attribute
4. Multi-valued attribute
5. Derived attribute
The term "cardinality" refers to the number of entities in one entity set
that, via a relationship set, can be related to the number of entities in
other sets.
Types of Cardinalities
1. One to One: One entity from entity set A can only contain one
entity from entity set B, and the other way around. Let's assume
that each student has a single student ID that is only ever
assigned to them. Thus, there will be a one-to-one relationship.
3. Many to One: While one entity from entity set B can be linked to
several entities from entity set A, more than one entity from entity set
A can only be linked to one entity from entity set B. For instance,
while numerous students can attend one institution, only one student
can attend multiple universities at once.
Using Sets, it can be represented as:
Book Entity: The author, ISBN, title, edition, category, and price
are all listed. The primary key for a book entity is its ISBN.
Reader Entity: UserId, Email, Address, Phone, and Name are
included. Firstname and lastname are combined to form the
attribute name. Multi-valued phone number attribute. The primary
key for the Readers entity is UserId.
Publisher Entity: Name, PublisherId, and Year of Publication are
present. The primary key is PublisherID.
Authentication System Entity: It has a password and LoginId
with LoginID acting as the Primary Key.
Reports Entity: There are UserId, Registration, Book, and
Issue/Return dates. The primary key of the reports entity is
Reg_no.
Staff Entity: Name and staff_id are present, with staff_id serving
as the Primary Key.
Reserve/Return Relationship Set: The three characteristics are
the Reserve Date, Due Date, and Return Date.