Presentation is loading. Please wait.

Presentation is loading. Please wait.

Conceptual and Physical Database Design

Similar presentations


Presentation on theme: "Conceptual and Physical Database Design"— Presentation transcript:

1 Conceptual and Physical Database Design
Consideration of Implementation Details

2 Terminology Entity Field Attribute Record File Key field Primary Key
Minimal Combination Candidate Nonkey field Foreign key Secondary key See “Designing Fields,” p. 307.

3 Entity Relationship Diagrams
Entity - represented as a rectangle: Attribute – represented as an oval: Relationship - represented as a diamond:

4 ERDs (continued) Entity - singular noun Relationship - active verb
one-to-one one-to-many many-to-many

5 ERDs (still more) Cardinality Modality pertains to number
pertains to necessity of the entity’s participation in the relationship

6 Database Design Normalization
Progressively restrictive forms Aim: flexibility and elimination of redundancy Note: We will use the standard notation to show tables.

7 First Normal Form (1NF) 1NF record contains no repeating groups
may require use of combination key for primary key see examples in text

8 Second Normal Form (2NF)
2NF record is already in 1NF, and every field in the record is dependent on the entire primary key. Note that if the primary key of a 1NF record is a single field, then the record is in 2NF. 2NF is desirable to promote database consistency, to reduce overhead in adds, deletes, and changes

9 Creation of 2NF Records To go from 1NF record with combination key to 2NF, create a new record for each primary key field, then for all combinations of primary key fields; place each remaining field with the appropriate primary key (the minimal key), then eliminate records having no nonkey fields.

10 Third Normal Form (3NF) A record is in 3NF if
it is in 2NF and no nonkey field is dependent on another nonkey field.

11 Other forms . . . Boyce-Codd Normal Form - slightly more restrictive (stronger) than 3NF if a non-key can determine another non-key, another relation should be formed 4NF - a key determines no more than one set of dependent values 5NF - beyond the scope of this course

12 More DBMS Terminology DDL Schema Subschema DML SQL QBE tuple
Data dictionary DBA data independence consistency redundancy referential integrity relation attribute

13 Conceptual Database Models
Can you name them without looking at the book?

14 Conceptual Database Models
Hierarchical Network Relational Object-oriented

15 Hierarchical Oldest Parent/child paradigm Disadvantages
1 parent : 1 or many children Disadvantages complex data restructuring is painful

16 Network Defined by CODASYL Allows modeling of complex relationships
Preceded relational model Efficient implementations delayed popular acceptance of relational model. Data restructuring is painful

17 Relational Simple (relatively speaking) Flexible
Some changes to data base structure can be made without restructuring the entire data base. Logical data independence is more readily achieved.

18 Relational Database Model
This is the predominant model today. Database is like a collection of tables (relations).

19 Object-oriented Relies on OO design Still maturing

20 Files (terms) block logical record physical record organization access
master file transaction file blocking factor buffer

21 Access Methods Sequential Direct (random) Indexed sequential

22 File Organizations Sequential Relative Indexed sequential access only
random access only Indexed sequential or . . . random

23 Database and/or File Design
DFD is a possible starting point. Entity class diagram is a starting point. Create an ERD. Identify candidate keys. Create 3NF record designs? Consider access frequencies, data volumes, other factors. Consider access methods. Choose a database model and/or determine files. Consider denormalization?


Download ppt "Conceptual and Physical Database Design"

Similar presentations


Ads by Google