0% found this document useful (0 votes)
4 views4 pages

CS603 Assignment Number 1

The document outlines the database design for a system involving branches, employees, accounts, and services. It details the relationships between these entities, including a one-to-many relationship between branches and employees, and a many-to-many relationship between accounts and services facilitated by an intermediate table. Additionally, it lists the potential tables and their respective columns, primary keys, and foreign keys.

Uploaded by

o02787131
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)
4 views4 pages

CS603 Assignment Number 1

The document outlines the database design for a system involving branches, employees, accounts, and services. It details the relationships between these entities, including a one-to-many relationship between branches and employees, and a many-to-many relationship between accounts and services facilitated by an intermediate table. Additionally, it lists the potential tables and their respective columns, primary keys, and foreign keys.

Uploaded by

o02787131
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/ 4

CS603 – Software Architecture and Design

Assignment No. 1 Solution (Spring 2025)


Khadija Malik
Bc220406263
Semester 06

Question no1:
Virtual University of Pakistan
(a) Database Design Diagram for Branches and Employees
Relationship:
 One Branch employs many Employees.
 One Employee belongs to one Branch.
Type: One-to-Many Relationship
Database Design Diagram:

 PK: Primary Key


 FK: Foreign Key (Branch_ID in Employees refers to Branch_ID in Branches)
(b) Relationship between Accounts and Services
Relationship:
 One Account can have multiple Services (loan, insurance, card).
 One Service can be linked to multiple Accounts.
Type: Many-to-Many Relationship
To manage this, we introduce an intermediate table called Account_Services.
Database Design Diagram:

 PK: Primary Key


 FK: Foreign Key

(c) Names of All Potential Tables Involved

Table Names

Branches

Employees

Customers

Accounts

Services
Account_Services

(d) Column Names and Keys for Each Table

Foreign Key
Table Name Columns Primary Key (PK)
(FK)

Branch_ID, Branch_Name,
Branches Branch_ID -
Branch_Location

Employee_ID,
Employee_Name,
Employees Employee_ID Branch_ID
Employee_Position,
Branch_ID

Customer_ID,
Customer_Name,
Customers Customer_ID -
Customer_Address,
Customer_Phone

Account_ID, Account_Type,
Accounts Account_ID Customer_ID
Balance, Customer_ID

Service_ID, Service_Name,
Services Service_ID -
Service_Description

Account_Service_ID, Account_ID,
Account_Services Account_Service_ID
Account_ID, Service_ID Service_ID

 Branches and Employees have a One-to-Many relationship.


 Accounts and Services have a Many-to-Many relationship using the
Account_Services table.
 All important tables, columns, primary keys, and foreign keys are clearly
defined.

You might also like