You are on page 1of 50

PROJECT

GV Nguyễn Thị Thanh Tâm


INSTRUCTORNOTES

The following are the inputs for the faculty for project allocation and evaluation:
 The project should be allocated to individual students by the end of the
Relational Database Design module, the third cycle.
 The student can start the project earliest after the first Experiment session of
Relational Database Design is over.
 During allocation, explain the students the scope of the project by referring to
the topic Project Activities and Project Timelines.
 Ask the students to refer to the sample case study and its solution given in the
sample project documentation.
 Ask the students to refer to the topic Project Standards and Guidelines before
starting the project documentation.

 Before project evaluation day, ask the students to verify their projects according
to the standards and guidelines given in the topic Project Standards and
Guidelines.
 Evaluate the students according to the guidelines given in the topic Project
Evaluation Guidelines.

Relational Database Design 1.2


CASESTUDY1: SHOP HERE

Background
Shop Here is a leading departmental store in New York. The store is known for quality
products, affordable price range, timely services, and home delivery facility. The store
has customers from all sections of the society and procures goods from various
countries.

Existing System
Shop Here maintains an optimum inventory of various categories of items. The details
of the various categories are stored in the Categories file. This file contains data
about the item category numbers and the corresponding categories. The details of the
items are stored in a file named Items. The Items file contains records such as item
number, item description, item category number, serial number of the item, unit price
of each item, and reorder level of each item.
The store has several regular suppliers for the various items. The suppliers are
spread over various geographical locations. A detailed record is maintained for each
supplier. The supplier record consists of supplier code, supplier’s name, address,
phone
number, country of origin, and shipment mode number and shipment mode for
outstation suppliers. All records are maintained in the Suppliers file.
Whenever the employee of a store places a purchase order, a purchase order form
needs to be filled out. The format of a purchase order form is as follows:

PURCHASE ORDER FORM

Purchase Order ID: Supplier ID:

Employee ID: Order Date:

Shipment Date: Quantity:

Shipment Method ID: Freight Charge:

A complete transaction takes place when the purchase is made and the payment is
done.

GV Nguyễn Thị Thanh Tâm


Envisioned System
Shop Here requires a computerized system that provides an effective method of
storing transaction details. The inventory-in-charge, Chris Symonds, realizes that with
growth in business, it becomes difficult to manually maintain the inventory. Shop Here
also wants to include the information about employees who place purchase orders with
the suppliers. Therefore, the management of the store has decided to computerize the
inventory management of the store. To fulfill this need, the store management has
contacted RedSky IT Systems to develop the computerized system. Don Allen, a
project manager of RedSky IT Systems, has been deputed to manage the assignment.
Don and his project team need to perform the following tasks:
1. Identify the various entities involved.
2. Identify the attributes of the various entities. The attributes should completely
define the entities.
3. Draw an E/R diagram to demonstrate the relationship between the various
entities.
4. Map the E/R diagram to tables.
5. Normalize the tables to 3 NF.
6. Identify the primary and foreign keys in the tables.
7. Draw a diagram to show the relationships between various tables.

Relational Database Design 1.4


CASESTUDY2: SHOWMAN HOUSE

Background
Showman House is a large event management company of New York. The company
organizes various types of events throughout the year. The events types include
fashion shows, celebrity shows, chat shows, musical extravaganza, exhibitions, fairs,
and charity shows.

Existing System
Showman House organizes events of different types. The details of the various event
types are stored in the Event Types file. This file contains data about the event type
codes and the corresponding event types. Any attendee who wishes to organize an
event needs to provide details about the nature of the event he wants to organize.
Along with providing event details, he also makes the payment for the event. The
payment for an event is made in instalments, according to the fee plan, which is
stored in the Fee Schedules file. The Fee Schedules file maintains details such as fee
schedule id, event id, fee description, and fee amount. An attendee needs to pay all
the instalments of the payment, on or before the start date of the event.
All details related to an event such as event code, event name, event type code,
location of the event, start date, end date, event description, number of people, and
the staffing required for the event are stored in the Events file. The payment details
that include payment amount, payment date, payment method id, and payment
method description are also stored in the Events file. The details of an attendee such
as attendee id, attendee name, and address are stored in the Attendees file.
Any event at Showman House is managed by an employee. The employee details such
as employee id, first name, last name, title, and phone are stored in the Employees
file.

