0% found this document useful (0 votes)
2 views15 pages

Quizes

The document outlines the design requirements for various Entity-Relationship Diagrams (ERDs) for different systems including a University, Online Shopping Platform, Library Management, Hospital Management, Hotel Reservation, Social Media, School Management, Inventory Management, Banking, Movie Rental, Airline Reservation, Restaurant Ordering, Music Streaming, E-Learning, Supermarket Chain, and Human Resources System. Each ERD includes specific entities, attributes, and relationships that define how data is organized and related within each system. The requirements detail the cardinality and participation constraints for each entity and relationship.

Uploaded by

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

Quizes

The document outlines the design requirements for various Entity-Relationship Diagrams (ERDs) for different systems including a University, Online Shopping Platform, Library Management, Hospital Management, Hotel Reservation, Social Media, School Management, Inventory Management, Banking, Movie Rental, Airline Reservation, Restaurant Ordering, Music Streaming, E-Learning, Supermarket Chain, and Human Resources System. Each ERD includes specific entities, attributes, and relationships that define how data is organized and related within each system. The requirements detail the cardinality and participation constraints for each entity and relationship.

Uploaded by

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

Quiz 1.

1
Design an ERD for a University system that includes the
following:
1. Each student enrolled in the university has a (StudentID, Name
(FirstName, LastName), Date_Of_Birth, Major, GPA, and Age).
2. Each course offered by the university has a (CourseID, Title, Credits,
and Duration).
3. Each professor employed by the university has a (ProfessorID, Name,
Email, and Specializations).
4. Each department in the university has a (DepartmentID, Name,
Budget, and HeadOfDepartment (FirstName, LastName)).
5. A student may enroll in several courses, and a given course may have
several students enrolled in it. However, all students must be enrolled
in courses, while courses may have no students enrolled.
6. A professor may teach several courses, but a course may only be
taught by one professor. Professors must teach at least one course,
while a course may or may not have an assigned professor.
7. Each professor belongs to one department, and a department has
exactly one professor as its head. Both professors and departments
must be related to one another.

Quiz 1.2
Design an ERD for an Online Shopping Platform that includes the
following:
1. Each customer registered on the platform has a (CustomerID, Name,
Email, and Address (Street, City, ZIP), along with a PurchaseHistories).
2. Each order placed on the platform has an (OrderID, OrderDate,
ShippingDate, and TotalAmount).
3. Each product available on the platform has a (ProductID, Name, Price,
and StockQuantity).
4. Each payment made by a customer has a (PaymentID, PaymentDate,
PaymentAmount, and PaymentType).
5. A customer may place several orders, but an order must be placed by
one customer. Orders must exist, but customers may not have placed
any orders yet.
6. Each order may contain several products, and a product may be
contained in several orders. Both orders and products must participate
in this relationship.
7. Each customer makes exactly one payment for each order, and each
payment corresponds to one customer. Both customers and payments
must exist in this relationship.

