0% found this document useful (0 votes)
45 views

DBMS LAB Assign. 1

The document contains details of a student named Deep Patoliya including their personal registration number and class for a database management systems lab assignment. The assignment includes questions on entity relationship diagrams and their conversion to relational schemas. Sample relational schemas are provided for three implementation scenarios: a car rental management system, a library management system, and an online grocery ordering system.

Uploaded by

Deep Patoliya
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

DBMS LAB Assign. 1

The document contains details of a student named Deep Patoliya including their personal registration number and class for a database management systems lab assignment. The assignment includes questions on entity relationship diagrams and their conversion to relational schemas. Sample relational schemas are provided for three implementation scenarios: a car rental management system, a library management system, and an online grocery ordering system.

Uploaded by

Deep Patoliya
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Name: Deep Patoliya

PRN: 19070122124
Class: CS - B3

DBMS LAB
ASSIGNMENT -1

Q1) What are ER Diagrams? What is their significance in DBMS?


Ans)
ER Diagram stands for Entity Relationship Diagram, also known as ERD is a
diagram that displays the relationship of entity sets stored in a database. In
other words, ER diagrams help to explain the logical structure of databases. ER
diagrams are created based on three basic concepts: entities, attributes and
relationships. ER Diagrams contain different symbols that use rectangles to
represent entities, ovals to define attributes and diamond shapes to represent
relationships.

Q2) Explain the conversion process from ER to Relational?


Ans)
 For each strong entity set create a new relational independent table that
includes all attributes as column. For composite attribute include only
component attributes.

 Convert every weak entity set into a table where we take the
discrimination attribute of the weak entity set and takes the primary key
of the strong entity set as a foreign key and then declared the
combination of discriminator attribute and foreign key as a primary key.
 For a 1:1 Relationship between two entities S and T. Choose one of the
relations, Example - S and include as foreign key in S the primary key of
T. It is better to choose on entity total participation on S and include
descriptive attribute.
 For 1:N relationship identify the entity on S and N side of the
relationship. Include a foreign key in S the Primary key of relation T also
include Discipline attributes of 1:N attribute of S.

 For each M:N relationship create a new relational table include in the
new relation ,the primary key of the participating entities as a well as
descriptive attributes. The primary key of the table will be the
combination of primary keys of participating entities.

 For every multi-valued attribute will make a new table where we will
take primary key of main table as a foreign key and multi-valued
attribute as a primary key.

IMPLEMENTATION QUESTIONS:

1) CAR RENTAL MANAGEMENT:


RELATIONAL SCHEMA:
Company (Company_ID, Name)
Branch (Branch_code, Name, City, Company_ID)
Employee (Employee_ID, Name, Email, D.O.B, Branch_code)
Employee_phone_no. (Employee_ID, Phone_no.)
Customer (Customer_ID, First_name, Last_name, City, Email)
Customer_phone_no. (Customer_ID, Phone_no.)
Rental_details (Rental_ID, From, To, Car_type, Address, Customer_ID,
Company_ID)
Car (Car_no., Model, Brand, Type, Company_ID, Manufacturer_ID)
Manufacturer (Manufacturer_ID, Name, Address)
Maintenance (Maintenance_ID, Car_no., Date, Car_no.)
Payment (Billing_ID, Discount, Total_amount, Mode, Days, Customer_ID,
Employee_ID)
2) SIU LIBRARY MANAGEMENT SYSTEM:

RELATIONAL SCHEMA:
Library (Library_ID, Institute_name, Seller_ID)
Members (Member_ID, Fine, PRN, Year, Library_ID)
Members_Books_issued (Member_ID, Books issued)
Members_Books_returned (Member_ID, Books returned)
Books (ISBN, Price, Title, Category, Publisher_ID, Member_ID, Author_ID)
Publisher (Publisher_ID, Name, Seller_ID)
Author (Author_ID, Name)
Seller (Seller_ID, Book_stock, Name, Library_ID, Publisher_ID)
3) ONLINE GROCERY ORDERING SYSTEM:

RELATIONAL SCHEMA:
Customer (Customer_ID, Name, Address, Email, Domain)
Online Store (Domain, Name, Customer_ID)
Items (Item_ID, Name, Price, Domain, Company name, Cart_ID)
Company (Company name)
Shopping Cart (Cart_ID, Item_ID, No, of Items, Amount)
Payment (Credit Card no., OTP Verification, Expiry, Total Amount, CVV)

You might also like