0% found this document useful (0 votes)
10 views11 pages

DB Ca3

Database Management System Class Assignment 4

Uploaded by

waliurehman4023
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)
10 views11 pages

DB Ca3

Database Management System Class Assignment 4

Uploaded by

waliurehman4023
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/ 11

Database Systems

Class Assignment 03

Wali Ur Rehman
SP23-BDS-054
Umer Javed
SP23 BDS-052
Problem no 1 – Course Training
Answer:
Trainee:
1. Social Security Number (SSN) (Primary Key)
2. Surname
3. Age
4. Gender
5. Place of Birth
6. Employer’s Name (if applicable)
7. Employer’s Address (if applicable)
8. Employer’s Telephone Number (if applicable)
9. Courses Taken
10. Final Assessment for Each Course
11. Current Seminars
12. Employment Type (Employee or Self-Employed)
13. For Employees:

 Previous Employers
 Periods Employed
 Level
 Position

14. For Self-Employed:

 Area of Expertise
 Title (if applicable)

Instructor:
1. Instructor ID (Primary Key)
2. Surname
3. Age
4. Place of Birth
5. Phone Number
6. Employment Type (Full-Time or Freelancer)
7. Courses Qualified to Teach
8. Previous Courses Taught
9. For Full-Time Instructors:

 Fixed Pay
 Allowances

10. For Freelancers:


 Rate Per Hour
 Hours Worked

Course:
1. Course Code (Primary Key)
2. Title
Course Edition:
1. Edition ID (Primary Key)
2. Start Date
3. End Date
4. Number of Participants
5. Course Code (Foreign Key)
6. Duration Type (Short or Long)

7. For Short Courses:


 Quarter Number
 Year

8. For Long Courses:


 Batch Number (e.g., Spring23, Fall24)

Seminar:
1. Seminar ID (Primary Key)
2. Location
3. Date
4. Time
5. Course Edition ID (Foreign Key)

Relationships:
1. Trainee-Course Edition (Many-to-Many)
 Each Trainee can take multiple Course Editions.
 Each Course Edition can have multiple Trainees.
 Store Final Assessment for each course taken by a Trainee.

2. Instructor-Course Edition (One-to-Many)


 Each Course Edition is taught by one Instructor.
 Each Instructor can teach multiple Course Editions.

3. Trainee-Seminar (Many-to-Many)
 Each Trainee can attend multiple Seminars.
 Each Seminar can have multiple Trainees.
4. Instructor-Course (Many-to-Many)
 Each Instructor can be qualified to teach multiple Courses.
 Each Course can have multiple qualified Instructors.

Problem no 2 - Cafeteria
Answer:
Entities and Attributes:

Menu:
• Attributes: MenuID, Name, Price

MenuOffering:
• Attributes: Date, QuantitySold

MenuComponent:
• Attributes: ComponentID, Name, Type (Main Course or Side Dish)

Recipe Ingredient:
• Attributes: IngredientID, Name, CaloriesPer100g

ComponentIngredient:
• Attributes: ComponentID, IngredientID, QuantityInGrams

Relationships:
• A Menu can be offered on multiple days (MenuOffering).
• A Menu consists of one Main Course and multiple Side Dishes (MenuComponent).
• A MenuComponent can have multiple Ingredients
Problem no 3 – Cricket Website Database

Answer:

Entities and Attributes


Player:
- PlayerID
- Name
- Age
- Type (Local/International)
- Club (for Local)
- IntlMatchesPlayed (for International)
Team:
- TeamID
- Name
Coach:
- CoachID
- Name
- Age
- ExperienceYears
Tournament:
- TournamentID
- Name
- StartDate
- EndDate
Match:
- MatchID
- Date
- Description
- Type (One Day/Test)
- NoOfOvers (for One Day)
- NoOfDays (for Test)
- NoOfInnings (for Test)
Referee:
- RefereeID
- Name
- ExperienceYears

Venue:
- VenueID
- Name
- Location

Event:
- EventID
- MatchID (Foreign Key)
- EventType
- Timestamp
- Description

Relationships:
- Players form Teams
- Teams have Coaches
- Teams participate in Tournaments
- Tournaments comprise Matches
- Matches are adjudicated by Referees
- Matches are played at Venues
- Players participate in Matches
- Matches have chronological Events
Problem no 4 – Finance Company
Answer:

Entities and Attributes:

Customer:
Attributes: CustomerID, Name, Address, Type (Individual, Employee, Institution)

Institution:
Attributes: InstitutionID, FocalPerson, OtherDetails

Employee:
Attributes: EmployeeID, JobType (Permanent, Contractual), JobExperience (for Permanent),
ContractDuration, StartDate, EndDate

InvestmentScheme:
Attributes: SchemeID, SchemeType (Shares, Debentures, Fixed Deposits)

FixedDeposit:
Attributes: DepositID, Term (1, 2, or 3 years), PaymentScheme (On Maturity, Periodic),
InterestRate, InterestPaymentFrequency (Quarterly, Semi-Annually, Annually)

Debenture:
Attributes: DebentureID, Term (1, 2, or 3 years), Type (Convertible, Nonconvertible)

Share:
Attributes: ShareID, Type (Equity, Preferred), DividendRate
Transaction:
Attributes: TransactionID, Date, Amount, CustomerID, SchemeID

Relationships:
- Customers invest in different investment schemes (InvestmentScheme).
- Fixed deposits can be renewed on maturity.
- Debentures and shares are issued periodically.
- Employees deal with depositors.

You might also like