Quiz 1.3
Design an ERD for a Library Management System that includes
the following:
1. Each book in the library has an (ISBN, Title, Pages, PublishedYear, and
CopiesAvailable).
2. Each author of books in the library has an (AuthorID, Name,
Nationality, and BirthYear (derived from current year)).
3. Each member registered in the library has a (MemberID, Name,
MembershipDate, ContactNumber, and BorrowingHistorieas).
4. Each category that has a (CategoryID, Name, and ParentCategory
(Subcategory, MainCategory)).
5. A member may borrow several books, and a book may be borrowed
by several members. Both members and books must participate in this
relationship.
6. An author may write several books, and a book may have multiple
authors. Not all authors have to write books, and not all books have to
be written by an author.
7. Each book must belong to one category, and a category may classify
multiple books. Categories can exist without classifying any books.
Quiz 1.4
Design an ERD for a Hospital Management System that includes
the following:
1. Each patient admitted to the hospital has a (PatientID, Name
(FirstName, LastName), Age, Address (Street, City), and
MedicalHistories).
2. Each doctor working in the hospital has a (DoctorID, Name,
Specialization, and YearsOfExperience).
3. Each appointment made by a patient has an (AppointmentID, Date,
Time, ReasonForVisit, and Prescription (MedicationName, Dosage)).
4. Each ward in the hospital has a (WardID, WardName, Capacity, and
NumberOfPatients).
5. A doctor may treat several patients, and a patient may be treated by
several doctors. All patients must have a doctor, but doctors may not
treat any patients.
6. A patient may schedule several appointments, but an appointment
must be scheduled by one patient. Appointments must exist, while
patients may not schedule any appointments.
7. A patient may be assigned to one ward, and a ward may
accommodate multiple patients. Wards must exist, but patients may
not be assigned to a ward.
Quiz 1.5
Design an ERD for a Hotel Reservation System that includes the
following:
1. Each guest at the hotel has a (GuestID, Name, Contact, Address
(Street, City, ZIP), and Preferences).
2. Each room in the hotel has a (RoomNumber, RoomType, RatePerNight,
and Availability).
3. Each reservation made by a guest has a (ReservationID, CheckInDate,
CheckOutDate, and TotalCost).
4. Each service offered by the hotel has a (ServiceID, ServiceName,
ServiceType, and Price).
5. A guest may book several reservations, but a reservation must be
booked by one guest. Reservations must exist, but guests may not
make any reservations.
6. A reservation may include multiple rooms, and a room may be
included in multiple reservations. Rooms must be included in
reservations, but reservations may not include any rooms.
7. A guest may use several services, and a service may be used by several
guests. Neither guests nor services are required to participate in this
relationship.

Quiz 1.6
Design an ERD for a Social Media Platform that includes the
following:
1. Each user on the platform has a (UserID, Username, Email,
DateOfBirth, Age, and more than one FriendList).
2. Each post created by users has a (PostID, Content, Timestamp, and
NumberOfLikes).
3. Each comment made on posts has a (CommentID, Content, and
Timestamp).
4. A user may create several posts, but each post must be created by one
user. Posts must exist, but users may not have created any posts yet.
5. A user may write several comments, but each comment must be
written by one user. Comments must exist, but users may not have
written any comments yet.
6. Users can form friendships with other users, where a user may have
several friends, and a friendship is mutual between two users. All
users must have friends.

Quiz 1.7
Design an ERD for a School Management System that includes the
following:
1. Each teacher at the school has a (TeacherID, Name, Qualifications, and
ExperienceYears).
2. Each student enrolled at the school has a (StudentID, Name, Age,
Contact, and EnrollmentYear).
3. Each class conducted in the school has a (ClassID, ClassName, and
Schedule).
4. Each subject taught in the school has a (SubjectID, SubjectName, and
Credits).
5. Each exam held for students has an (ExamID, Date, and MaxMarks).
6. A teacher may teach several classes, but a class must be taught by one
teacher. Classes must exist, while teachers may not teach any classes
yet.
7. A student may attend several classes, and a class may have several
students. All students must attend classes, while classes may not have
any students attending.
8. A student may take several exams, and an exam may be taken by
several students. All students must take exams, while exams may not
have any students taking them.

Quiz 1.8
Design an ERD for an Inventory Management System that includes
the following:
1. Each item in the inventory has an (ItemID, Name, UnitPrice, and
StockLevel).
2. Each supplier providing items has a (SupplierID, Name, Contact, and
Address (Street, City, and ZIP)).
3. Each warehouse storing items has a (WarehouseID, Location, and
Capacity).
4. Each order placed in the system has an (OrderID, OrderDate, and
TotalAmount).
5. A supplier may supply several items, and an item may be supplied by
several suppliers. Both suppliers and items must participate in this
relationship.
6. A warehouse may store several items, but an item may only be stored
in some warehouses. All warehouses must store items, but items may
not be stored in any warehouse yet.
7. An order may contain several items, and an item may be part of
several orders. Both orders and items must participate in this
relationship.

Quiz 1.9
Design an ERD for a Banking System that includes the following:
1. Each customer of the bank has a (CustomerID, Name, Contact, Address
(Street, City, ZIP), and AccountsOwned).
2. Each account in the bank has an (AccountID, AccountType, and
Balance).
3. Each transaction made through the bank has a (TransactionID, Date,
Amount, and TransactionType).
4. Each branch of the bank has a (BranchID, Location, and Manager
(FirstName, LastName)).
5. A customer may hold several accounts, but an account must be held
by one customer. Accounts must exist, but customers may not hold
any accounts.
6. A customer may perform several transactions, but each transaction
must be performed by one customer. Transactions must exist, but
customers may not perform any transactions.
7. An account must belong to one branch, and a branch may have several
accounts. Accounts must exist, while branches may not have any
accounts yet.