Envisioned System
The management of Showman House realize that it is difficult to maintain so much
data manually. Therefore, they have decided to computerize the entire system of
event management.
Blue Moon Computers have been assigned the task to computerize the system. The
project team needs to perform the following tasks:
1. Identify the various entities involved.
2. Identify the attributes of the various entities. The attributes should completely
define the entities.
3. Draw an E/R diagram to demonstrate the relationship between the various
entities.

GV Nguyễn Thị Thanh Tâm


4. Map the E/R diagram to tables.
5. Normalize the tables to 3 NF.
6. Identify the primary and foreign keys in the tables.
7. Draw a diagram to show the relationships between various tables.

Relational Database Design 1.6


CASESTUDY3: NEW PROJECT LTD

Background
New Project Ltd. is a company that provides staff on contract for various project
assignments. The company is known for providing qualified and skilled staff that can
fulfill the project requirements efficiently. New Project employs professionals from
various fields that match the requirement of clients.

Existing System
New Project has a system of time cards. Time cards are issued to its employees for
working at the client site until the completion of the project. The employees use their
time cards for all work processes and expenses during the contract period. The time
card data enables New Project to prepare the final billing that needs to be submitted
to the clients for release of payment in lieu of work.
When a work agreement is signed, a project form needs to be filled out. The format of
this form is as follows:

PROJECT FORM

CLIENT SECTION

Client code: Company Name:

Address: Country:

Contact Person: Phone:

PROJECT SECTION

Project code: Project Name:

Project Description: Estimate Bill:

Start Date: End Date:

EMPLOYEE SECTION

Employee code: Employee Name:

Address: Country:

Work Phone: Billing Rate:

GV Nguyễn Thị Thanh Tâm


The client details are stored in the Clients file, the project details are stored in the
Projects file, and the employee details are stored in the Employees file. The next
form that needs to be filled out is the Time Card Details form. The format of the form
is as follows:

TIME CARD DETAILS

Time Card code: Employee code:

EXPENSES DETAILS

Time Card Expense code: Expense Description:

Expense code ID: Expense code:

Expense Date: Expense amount:

WORK DETAILS

Work code ID: Work code:

Work Description: Work date:

Project code:

BILL SECTION

Billed Hours: Billing Rate:

All employees fill the time card details on a daily basis. These details include Time
Card ID, Employee ID, Date Issued, Date Worked, Project ID, Work Description,
Billable Hours, and Work Code ID. The staffing-in-charge of New Project stores these
details in the Time Cards file. The work code ID defines the category of the task
performed by the employee in the project. The details related to the work codes are
stored in the Work Codes file, which includes details such as work code id and work
code description.
During the project life cycle, employees might also incur expenses due to conveyance,
food etc. The details of the expenses incurred by an employee in a project are stored
in the Time Card Expenses file. These details include time card expense id, time
card id, expense date, expense amount, expense description, project id, expense code
id, and expense code. After every project, the company calculates its payment due
from the client and raises an invoice. On realization of the payment, all related data is
stored in the Payments file. This file contains data about payment code, payment
mode ID, payment mode name, corresponding project code, payment amount,
payment date, and credit card details if the client pays through credit card. Credit card
details consist of card number, cardholder’s name, and expiry date of the credit card.

Relational Database Design 1.8


Envisioned System
The management decided that manually maintaining such records was a cumbersome
process. It also gave rise to data redundancy and record duplication. Therefore, to
streamline the entire process, the best solution was to create databases and convert
the manual process to a computerized process.
An in-house development team has been created to work on the project of
computerizing the staffing process of New Project Ltd. The development team has the
following tasks to perform:
1. Identify the various entities involved.
2. Identify the attributes of the various entities. The attributes should completely
define the entities.
3. Draw an E/R diagram to demonstrate the relationship between the various
entities.
4. Map the E/R diagram to tables.
5. Normalize the tables to 3 NF.
6. Identify the primary and foreign keys in the tables.
7. Draw a diagram to show the relationships between various tables.

