You are on page 1of 4

Database Design Project

Oracle Baseball League Store Database

Project Scenario:

You are a small consulting company specializing in database development. You have just been awarded the contract to
develop a data model for a database application system for a small retail store called Oracle Baseball League (OBL).

The Oracle Baseball League store serves the entire surrounding community selling baseball kit. The OBL has two types of
customer, there are individuals who purchase items like balls, cleats, gloves, shirts, screen printed t-shirts, and shorts.
Additionally customers can represent a team when they purchase uniforms and equipment on behalf of the team.

Teams and individual customers are free to purchase any item from the inventory list, but teams get a discount on the
list price depending on the number of players. When a customer places an order we record the order items for that
order in our database.

OBL has a team of three sales representatives that officially only call on teams but have been known to handle individual
customer complaints.

Section 2 Lesson 5 Exercise 2: Relationships

Identify the Optionality of Relationships (S2L5 Objective 2)

Relationships are bi directional and must either be mandatory or optional.

Part 1 :
For the relationships identified in the previous exercise write the optionality of the relationship between both entities
(remember the relationship exists in both directions), the first one has been completed for you.

CUSTOMER TEAM
# Number #Id
(#) Email * Name
* Name * Number of players
* Address o Discount
* Phone number
* Current balance
o Team they belong to

Copyright © 2020, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Left to Right
• Each CUSTOMER may represent a TEAM
Right to Left
• Each TEAM must be represented by a CUSTOMER

CUSTOMER SALES
# Number REPRESENTATIVE
(#) Email # Id
* Name (#) Email
* Address * Name
* Phone number * Address
* Current balance * Phone number
o Team they belong to * Commission rate

Left to Right

Right to Left

ORDER
CUSTOMER
# Id
# Number
* Date
(#) Email
* Items purchased
* Name
* Item size
* Address
* Color
* Phone number
* Price
* Current balance
* Number of units
o Team they belong to
* Total Order Price

Left to Right

Right to Left

ORDER
# Id ITEM
* Date # Number
* Items purchased * Name
* Item size * Description
* Color * Price
* Price * Category
* Number of units o Color
* Total Order Price o Size

Copyright © 2020, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

2
Left to Right

Right to Left

ITEM INVENTORY LIST


# Number #Id
* Name * Cost of the unit
* Description * Units on hand
* Price
* Category
o Color
o Size

Left to Right

Right to Left

Part 2 :
Relationship lines represent a bi-directional relationship between two entities therefore you should think of it
as two separate lines that originate from their entity and meet in the middle. Using the descriptions that you
wrote in part 1 complete the relationship lines to represent the optionality of each relationship, the first one
has been completed for you.

CUSTOMER TEAM
# Number #Id
(#) Email * Name
* Name * Number of players
* Address o Discount
* Phone number
* Current balance
o Team they belong to

CUSTOMER SALES
# Number REPRESENTATIVE
(#) Email # Id
* Name (#) Email
* Address * Name
* Phone number * Address
* Current balance * Phone number
o Team they belong to * Commission rate
Copyright © 2020, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

3
CUSTOMER ORDER
# Number # Id
(#) Email * Date
* Name * Items purchased
* Address * Item size
* Phone number * Color
* Current balance * Price
o Team they belong to * Number of units
* Total Order Price

ORDER
# Id ITEM
* Date # Number
* Items purchased * Name
* Item size * Description
* Color * Price
* Price * Category
* Number of units o Color
* Total Order Price o Size

ITEM INVENTORY LIST


# Number #Id
* Name * Cost of the unit
* Description * Units on hand
* Price
* Category
o Color
o Size

Copyright © 2020, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

You might also like