[go: up one dir, main page]

0% found this document useful (0 votes)
0 views10 pages

DBMS EXP1.docx

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 10

Vidyavardhini’s College of Engineering & Technology

Department of Computer Engineering


Academic Year: 2024-25

Experiment No.1
Identify the case study and detail statement of problem.
Design an Entity-Relationship (ER) / Extended Entity-
Relationship (EER) Model.
Date of Performance:2/1/2025
Date of Submission:19/2/2025
Aim: Identify the case study and detail statement of problem.
Design an Entity-Relationship (ER) / Extended Entity-Relationship (EER) Model.

Objective:
To show the relationships of entity sets attributes and relationships stored in a
database

Theory:

Summary of ER, EER Diagram Notation

Strong Entities

​ Weak Entities

Attributes

Multi Valued Attributes [Double Ellipse]

Composite Attributes

CSL402: Database Management System Lab


Relationships

​ Identifying Relationships

N-ary relationships

More than 2 participating entities

​ Constraints - Participation

.​ Total Participation - entity X has total participation in Relationship Z, meaning that


every instance of X takes part in AT LEAST one relationship. (i.e. there are no
members of X that do not participate in the relationship.

Example: X is Customer, Y is Product, and Z is a ‘Purchases’ relationship. The figure


below indicates the requirement that every customer purchases a product.

CSL402: Database Management System Lab


.​ Partial Participation - entity Y has partial participation in Relationship Z, meaning
that only some instances of Y take part in the relationship.
Example: X is Customer, Y is Product, and Z is a ‘Purchases’ relationship. The figure
below indicates the requirement that not every product is purchases by a customer.

Cardinality:

.​ 1:N – One Customer buys many products, each product is purchased by only one
customer.

N:1 - Each customer buys at most one product, each product can be purchased by many

customers.

1:1 – Each customer purchases at most one product, each product is purchased by only

one customer.

M:N – Each customer purchases many products, each product is purchased by many

customers.

Specialization/Generalization

.​ Each subclass inherits all relationships and attributes from the super-class.

CSL402: Database Management System Lab


Constraints on Specialization/Generalization

Total Specialization – Every member of the super-class must belong to at least one
subclass. For example, any book that is not a text book, or a novel can fit into the
“Other” category.

Partial Specialization – each member of the super-class may not belong to one of the
subclasses. For example, a book on poetry may be neither a text book, a novel or a
biography.

Disjointness Constraint

CSL402: Database Management System Lab


.​ Disjoint – every member of the super-class can belong to at most one of the
subclasses. For example, an Animal cannot be a lion and a horse, it must be either a
lion, a horse, or a dog.

Overlapping – every member of the super-class can belong to more than one of the
subclasses. For example, a book can be a text book, but also a poetry book at the same time.

Union – a subclass/super-class relationship can have more than one super-class, and the
subclass inherits from at most one of the super-classes (i.e. the subclass purchase will inherit
the relationships and attributes associated with either service or product, but not both). Each
super class may have different primary keys, or the same primary key. All members of the
super-classes are not members of the super-class. For example, a purchase can be a product,
or a service, but not both. And all products and services are not purchase

Implementation:

CSL402: Database Management System Lab


CSL402: Database Management System Lab
Conclusion:- Comment on Problem statement and design of given case study by identifying
ER/EER diagram notations.

To comment on the Problem Statement and Design of a case study using ER/EER diagram
notations, we focus on the following:

1. Problem Statement:

The problem defines the entities, their attributes, and the relationships between them. For
example:

●​ Entities: Customer, Order, Product


●​ Attributes: Customer has ID, Name, Email; Order has Order_ID, Date; Product has
Product_ID, Name, Price.
●​ Relationships: Customer places Order (1:M), Order contains Product (M:M).

2. ER/EER Diagram Notations:

●​ Entities: Rectangles (e.g., Customer, Product).

CSL402: Database Management System Lab


●​ Attributes: Ovals (e.g., Name, Date).
○​ Simple: Cannot be subdivided.
○​ Composite: Can be broken into smaller parts (e.g., Address).
○​ Derived: Can be computed (e.g., Age from Date of Birth).
●​ Primary Key: Underlined attribute (e.g., Customer_ID).
●​ Relationships: Diamonds (e.g., places, contains), with cardinality (1:1, 1:M, M:M).
●​ Weak Entities: Double rectangles.
●​ Generalization: Triangle for superclass-subclass relationships.
●​ Multi-valued Attributes: Double ovals.

Example Case Study:

For an online bookstore:

●​ Entities: Book, Author, Customer, Order.


●​ Relationships:
○​ Author writes Book (M:M),
○​ Customer places Order (1:M),
○​ Order contains Book (M:M).

ER Design:

●​ Entities: Rectangles (Book, Author, Customer, Order).


●​ Attributes: Ovals (e.g., ISBN for Book, Name for Author).
●​ Relationships: Diamonds (e.g., "writes" between Author and Book).

The ER/EER diagram should accurately reflect the system's entities, attributes, and
relationships, using appropriate notations for clarity and simplicity. More complex systems
might require EER elements like generalization or weak entities.

CSL402: Database Management System Lab


CSL402: Database Management System Lab

You might also like