Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

ICT503 – Database Systems

Arshdeep Singh
Assessment 1 Part A

Case Study
This assignment concerns a liquor shop chain in Sydney, called the A-one liquor (AL).
The objective of this assignment is to develop a database system that will be used to
centrally store and manage all relevant information for the branches of AL.
The information to be stored include information on different branches of AL (e.g.,
Bankstown, Hornsby, etc.), types of drinks they sell (beers, wines, cedars, etc.), staff
they employ (Retail Assistants, Shelving Assistants, etc.), AL Members (AL Loyalty
Card holders). The basic requirements gathered from the stake holders is presented
in the following four points. As typically the case, these requirements are often
underspecified. Use your judgment in interpreting them when required and keep a
note of the assumptions you made.

1. Branch Information: The AL System shall keep information on each branch


including its name and address, and the number of employees who work
there. The system shall also contain information on which days (Mon-Sun) the
branch is open, and opening hours. It will also keep information on opening
hours (e.g., Mon-Fri 10:00AM-5:30PM; Sat 9:00AM-9:00PM; Sun Closed).
2. Product Information: The system shall contain relevant information on
products of different types at the “item level”, such as: (wine/beer/spirit/...),
packaging info (can/bottle/...), volume (e.g., 375ml X 6 pack), price, and brand
(e.g., Tooheys Old Dark Ale), as well as current stock level.
3. Staff Information: The system shall record information on staff members who
work at different branches of AL. This will include their roles, type of
employment (e.g., permanent, casual), salary (annual or hourly depending on
permanent or casual), as well as who they report to (i.e., supervisors).
4. Membership Information: The system shall record information on AL
members, including type of membership (Platinum/Gold/Silver), and when the
membership will expire.
Task 1: (Weightage 20%)

Investigate and identify data requirement for the given study by providing list of
required entities, list of attributes in each of these entities, and the unique
identifier for each entity.

Based on the provided requirements, we can identify the following entities along with their
attributes and unique identifiers:

1. Branch Entity:

- Attributes:

- Branch ID (Unique Identifier)

- Branch Name

- Address

- Number of Employees

- Open Days (e.g., Mon-Sun)

- Opening Hours (e.g., Mon-Fri 10:00AM-5:30PM; Sat 9:00AM-9:00PM; Sun Closed)

2. Product Entity:

- Attributes:

- Product ID (Unique Identifier)

- Product Type (e.g., wine, beer, spirit)

- Packaging Type (e.g., can, bottle)

- Volume (e.g., 375ml X 6 pack)

- Price

- Brand

- Current Stock Level


3. Staff Entity:

- Attributes:

- Staff ID (Unique Identifier)

- Branch ID (Foreign Key to Branch Entity)

- Name

- Role

- Employment Type (e.g., permanent, casual)

- Salary

- Supervisor ID (Foreign Key to Staff Entity)

Task 2: (Weightage 60%)

Develop an Entity-Relationships Diagram for the given scenario (It must


contain entities and unique identifiers in terms of keys, relationships
between the entities including relationships constraints, and the attributes).

Here's an Entity-Relationship Diagram (ERD) representing the scenario described:

+-----------------+
| Branch |
+-----------------+
| BranchID (PK) |
| BranchName |
| Address |
| NumEmployees |
| OpenDays |
| OpeningHours |
+--------+--------+
|
|
|
+------------+------------+
| |
| |
+----------v----------+ +---------v----------+
| Product | | Staff |
+---------------------+ +---------------------+
| ProductID (PK) | | StaffID (PK) |
| ProductType | | BranchID (FK) |
| PackagingType | | Name |
| Volume | | Role |
| Price | | EmploymentType |
| Brand | | Salary |
| CurrentStockLevel | | SupervisorID (FK) |
+----------+----------+ +----------+----------+
| |
| |
| |
+----------v-------------------v----------+
| Membership |
+------------------------------------------+
| MembershipID (PK) |
| MemberName |
| MembershipType |
| ExpiryDate |
+------------------------------------------+

In this ERD:
- Each rectangle represents an entity.
- The ovals within each entity represent attributes, with the primary key (PK) indicated.
- The lines connecting entities represent relationships.
- Relationship constraints such as foreign keys (FK) are indicated where applicable.
- BranchID in the Staff entity and SupervisorID in the Staff entity are foreign keys referencing
the Branch entity's primary key (BranchID).
- BranchID in the Product entity is a foreign key referencing the Branch entity's primary key
(BranchID).
- SupervisorID in the Staff entity is a foreign key referencing the Staff entity's primary key
(StaffID), indicating a hierarchical relationship.
- The Membership entity holds information about AL members, with MembershipID as the
primary key.

Task 3: (Weightage 20%)

Derive the physical design having detail of entities, primary and foreign keys, detail
of all the attributes.

Here's the physical design detailing the entities, primary and foreign keys, and attributes:
*Entities:*

1. Branch:

- BranchID (Primary Key)

- BranchName

- Address

- NumEmployees

- OpenDays

- OpeningHours

2. Product:

- ProductID (Primary Key)

- BranchID (Foreign Key referencing Branch)

- ProductType

- PackagingType

- Volume

- Price

- Brand

- CurrentStockLevel

3. Staff:

- StaffID (Primary Key)

- BranchID (Foreign Key referencing Branch)

- Name
- Role

- EmploymentType

- Salary

- SupervisorID (Foreign Key referencing Staff)

4. Membership:

- MembershipID (Primary Key)

- MemberName

- MembershipType

- ExpiryDate

*Primary and Foreign Keys:*

- Branch:

- Primary Key: BranchID

- Product:

- Primary Key: ProductID

- Foreign Key: BranchID (referencing Branch)

- Staff:

- Primary Key: StaffID

- Foreign Key: BranchID (referencing Branch)

- Foreign Key: SupervisorID (referencing Staff)


- Membership:

- Primary Key: MembershipID

*Detail of Attributes:*

1. Branch:

- BranchID: Unique identifier for each branch.

- BranchName: Name of the branch.

- Address: Address of the branch.

- NumEmployees: Number of employees working at the branch.

- OpenDays: Days of the week the branch is open.

- OpeningHours: Opening hours of the branch.

2. Product:

- ProductID: Unique identifier for each product.

- BranchID: Identifies the branch where the product is sold.

- ProductType: Type of the product (e.g., wine, beer, spirit).

- PackagingType: Type of packaging (e.g., can, bottle).

- Volume: Volume of the product packaging.

- Price: Price of the product.

- Brand: Brand of the product.

- CurrentStockLevel: Current stock level of the product.

3. Staff:

- StaffID: Unique identifier for each staff member.


- BranchID: Identifies the branch where the staff member works.

- Name: Name of the staff member.

- Role: Role or position of the staff member.

- EmploymentType: Type of employment (e.g., permanent, casual).

- Salary: Salary of the staff member.

- SupervisorID: Identifies the supervisor of the staff member (self-referencing foreign key).

4. Membership:

- MembershipID: Unique identifier for each membership.

- MemberName: Name of the member.

- MembershipType: Type of membership (Platinum/Gold/Silver).

- ExpiryDate: Date when the membership will expire.

You might also like