Quiz 1.10
Design an ERD for a Movie Rental System that includes the following:
1. Each movie available for rent has a (MovieID, Title, Genre,
ReleaseDate, Duration, and Rating).
2. Each customer of the movie rental service has a (CustomerID, Name,
Address (Street, City, and ZIP), Email, and Phone).
3. Each rental made by a customer has a (RentalID, RentalDate,
ReturnDate, and TotalCost).
4. Each membership plan offered by the service has a (PlanID, PlanType,
CostPerMonth, and MaxRentalsAllowed).
5. A customer may rent several rentals, but each rental must be
associated with one customer. Rentals must exist, but customers may
not have any rentals yet.
6. A rental may include several movies, and a movie may be included in
several rentals. Both rentals and movies must participate in this
relationship.
7. A customer must subscribe to one membership plan, and each plan
must have one customer. Both customers and membership plans must
participate in this relationship.

Quiz 1.11
Design an ERD for an Airline Reservation System that includes the
following:
1. Each flight in the system has a (FlightID, DepartureTime, ArrivalTime,
Duration, and Capacity).
2. Each passenger traveling on flights has a (PassengerID, Name,
PassportNumber, and ContactNumber).
3. Each ticket issued for a flight has a (TicketID, SeatNumber, Fare, and
IssueDate).
4. Each airport serviced by flights has an (AirportID, Name, Location (City,
Country), and Code).
5. A passenger may book several tickets, but each ticket must be booked
by one passenger. Tickets must exist, but passengers may not have any
tickets booked yet.
6. A flight must take off from one airport, and each airport may have
multiple flights taking off. Flights must take off from an airport, while
airports may not have any flights taking off.
7. A flight must land at one airport, and each airport may have multiple
flights landing. Flights must land at an airport, while airports may not
have any flights landing.
Quiz 1.12
Design an ERD for a Restaurant Ordering System that includes the
following:
1. Each customer of the restaurant has a (CustomerID, Name,
ContactNumber, and Address (Street, City, ZIP), and OrderHistories).
2. Each order placed by customers has an (OrderID, OrderDate, and
TotalAmount).
3. Each menu item available in the restaurant has a (MenuItemID, Name,
Price, and Category).
4. Each payment made by a customer has a (PaymentID, PaymentType,
PaymentDate, and Amount).
5. A customer may place several orders, but each order must be placed
by one customer. Orders must exist, but customers may not place any
orders yet.
6. An order may include several menu items, and a menu item may be
included in several orders. Both orders and menu items must
participate in this relationship.
7. A customer must make one payment for each order, and each
payment must be associated with one customer. Both customers and
payments must participate in this relationship.
Quiz 1.13
Design an ERD for a Music Streaming Service that includes the
following:
1. Each user in the service has a (UserID, Username, Email,
SubscriptionType, and Playlists).
2. Each playlist created by users has a (PlaylistID, Name, and
CreationDate).
3. Each song available in the service has a (SongID, Title, Duration, and
Genre).
4. Each artist whose music is streamed has an (ArtistID, Name, Country,
and SongsPerformed).
5. A user may create several playlists, but each playlist must be created
by one user. Playlists must exist, but users may not create any playlists
yet.
6. A playlist may include several songs, and a song may be included in
several playlists. Both playlists and songs must participate in this
relationship.
7. An artist may perform several songs, and a song may be performed by
multiple artists. Both artists and songs can exist independently but
may also participate in this relationship.

Quiz 1.14
Design an ERD for an E-Learning Platform that includes the following:
1. Each student on the platform has a (StudentID, Name, Email,
DateOfBirth, and Grades).
2. Each course offered on the platform has a (CourseID, Title, Credits, and
Level).
3. Each instructor on the platform has an (InstructorID, Name, Email, and
Expertise).
4. Each assignment given to students has an (AssignmentID, Title,
DueDate, and MaxMarks).
5. Each grade assigned to a student has a (GradeID, GradeValue, and
DateAssigned).
6. A student may enroll in several courses, and a course may have
multiple students. Both students and courses must participate in this
relationship.
7. An instructor may teach several courses, but each course must be
taught by one instructor. Courses must exist, but instructors may not
teach any courses yet.
8. A student may submit several assignments, and an assignment may be
submitted by multiple students. Both students and assignments must
participate in this relationship.

