Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
3 views5 pages

DBMS Assignment 1

Uploaded by

mogranemish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views5 pages

DBMS Assignment 1

Uploaded by

mogranemish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

DBMS ASSIGNMENT 1

Nemish Mogra
SY 11
Roll. No 25

AIM : Design an E-R diagram for a library management system to handle books, members, and
transactions.

Entities:

Book: Attributes include Book_ID, Title, Author, Publisher, Year_Published.

Member: Attributes include Member_ID, Name, Membership_Date, Address.

Transaction: Attributes include Transaction_ID, Issue_Date, Return_Date.

Relationships: Borrows: Links Members and Books with attributes Issue_Date and Return_Date

Exercises:

1) Draw an E-R diagram for an online retail store. The store sells products. Each product belongs to a
category, and a product can have multiple variations (like color or size). Customers place orders, and
each order can contain multiple products. Each customer can place multiple orders
Entities with Attributes

Product – Product_ID , Name, Price, Description

Category – Category_ID , Category_Name

Variation – Variation_ID , Color, Size, Stock

Customer – Customer_ID, Name, Email, Phone, Address

Order – Order_ID , Order_Date, Total_Amount, Status

Relations:

Customer to Order -> Places

Category to product -> Chooses

Category to variation -> Chooses

2) Draw an E-R diagram for a real estate agency. The agency lists properties for sale. Each property has an
owner, and each owner can own multiple properties. Buyers can express interest in multiple
properties. Each property can have multiple interested buyers. Agents facilitate the sale of properties

Entities with attributes


1. Property – Property_ID ,Address, Price, Type
2. Owner –Name, Contact, Address
3. Buyer –Name, Contact, Budget
4. Agent – Agent_ID , Name, Contact, Commission

Relationships:

Owner to property -> owns

Agent to Buyer -> sells

Buyer to owner -> Purchases

3) Construct an E-R diagram for a car-insurance company whose customers own one or more cars each.
Each car has associated with it zero to any number of recorded accidents.

Entities with attributes


1. Customer –Name, Address, Phone
2. Car –License_No, Model, Year
3. Accident –Date, Location, Description

Relationships:

Customer to car -> owns


Car to accident -> has
4) Explain different types of attributes with the help of notions used to represent it

Simple Attribute – Single oval → Cannot be divided further (e.g., Age).


Composite Attribute – Oval with sub-ovals → Can be split into parts (e.g., Name → First, Last).
Derived Attribute – Dashed oval → Obtained from other attributes (e.g., Age from DOB).
Multivalued Attribute – Double oval → Can have multiple values (e.g., Phone Numbers). Key
Attribute – Oval with underline → Uniquely identifies an entity (e.g., Student_ID).

FAQs

1. What are the advantages of DBMS over an additional file system?

Data Redundancy Control – Avoids duplicate data.


Data Consistency – Ensures accuracy across system.
Data Security – Provides access control & authentication.
Data Sharing – Multiple users can access simultaneously.
Backup & Recovery – Automatic recovery from failures.
Better Query Processing – SQL support for faster access.

2. Explain the terms table and record in a database.

Table – Collection of related data in rows & columns (like a spreadsheet).


Record – A single row in a table representing one entity instance.

3.Find out databases used for following applications.


Twitter – PostgreSQL, Manhattan (custom).
Facebook – MySQL, RocksDB.
Amazon / Flipkart – DynamoDB, Aurora, MySQL.
AADHAR Card – MySQL, MongoDB, Hadoop (for massive data).

You might also like