GV Nguyễn Thị Thanh Tâm


PROJECT EXECUTION
This book contains three case studies. These case studies will be allocated to
individual students.

Phases in Project Execution


The project will be carried out in the following phases:

 System Analysis: System analysis refers to an in-depth study of the existing


system to depict the functionality of the system. The analysis phase is the most
crucial phase in a project because it helps developers to identify the processes in
the system and the functioning of each process. The project teams will analyze
their respective case studies before moving on to the development phase.
 Design: This phase involves designing the project based on the specifications.
 Documentation: The project documentation should be submitted to the
coordinator in the formats given in this book before the project evaluation. The
blank report following the case studies is to be filled up, detached from the
book, and submitted on the given date.

Project Evaluation Guidelines


The project is to be evaluated based on the following parameters:
 Quality: Conformance to requirements of the case study – 20 marks

ξ The solution maps to the requirements specified along with the case study
 Timeliness - 20 marks

ξ Timely completion of the project


 Quality of documentation - 40 marks
ξ Completion of all formats
ξ Adherence to standards and processes

 Query handling during project walkthrough - 20 marks

Project Standards and Guidelines


The following standards and guidelines should be followed while creating the project.
Following these standards and guidelines is one of the evaluation criteria for the
project:
 The E/R diagram should be simple to understand.
 A consistent naming convention should be used for tables.
 Fields in a table should not have a “.” Character.

Relational Database Design 1.10


Project Activities
The students will get 6 hours to complete the project. The activities to be performed
during this period are:
a. Analyze the case study to identify the system processes.
b. Identify the entities.
c. Identify the attributes of the entities.
d. Draw the E/R diagram.
e. Map the E/R diagram to tables.
f. Normalize the tables to 3 NF.
g. Identify the primary keys and foreign keys.
h. Document the project by using the formats given in the later section.
i. Submit the documentation to the faculty.
j. After submitting the documentation, the faculty will query the student
based on the RDBMS concepts and the design created in the
documentation. The faculty will assign marks to the student based on the
evaluation criterions specified in Project Evaluation Guidelines section.

Project Timelines
The students should follow the given timelines to complete the project on time:
Session # Task to be Performed

1  Analyze the case study to identify the system


processes
 Identify the entities

 Identify the attributes of the entities


2  Draw the E/R diagram
 Map the E/R diagram to tables

3  Normalize the tables to 3 NF


 Identify the primary keys and foreign keys

 Document the project

GV Nguyễn Thị Thanh Tâm


SAMPLE CASESTUDY 4:PAY JUNCTION

Background
Pay Junction is a company that performs order processing and manages payment
realizations for other organizations.

Existing System
Pay junction maintains separate files for storing customer details and order details.
The Customer Details file consists of records such as customer code, customer
name, company name, address, country, phone number, and billing address.
When an order is processed, various parameters that affect the order are filled in a
form and then analyzed. The format of the Order Processing form is shown below:

ORDER PROCESSING

Order code: Order Details code:

Customer code: Order Date:

Product code: Product Name:

Quantity: Unit Price:

Discount:

SHIPMENT DETAILS

Shipment Name: Shipping Address:

Shipping Country: Contact Phone:

Shipping Date: Shipping Mode ID:

Shipping Mode: Freight Charges:

Tax:

Total Value:

Relational Database Design 1.12


The data related to the order and shipment is transferred from the Order Processing
form to the Orders file. The data related to the products ordered is stored in the
Products file.
The payments for orders are accepted through cash or credit card. When the
customer makes the payment, the Payments file is updated with the data about
payment code, order code, payment amount, payment date, payment mode ID,
payment mode, and credit card details if the customer pays through a credit card.
The credit card details consist of card number, cardholder’s name, and card expiry
date.

