Scenerio Er - Uml, Relational
Scenerio Er - Uml, Relational
Case Study:
Relational Tables
1. Customer
Attribute Description
C_ID (Primary Key) Unique customer identifier
Name Customer name
DOB Date of birth
ContactNo Contact number
House_no House number
Street Street name
Dependant_name Name of dependent
2. Employee
Attribute Description
E_ID (Primary Key) Unique employee identifier
Name Employee name
3. Branch
Attribute Description
Branch_ID (Primary Key) Unique branch identifier
Branch_Name Name of the branch
4. Loan
Attribute Description
Loan_No (Primary Key) Unique loan identifier
Amount Loan amount
Borrower_ID (Foreign Key) References Customer(C_ID)
Branch_ID (Foreign Key) References Branch(Branch_ID)
5. Loan_Payment
Attribute Description
Payment_ID (Primary Key) Unique payment identifier
Loan_No (Foreign Key) References Loan(Loan_No)
NUML UNIVERSITY, H-9, Islamabad
6. Account
Attribute Description
AccountNo (Primary Key) Unique account identifier
Balance Account balance
Customer_ID (Foreign Key) References Customer(C_ID)
Interest_Rate Interest rate for the account
7. Saving Account
Attribute Description
AccountNo (Primary Key & Foreign References
Key) Account(AccountNo)
Daily_withdraw_limit Daily withdrawal limit
8. Current Account
Attribute Description
AccountNo (Primary Key & Foreign References
Key) Account(AccountNo)
Overdraft_Amount Maximum overdraft allowed
Per_Transaction_Charges Transaction fees
Relationships
1. Customer:
o Each customer has a unique ID, name, email, phone
number, and address.
o A customer can place multiple orders.
2. Product:
o The company sells a variety of products.
o Each product has a unique product ID, name, description,
price, and stock quantity.
3. Order:
o Customers place orders for one or more products.
o Each order has a unique ID, order date, and total amount.
o Each order is associated with one customer.
4. Order Line Item:
o An order can contain multiple products, with details
about the quantity ordered for each product.
5. Payment:
o Each order must be paid for.
o Payments include a payment ID, date, amount, and
payment method (e.g., credit card, PayPal).
o A single order may have one payment, but customers can
make multiple payments across different orders.
6. Employee:
NUML UNIVERSITY, H-9, Islamabad
Relationships
1. Student:
o Each student has a unique Student ID, full name, date of
birth, gender, contact number, and address.
o A student can enroll in multiple courses during a
semester.
2. Course:
o Courses offered by the university are uniquely identified
by a Course ID.
o Each course has a name, description, and number of
credits.
o A course is associated with a department, and multiple
courses can belong to the same department.
3. Instructor:
o Instructors teach courses.
o Each instructor has a unique Instructor ID, full name,
qualification, and specialization.
o An instructor may teach multiple courses, and a course
can be taught by one or more instructors.
4. Department:
o Each department in the university is uniquely identified
by a Department ID.
o A department has a name and a head (one of the
instructors is the department head).
o A department manages multiple courses and instructors.
NUML UNIVERSITY, H-9, Islamabad
5. Enrollment:
o Students enroll in courses for a specific semester.
o Enrollment has attributes like Semester, Year, and Grade
(e.g., A, B, C, etc.).
o A student can enroll in multiple courses, and a course can
have multiple students enrolled in it (many-to-many
relationship).
6. Grades:
o The system needs to store grades for each student in
every course they enroll in.
o Grades are associated with specific enrollments.
Relationships
NUML UNIVERSITY, H-9, Islamabad