You are on page 1of 10

Topic 9 – Database Design Databases

Databases

Topic 9:
Database Design

V1.0 © NCC Education Limited

Database Design Topic 9 - 9.2

Scope and Coverage


This topic will cover:
• Understanding requirements
• Moving from entities to tables
• Documenting attributes with a data dictionary
• The use of Case tools

V1.0 © NCC Education Limited

Database Design Topic 9 - 9.3

Learning Outcomes
By the end of this topic, students will be able to:
• Understand the process of requirements gathering
• Design a set of database tables from an entity
model
• Document the tables, columns and domains in a
database using a data dictionary
• Understand the use of Case tools

V1.0 © NCC Education Limited

V1.0 Visuals Handout – Page 1


Topic 9 – Database Design Databases

Database Design Topic 9 - 9.4

Systems Analysis
• The art of understanding and documenting the
requirements of a given set of users within the
context of an organisation.

V1.0 © NCC Education Limited

Database Design Topic 9 - 9.5

Systems Development
• The development of the whole system from
beginning to end. This might include a database,
applications, a network etc.

V1.0 © NCC Education Limited

Database Design Topic 9 - 9.6

Approaches
• Traditional systems development lifecycle (SDLC)
or ‘waterfall’ approach

• Iterative approaches

V1.0 © NCC Education Limited

V1.0 Visuals Handout – Page 2


Topic 9 – Database Design Databases

Database Design Topic 9 - 9.7

The Waterfall Lifecycle


Strategy and 
Planning

Feasibility Study

Systems Analysis

V1.0 © NCC Education Limited

Database Design Topic 9 - 9.8

Generic Systems Development


Lifecycle - 1
1. Strategy and planning
2. Feasibility study
3. Systems analysis (or analysis)
4. Design
5. Implementation
6. Maintenance

V1.0 © NCC Education Limited

Database Design Topic 9 - 9.9

Generic Systems Development


Lifecycle - 2
1. Strategy and planning
2. Feasibility Study
3. Systems Analysis (or Analysis)
4. Design
5. Implementation
6. Maitenance

V1.0 © NCC Education Limited

V1.0 Visuals Handout – Page 3


Topic 9 – Database Design Databases

Database Design Topic 9 - 9.10

Problems with Waterfall Approach


• Users have not communicated requirements
properly

• Users have not understood their own needs

• Analyst misunderstood

• Omission

V1.0 © NCC Education Limited

Database Design Topic 9 - 9.11

Iteration
Evaluation

Design and  Analysis
Prototyping

Design and 
Analysis Prototyping

Evaluation

V1.0 © NCC Education Limited

Database Design Topic 9 - 9.12

Prototypes and Prototyping


• Prototype – a first or original example of
something from which others have or will be
developed
• Prototyping – the process whereby a model is
built of part of the envisaged system and user
SF2
feedback on it is gathered. Part of the requirements
gathering process
• Note: a prototype is a thing. Prototyping is
something we do.

V1.0 © NCC Education Limited

V1.0 Visuals Handout – Page 4


Slide 12

SF2 that is?


stephanie.falzon, 09/06/2011
Topic 9 – Database Design Databases

Database Design Topic 9 - 9.13

Database Design - 1

D t b
Database D
Developer
l

Good communications skills – reading,


writing, listening. Interview skill.
Knowledge of techniques to document
requirements etc. etc. etc.

V1.0 © NCC Education Limited

Database Design Topic 9 - 9.14

Database Design - 2
Moving from a set of requirements

To implementing these with Database Technology

V1.0 © NCC Education Limited

Database Design Topic 9 - 9.15

Phases of Database Design


• Conceptual design

• Logical design

• Physical design

V1.0 © NCC Education Limited

V1.0 Visuals Handout – Page 5


Topic 9 – Database Design Databases

Database Design Topic 9 - 9.16

Conceptual Database Design


• Investigation of data needed to support system
• Does not take account of physical implementation
or data model

I what
In h t format
f t
is the data?
What data is held? How is this
the data
used?

V1.0 © NCC Education Limited

Database Design Topic 9 - 9.17

Logical Design
• Data is investigated and design is undertaken
without regard to the DBMS product that will be
used, but that data model (usually the relational
model) is known.

Normalisation Entity relationship


diagram

Design transactions

V1.0 © NCC Education Limited

Database Design Topic 9 - 9.18

Physical Design
• From entities to tables
• Designing the base relations

Indexing D
Denormalisation
li ti

Query tuning
View creation

V1.0 © NCC Education Limited

V1.0 Visuals Handout – Page 6


Topic 9 – Database Design Databases

Database Design Topic 9 - 9.19

Where We Are Now


• Logical design

• Physical design

V1.0 © NCC Education Limited

Database Design Topic 9 - 9.20

Entities to Tables -1
• Most entities will have a one-to-one mapping of
entity to table.

Student Students

V1.0 © NCC Education Limited

Database Design Topic 9 - 9.21

Entities to Tables - 2
• Decompose any many-to-many relationships
A doctor has appointments
Doctor Patient with many patients. A patient
can have many
appointments.

Doctor Appointment Patient

V1.0 © NCC Education Limited

V1.0 Visuals Handout – Page 7


Topic 9 – Database Design Databases

Database Design Topic 9 - 9.22

Entities to Tables - 3
• Some domains will become separate tables

• If a ‘type’ attributes has many values and these


are dynamic,
d i ththen a llook-up
k t bl tto supportt the
table th
domain should be added.
• Product_Type, Student_Type

V1.0 © NCC Education Limited

Database Design Topic 9 - 9.23

Data Dictionary
Domains
Domain StudentType varchar, length 30, must be ‘Overseas’,’Home’
Domain City varchar length 30
Base Relations
Students(StudentID Number NOT NULL,
Address_line1 Varchar (30) NOT NULL
Address_line2 Varchar (30) NOT NULL
City City
StudentType StudentType NOT NULL DEFAULT ‘Home’
PRIMARY KEY (StudentID)
FOREIGN KEY (City) REFERENCES City (City_name));

V1.0 © NCC Education Limited

Database Design Topic 9 - 9.24

Case Tools
• Computer Aided Software Engineering

• Design tools
• Documentation
Doc mentation tools
• Code generators

V1.0 © NCC Education Limited

V1.0 Visuals Handout – Page 8


Topic 9 – Database Design Databases

Database Design Topic 9 - 9.25

Learning Outcomes – Have We


Met Them?
By the end of this topic, students will be able to:
• Understand the process of requirements gathering
• Design
g a set of database tables from an entity
y
model
• Document the tables, columns and domains in a
database using a data dictionary
• Understand the use of Case tools

V1.0 © NCC Education Limited

Database Design Topic 9 - 9.26

References
• Connolly, T. & Begg, C. (2004). Database Systems:
A Practical Approach to Design, Implementation,
and Management, 4th Edition. Addison Wesley.
Chapters 15, 16 & 17.

V1.0 © NCC Education Limited

Database Design Topic 9 - 9.27

Topic 9 – Database Design

Any Questions?

V1.0 © NCC Education Limited

V1.0 Visuals Handout – Page 9

You might also like