Envisioned System
Pay Junction has decided to stop manual data storage and start computerized
database management and order processing. It would also enable the company to
have quicker communication with the clients.
A small group of database designers have been deployed by Pay Junction to develop a
computerized system of order processing and database management. Pay Junction
also wants to include the information about an employee who processes an order. This
information will include the employee code, name, title, and phone number.
The development team needs to perform the following activities:
1. Identify the entities.
2. Identify the attributes of the entities.
3. Draw an E/R diagram to represent the relationships between various entities.
4. Map the E/R diagram to corresponding tables.
5. Normalize the tables to 3 NF taking care that there is minimum amount of
redundancy and disk space usage. Also, take care that the query performance
is optimum.
6. Identify the primary and foreign keys in the tables.
7. Draw a diagram to show the relationships between various tables.

GV Nguyễn Thị Thanh Tâm


SAMPLE PROJECTDOCUMENTATION: PAY
JUNCTION

PROJECT ON
Pay Junction

Developed by

Name: Debbie Howe

Reg. No.: 4701-10-258

Relational Database Design 1.14


Pay Junction
(Project Title)

Batch Code :
Start Date : March 1, 2004 End Date: March 10, 2004

Name of the Coordinator : Alex Norton

Name of Developer : Debbie Howe

Date of Submission : March 11, 2004

GV Nguyễn Thị Thanh Tâm


CERTIFICATE

This is to certify that this report titled Pay Junction embodies the
original work done by Debbie Howe in partial fulfillment of their course
requirement at NIIT.

Coordinator:

Alex Norton

Relational Database Design 1.16


ACKNOWLEDGEMENT

We have benefited a lot from the feedback and suggestions given to


us by Mr. Alex Norton and other faculty members.

GV Nguyễn Thị Thanh Tâm


SYSTEM ANALYSIS

System Summary: Pay Junction is a company that has been taken up by a


leading leather accessories manufacturer for order processing and managing
payment realizations. Pay Junction maintains separate files for storing customer
details and order details. When an order is processed, various parameters that
affect the order are filled in a form and then analyzed. The payments for orders
are accepted through cash or credit card.

Relational Database Design 1.18


ENTITIES

Number of entities: 5
Names of entities:
1. Customers
2. Orders
3. Products
4. Payments
5. Employees

GV Nguyễn Thị Thanh Tâm


ATTRIBUTES

Attributes:
The attributes of the regular entities are:
a. Customers
Cust-Code
First Name
Last Name
Address
Country
Zip Code
Phone No
b. Orders
Order-Code
Cust-Code
Prod-Code
Emp-Code
Order-Dt
Ship Name
Ship Address
Ship Country
Ship Phone
Ship-Dt
Ship Method Id
Ship Method
Freight Charge
Sales Tax
Quantity
Discount
Total Cost
c. Products
Prod-Code
Prod-Name
Description
Unit Price
d. Payments
Payment-Code
Order-Code
Payment Amount
Payment-Dt
Payment Mode Id
Payment Mode
CreditCard No
Cardholders Name
CreditCardExpiry-Dt

Relational Database Design 1.20


e. Employees
Emp-Code
First Name
Last Name
Title
Phone No

1.21 Relational Database Design


E/R DIAGRAM

SHIP SHIP-
ADDRESS SHIP DT
PHONE SHIP
METHOD
SHIP
COUNTRY
SHIP
NAME SHIP
METHOD
ID

ORDER-
DT
SALES
TAX

ZIP CODE FREIGHT


EMP- CHARGE
COUNTRY
CODE
PHONE NO
ADDRESS QUANTITY

LAST NAME
DISCOUNT
CUST-
FIRST NAME CODE
TOTAL COST

CUST-CODE ORDER-
CODE

m
1 m m
CUSTOMERS PLACES ORDERS FOR PRODUCTS
1
m 1
UNIT PRICE

MAKES PROCESSES FOR


DESCRIPTION PROD-CODE
1 1
EMP- m
CODE EMPLOYEES PAYMENTS PROD-NAME

FIRST
NAME
PAYMENT-CODE
LAST PHONE NO
NAME TITLE
ORDER-
CODE
CREDITCARDEXPIRY-
DT PAYMENT
AMOUNT
CARDHOLDERS NAME
PAYMENT-DT
CREDITCARD NO
PAYMENT MODE ID
PAYMENT MODE

