ER Diagram Practice Task 1
ER Diagram Practice Task 1
In Toggi Fun World management system a customer may buy tickets. One ticket may be brought by
exactly one customer. A customer is identified by a customer ID. The system also stores customers
name, phone, Email, and address. A customer address is composed of house number, street name and
city. A ticket is identified by ticket number. Ticket type, ticket date and time are also stored. There may
be multiple types of ticket. A ticket is sold by a ticket salesman. A ticket salesman may sales many
tickets. To identify a salesman the system stores salesman ID, salesman name, salesman phone along
with salesman Email. A ticket belongs to exactly one category and for a category there must be at least
one ticket. Each category has a name, and the unique property of each category is a category number.
Case 2:
We wishes to build a database to store and manage information about our apartment
management.Every information of the building will be stored in the database .There will be a building
and it will have location,name,units,house no,floors which will be stored in the database.A building can
have an unit or many. Admins of the building will mange the whole system of the building . A building
may have many admin or an admin can manage many buildings. Name of the admin,contact no, email
address,owner key will be stored in the database. Building may have many guards or not.A guard can
works in one or many buildings .He will have name,Schedule,payment status,contact information which
will be stored.Every unit has a unique room number and particular type.Unit has Internet bill,Electricity
bill,billing id water bill which will be stored in the database.A unit can has many bills or not.The Units
needs service.The name,service date,payment status,contact number,type,servant id of service
provider will be stored.Buyers buys the unit.A buyer can buy one or many unit.Units may have many
buyer. Name,room number,occupied status,contact,Authentication documents of buyers will be
recorded in the database.Renters rents unit.A renter can rent many units or a unit may not have any
renter. Renters will have name,room number,contact,payment status,Due,national id,police verification
status and all of this information will be stored.Renters and buyers will have a user account having the
information of their user id card,name,complain,contact no,Date of birth etc which will be stored.A
buyer and a renter can have an user account or not.The building will have a garage for vehicles. A
building can have maximum one garage or not.This garage will have the information of vehicle
type,model no, owner, status and these will be recorded.
Case 3:
In a small Jewelry Shop Management System, the customer with their properties customer's id, name,
phone, address, and mail can check the jewelry items available in the shop and select the product of
their choice. A customer is permitted to check more than one jewelry item at a time, and an available
item also can be checked by more than one customer. The jewelry items have some characteristics, such
as item id, name, price, and category. Customers may keep adding one or more jewelry items to the cart
until the end of the product selection cycle. An item may not be added to a particular customer's cart
more than once but a particular cart could have more items. The cart can have properties like cart id,
item quantity, and total cost depending on items, and their quantity. After adding all the desired
products to the cart, it is up to the customer to confirm the order or not. If the customers would like to
buy the jewelry items added to the cart, the items on the cart go once to order details with their
confirmation. A customer has the right to confirm multiple orders at the same time, but a specific order
in the order details by its properties order id, customized color, customized shape, subtotal cost
depending on the cart, shipping cost, total payable amount, and order date can be confirmed by only
one customer. The jewelry items available in the shop are divided into different categories. A category
can contain one or more items but a given item can never be in more than one category.
Case 4:
Consider the following information about a university database: Professors have an SSN, a name, an age,
a rank, and a research specialty. Projects have a project number, a sponsor name (e.g., NSF), a starting
date, an ending date, and a budget. Graduate students have an SSN, a name, an age, and a degree
program (e.g., M.S. or Ph.D.).Each project is managed by one professor (known as the project’s principal
investigator).Each project is worked on by one or more professors (known as the project’s co-
investigators).Professors can manage and/or work on multiple projects. Each project is worked on by
one or more graduate students (known as the project’s research assistants).When graduate students
work on a project, a professor must supervise their work on the project. Graduate students can work on
multiple projects, in which case they will have a (potentially different) supervisor for each one.
Departments have a department number, a department name, and a main office. Departments have a
professor (known as the chairman) who runs the department. Professors’ work in one or more
departments and for each department that they work in, a time percentage is associated with their job.
Graduate students have one major department in which they are working on their degree. Each
graduate student has another, more senior graduate student (known as a student advisor) who advises
him or her on what courses to take.
Case 5:
A library management system project is related to the storage of information regarding the library. A
library is identified by id, name, and address, have phone number for contact. The library admin has full
control over the entire system. An admin has unique id, name, phone, role, address. He can add new
employee and member. Admin can assign access right to different users. A member is identified by
member name, member id, address, phone number. A member address is composed of house number,
street name and city. Employee of the library maintain book details of the library. They can issue or
receive books from library member. Each employee has unique id, name, and designation. Each book
has unique book id, book name, ISBN no, edition no. A book is written by at least one author. An author
may write many books but the system stores information of those authors of who has written at least
one book stored in the library. To identify an author the system stores author ID, name along with
subject. Each vendor has unique id, vendor name, vendor phone. Books are supplied by suppliers.
Suppliers have name, id and address. Similarly, each publisher also has unique publisher id, name and
country. A book belongs to exactly one category and for a category there must be at least one book.
Each category has a name and the unique property of each category is a category number. For better
database handling we have used ids in the database for any transaction. Such as at the time of book
issue/receive we store book id in the database instead of book name and similarly instead of member
name we store member id. The entire system has several checks to avoid mismanagement. Any
employee cannot again issue a book which is already issued to someone. There is a check that prevents
it from doing so.