Quiz 1.15
Design an ERD for a Supermarket Chain that includes the following:
1. Each product in the supermarket chain has a (ProductID, Name, Price,
Category, and StockLevel).
2. Each store in the chain has a (StoreID, Location (Street, City), and
Manager).
3. Each employee working for the supermarket has an (EmployeeID,
Name, Position, and Salary).
4. Each sale made in the store has a (SaleID, Date, and TotalAmount).
5. Each supplier associated with the chain has a (SupplierID, Name,
ContactDetails, and ProductsSupplied).
6. A store may sell several products, and a product may be sold by
multiple stores. Both stores and products must participate in this
relationship.
7. An employee may be employed by one store, but a store may have
multiple employees. All employees must work at a store, while some
stores may not yet have employees.
8. A supplier may supply several products, and a product may be
supplied by multiple suppliers. Both suppliers and products can exist
without this relationship.
Quiz 1.16
Design an ERD for a Human Resources System that includes the
following:
1. Each employee in the system has an (EmployeeID, Name, Position,
HireDate, Salary, and Benefits).
2. Each department in the organization has a (DepartmentID, Name,
Budget, and Manager).
3. Each position available within the company has a (PositionID, Title,
SalaryRange, and Responsibilities).
4. Each salary record has a (SalaryID, Amount, and EffectiveDate).
5. Each benefit provided to employees has a (BenefitID, Type, and
Description).
6. An employee may work in one department, but a department may
have multiple employees. All employees must be assigned to a
department, while some departments may not yet have employees.
7. Each employee must hold one position, while a position may be held
by multiple employees. Employees may exist without a position
initially.
8. Each employee is assigned one salary, and each salary must
correspond to exactly one employee.
Quiz 1.17
Design an ERD for a Gym Membership System that includes the
following:
1. Each member of the gym has a (MemberID, Name, ContactNumber,
MembershipStartDate, and ClassesEnrolled).
2. Each trainer employed by the gym has a (TrainerID, Name, Expertise,
and Certification).
3. Each class offered at the gym has a (ClassID, Title, Schedule, and
Capacity).
4. Each membership plan available to members has a (PlanID, PlanType,
Cost, and Duration).
5. Each payment made by a member has a (PaymentID, PaymentDate,
and Amount).
6. A member may enroll in one or more classes, and a class may have
one or more members enrolled.
7. A member must have one membership plan, and each membership
plan must belong to one member.
8. A trainer may conduct one or more classes, but each class must be
conducted by one trainer.
Quiz 1.18
Design an ERD for a Real Estate Management System that includes
the following:
1. Each property has a (PropertyID, Address (Street, City, ZIP), Value,
Type, and AvailabilityStatus).
2. Each owner of a property has a (OwnerID, Name, and ContactInfo).
3. Each tenant leasing a property has a (TenantID, Name, LeaseStartDate,
and LeaseEndDate).
4. Each lease agreement has a (LeaseID, StartDate, EndDate, and
RentAmount).
5. Each payment made by a tenant has a (PaymentID, Date, and
Amount).
6. An owner may own one or more properties, but each property must
be owned by one owner.
7. A tenant may lease one or more properties, and a property may be
leased by one or more tenants.
8. A tenant may make one or more payments, but each payment must be
associated with one tenant.

Quiz 1.19
Design an ERD for an Event Management System that includes the
following:
1. Each event has an (EventID, Name, Date, Budget, and an Organizer
(FirstName, LastName)).
2. Each attendee has an (AttendeeID, Name, ContactInfo, and
TicketPurchased).
3. Each venue has a (VenueID, Name, Capacity, and Location).
4. Each ticket has a (TicketID, Price, Type, and IssueDate).
5. An attendee may attend one or more events, and each event may be
attended by one or more attendees.
6. Each event must be held at one venue, but a venue may hold multiple
events.
7. An event may issue multiple tickets, but each ticket must be
associated with one event.