Relational Database Design 1.22


TABLES

Number of Tables: 6
Customers [Entity] Orders [Entity] Order Details [Relationship]

Customers Orders Order Details

Cust-Code Order-Code OrderDetail-ID

First-Name Cust-Code Order-Code

Last-Name Emp-Code Prod-Code

Address Order-Dt Quantity

Country Ship-Name Discount

Zip-Code Ship-Address Total-Cost

Phone-No Ship-Country

Ship-Phone

Ship-Dt

Ship-Method-ID

Ship-Method

Freight-Charge

Sales-Tax

The Order Details table is formed because of a many-to-many relationship between


the Orders and Products entities.
Products [Entity] Payments [Entity] Employees [Entity]

Products Payments Employees

Prod-Code Payment- Code Emp-Code

Prod-Name Order-Code First-Name

Description Payment-Amount Last-Name

Unit-Price Payment-Dt Title

Payment-Mode- ID Phone-No

Payment-Mode

Credit Card-No

Card Holders-Name

CreditCardExpiry-Dt
TABLES AFTER 1 NF

The tables are already in 1 NF.


Customers Orders Order Details

Customers Orders Order Details

Cust-Code Order-Code OrderDetail-ID

First-Name Cust-Code Order-Code

Last-Name Emp-Code Prod-Code

Address Order-Dt Quantity

Country Ship-Name Discount

Zip-Code Ship-Address Total-Cost

Phone-No Ship-Country

Ship-Phone

Ship-Dt

Ship-Method-ID

Ship-Method

Freight-Charge

Sales-Tax
Products Payments Employees

Products Payments Employees

Prod-Code Payment- Code Emp-Code

Prod-Name Order-Code First-Name

Description Payment-Amount Last-Name

Unit-Price Payment-Dt Title

Payment-Mode- ID Phone-No

Payment-Mode

Credit Card-No

Card Holders-Name

CreditCardExpiry-Dt
TABLES AFTER 3 NF
The tables are already in 2 NF as the attributes in each table depend on the primary
key.
Customers Orders Order Details

Customers Orders Order Details

Cust-Code Order-Code OrderDetail-ID

First-Name Cust-Code Order-Code

Last-Name Emp-Code Prod-Code

Address Order-Dt Quantity

Country Ship-Name Discount

Zip-Code Ship-Address Total-Cost

Phone-No Ship-Country

Ship-Phone

Ship-Dt

Ship-Method-ID

Ship-Method

Freight-Charge

Sales-Tax
Products Payments Employees

Products Payments Employees

Prod-Code Payment- Code Emp-Code

Prod-Name Order-Code First-Name

Description Payment-Amount Last-Name

Unit-Price Payment-Dt Title

Payment-Mode- ID Phone-No

Payment-Mode

Credit Card-No

Card Holders-Name

CreditCardExpiry-Dt
TABLES AFTER 5 NF

In the Orders table, the attribute Ship-Method depends on Ship-Method-ID and not on
Order-Code. Therefore, for the tables to be in 3 NF, we need to create another table,
Shipment Methods. Also, in the Payments table, the attribute Payment-Mode depends
on Payment-Mode-ID and not on Payment-Code. Therefore, we need to create a
separate table, Payment Modes. In addition, the attributes Cardholders-Name and
CreditCardExpiry-Dt depend on CreditCard-No and not on Payment-Code. Therefore,
we need to create another table, Credit Cards. Now, the tables are:
Customers Orders Order Details

Customers Orders Order Details

Cust-Code Order-Code OrderDetail-ID

First-Name Cust-Code Order-Code

Last-Name Emp-Code Prod-Code

Address Order-Dt Quantity

Country Ship-Name Discount

Zip-Code Ship-Address Total-Cost

Phone-No Ship-Country

Ship-Phone

Ship-Dt

Ship-Method-ID

Ship-Method

Freight-Charge

Sales-Tax
Products Payments Employees

Products Payments Employees

Prod-Code Payment- Code Emp-Code

Prod-Name Order-Code First-Name

Description Payment-Amount Last-Name

