Sie sind auf Seite 1von 10

QUESTION:

HOW TO EFFECTIVELY CREATE A RELATIONAL DATABASE


BUILD ON THESE ASPECTS:
CONCEPTUAL
LOGICAL
PHYSICAL
INSTRUCTIONS:
YOU ARE TASKED TO MAKE A DOCUMENT THAT WILL SERVE AS YOUR
GUIDE IN CREATING AN EFFECTIVE RELATIONAL DATABASE. MAKE SURE
THAT YOU WILL BE ABLE TO COMPILE A GOOD DOCUMENTATION WITH
COMPLETE INFORMATION AS TO HOW YOU WILL BE ABLE TO CREATE
EFFECTIVE RELATIONAL DATABASE. THIS ACTIVITY WILL CULMINATE
WITH YOU MAKING A SAMPLE RELATIONAL DATABASE. YOU WILL BE
ASKED LATER ON ABOUT HOW THESE DATABASE WERE PUT TOGETHER
AND YOUR REASONS FOR MAKING SUCH DATABASE THE WAY IT WAS
CREATED.

COMPILE THIS IN A DOCUMENT FILE AND NAME IT RDBASEGUIDE. NOTE


THAT YOU ARE TO STUDY YOUR DOCUMENT AS THIS WILL BE THE BASIS
WHERE YOUR QUESTIONS WILL BE COMING FROM.
HOW TO EFFECTIVELY CREATE A
RELATIONAL DATABASE
YOU MUST CONSIDER SUCH AS;
COCEPTUAL
- States that what the system contains.
LOGICAL
- States that how the system be implemented.
PHYSICAL
- States that how the system be implemented using a specific DBMS.
DATABASE DESIGN OBJECTIVE

A well-designed database shall:


Eliminate Data Redundancy: the same piece of data shall not be stored in more than
one place. This is because duplicate data not only waste storage spaces but also
easily lead to inconsistencies.
Ensure Data Integrity and Accuracy:
To do more
RELATIONAL DATABASE DESIGN PROCESS

Step 1: Define the Purpose of the Database (Requirement Analysis)


Step 2: Gather Data, Organize in tables and Specify the Primary Keys
Step 3: Create Relationships among Tables
Relationships
Having established a definition for the term Functional
Dependency we now need to explore the different types
of relationships that can exist between attributes in
different entities:

There are 3 types of relationships that can exist:

One to One Relationships


One to Many Relationships
Many to Many Relationships

Now lets take a closer look at each of these on the next


slides
ENTITY RELATIONSHIPS

One-to-one
A blind person owns a guide
dog which is exclusively
theirs.

J. Smith Rover

B. Jones Pippa

A. Gray Patch
ENTITY RELATIONSHIPS

One-to-many
A doctor may have many
patients, but a patient is
assigned to only one doctor.

Grant
Dr Ache Allan
Mark
Dr Payne Jane
Amy
ENTITY RELATIONSHIPS

Many-to-many
A film may have many stars
and each star may act in
many films.

Star A
Film X
Star B
Film Y
Star C
EXAMPLES REQUIREMENTS DEFINITION
Salesperson Salesperson Sales Customer Customer Warehouse Warehouse Sales
Number Name Area Number Name Number Location Amount
3462 Walters West 18765 Delta Systems 4 Fargo 13540
18830 A.Levy & Sons 3 Bismark 10600
19242 Rainer & Co. 3 Bismark 9700
3593 Dryne East 18841 R.W.Flood Inc. 2 Superior 11560
18899 Seward Systems 2 Superior 2590
19565 Stodola's Inc. 1 Plymouth 8800

Does each salesperson have their own sales area?


Does each customer deal with only one salesperson ?
Does each customer only receive goods from one warehouse?

The answer to these questions will influence how we structure


the database system.

The answer to these questions and others make up the


Requirements Definition
FUNCTIONAL DEPENDENCY - PRACTICAL
EXAMPLE

SALES Order Number is the primary key.


Order Number
Acc.No. The value for each attribute of SALES,
Customer except Item Price, depends upon the value
of the primary key.
Address
Date All attributes of SALES, except Item Price,
Item are Functionally Dependent on the
Quantity primary key
Item Price Item Price is Functionally Dependent on the
Total Cost the attribute Item

Das könnte Ihnen auch gefallen