Quiz 1.20
Design an ERD for a Car Rental System that includes the following:
1. Each customer has a (CustomerID, Name, ContactInfo, and
LicenseNumber).
2. Each car has a (CarID, Make, Model, Year, and DailyRate).
3. Each rental has a (RentalID, RentalStartDate, RentalEndDate, and
TotalCost).
4. Each location has a (LocationID, City, State, and Address).
5. Each insurance policy has an (InsuranceID, Provider, CoverageType,
and PolicyNumber).
6. A customer may rent one or more rentals, but each rental must be
associated with one customer.
7. Each rental must be assigned to one car, but a car may be assigned to
multiple rentals over time.
8. A rental may be covered by one insurance policy, but an insurance
policy may cover multiple rentals.

Quiz 1.21
Design an ERD for a Pharmacy Management System that includes the
following:
1. Each medicine has a (MedicineID, Name, ExpiryDate, Price, and
StockLevel).
2. Each customer has a (CustomerID, Name, ContactNumber, and
Address (Street, City, ZIP)).
3. Each prescription has a (PrescriptionID, DateIssued, Dosage, and
Frequency).
4. Each pharmacist has a (PharmacistID, Name, LicenseNumber, and
Experience).
5. Each supplier has a (SupplierID, Name, and ContactInfo, with
SuppliedMedicines).
6. A customer may have one or more prescriptions, but each prescription
must be associated with one customer.
7. A pharmacist may fulfill multiple prescriptions, but each prescription
must be fulfilled by one pharmacist.
8. A supplier may supply multiple medicines, and each medicine may be
supplied by multiple suppliers.
9. A prescription must contain one or more medicines, and a medicine
may be included in multiple prescriptions.
Quiz 1.22
Design an ERD for a Job Portal System that includes the following:
1. Each job seeker has a (SeekerID, Name, Email, Resume (Skills,
WorkExperience), and ContactNumber).
2. Each employer has an (EmployerID, Name, Industry, Location (City,
Country), and ContactInfo).
3. Each job listing has a (JobID, Title, Description, Salary, and
PostingDate).
4. Each application has an (ApplicationID, SubmissionDate, and Status).
5. Each interview has an (InterviewID, Date, InterviewType, and
Feedback).
6. A job seeker may apply to multiple job listings, and a job listing may
receive applications from multiple job seekers.
7. An employer may post multiple job listings, but each job listing must
be posted by one employer.
8. An application may lead to one or more interviews, but each interview
must be associated with one application.
9. A job seeker may submit multiple applications, but each application
must be submitted by one job seeker.
Quiz 1.23
Design an ERD for a Football Management System that includes the
following:
1. Each team has a (TeamID, Name, CoachID, HomeCity, and
EstablishedYear).
2. Each player has a (PlayerID, Name, Position, JerseyNumber, and Age).
3. Each match has a (MatchID, Date, Score, and Venue).
4. Each coach has a (CoachID, Name, Experience, and Nationality).
5. Each stadium has a (StadiumID, Name, Location (City, Country), and
Capacity).
6. A player must belong to one team, and a team may have multiple
players.
7. A stadium may host multiple matches, but each match must be hosted
by one stadium.
8. A match must involve two teams, and a team may participate in
multiple matches.
9. Each team must have exactly one coach, and a coach may only coach
one team.

Quiz 1.24
Design an ERD for an Online Food Delivery System that includes the
following:
1. Each customer has a (CustomerID, Name, ContactNumber, Address
(Street, City, ZIP), and OrderHistories).
2. Each restaurant has a (RestaurantID, Name, Location (Composite), and
CuisineType).
3. Each delivery driver has a (DriverID, Name, VehicleType, and
LicenseNumber).
4. Each order has an (OrderID, OrderDate, TotalAmount, and
DeliveryStatus).
5. Each payment method has a (PaymentMethodID, Type, and Details
(CardNumber, ExpiryDate)).
6. A customer may place multiple orders, but each order must be placed
by one customer.
7. A restaurant may prepare multiple orders, but each order must be
prepared by one restaurant.
8. A delivery driver may deliver multiple orders, but each order must be
delivered by one driver.
9. A customer may use multiple payment methods, but each payment
method must be associated with at least one customer.

You might also like