Unit-Price Payment-Dt Title

Payment-Mode-ID Phone-No

Credit Card-No

Shipment Methods Payment Modes Credit Cards

Shipment Payment Credit Cards


Methods Modes

Ship-Method-ID Payment- Credit Card-No


Mode-ID

Ship-Method Payment-Mode Card Holders-


Name

CreditCardExpiry-
Dt
TABLES AFTER DENORMALIZATION

When we place the information about credit card in a separate table, the query
performance during the generation of payment receipt will get affected due to creation
of joins in every payment receipt. Therefore, for optimum performance, we
denormalize and place the credit card information back into the Payments table. Now,
the tables are as follows:
Customers Orders Order Details

Customers Orders Order Details

Cust-Code Order-Code OrderDetail-ID

First-Name Cust-Code Order-Code

Last-Name Emp-Code Prod-Code

Address Order-Dt Quantity

Country Ship-Name Discount

Zip-Code Ship-Address Total-Cost

Phone-No Ship-Country

Ship-Phone

Ship-Dt

Ship-Method-ID

Ship-Method

Freight-Charge

Sales-Tax
Products Payments Employees

Products Payments Employees

Prod-Code Payment- Code Emp-Code

Prod-Name Order-Code First-Name

Description Payment-Amount Last-Name

Unit-Price Payment-Dt Title

Payment-Mode-ID Phone-No

Credit Card-No

Shipment Methods Payment Modes

Shipment Methods Payment Modes

Ship-Method-ID Payment-Mode-ID

Ship-Method Payment-Mode
PRIMARY AND FOREIGN KEYS

Customers
Primary key: Cust-Code
Orders
Primary key: Order-Code
Foreign keys: Cust-Code, Emp-Code, Ship-Method-ID
Order Details
Primary key: OrderDetail-ID
Foreign keys: Order-Code, Prod-Code
Shipment Methods
Primary key: Ship-Method-ID
Products
Primary key: Prod-Code
Payments
Primary key: Payment-Code
Foreign keys: Order-Code, Payment-Mode-ID
Payment Modes
Primary key: Payment-Mode-ID
Employees
Primary key: Emp-Code
RELATIONSHIPS BETWEEN FINAL TABLES
Order Details Products

Field Name Field Name


1
Field Name
Field Name
OrderDetail-ID Prod-Code
Order-Code
Cust-Code
Order-Code Prod-Name
Cust-Code
First-Name
Prod-Code Description
Emp-Code
Last-Name
Quantity Unit-Price
Order-Dt
Address
Discount
Ship-Name
Country
Total-Cost
Ship-Address
Zip-Code

Ship-Country
Phon e-No
Shipment Methods
Ship-Phone
Field Name
Ship-Dt
Ship-
Ship-Method-ID Method-ID

Ship-Method
Freight-Charge

Payments Sales-Tax
Employees
Field Name

Field Name
Payment-Code
Emp-Code
Order-Code
First-Name
Payment-Amount
Last-Name
Payment-Dt

Title
Payme nt Modes
Payment-Mode-ID
Phone-No
Field Name
CreditCard-No

Payment-
CardHolders-Name
Mode-ID

CreditCardExpiry-Dt
Payment-Mode
BLANK DOCUMENTATION FORMATS

PROJECT ON

Developed by

Name:

Reg. No.:
(Project Title)

Batch Code :
Start Date : End Date:
Name of the Coordinator :
Name of Developer :

Date of Submission :
CERTIFICATE

This is to certify that this report titled embodies the original


work done by in partial fulfillment of their course requirement
at NIIT.

Coordinator:
ACKNOWLEDGEMENT
SYSTEM ANALYSIS

System Summary:
ENTITIES

Number of entities:
Names of entities:
ATTRIBUTES

Attributes:
E/R DIAGRAM
TABLES

Number of Tables:
TABLES AFTER 1 NF
TABLES AFTER 2 NF
TABLES AFTER 3 NF
TABLES AFTER DENORMALIZATION
PRIMARY AND FOREIGN KEYS
RELATIONSHIPS BETWEEN FINAL TABLES

You might also like