You are on page 1of 32

Data Design

CHAPTER 6
One
database

One system/application Several tables


One table
Data Model
• Entity: Unique and distinct object used to collect and store data
– Attribute: Characteristic of an entity

Data dictionary: Description of all tables in the database created


by the user and designer

5
Keys
• Consist of one or more attributes that determine
other attributes
• Used to:
– Ensure that each row in a table is uniquely
identifiable
– Establish relationships among tables and to
ensure the integrity of the data
• Primary key (PK): Attribute or combination of
attributes that uniquely identifies any given row
• Foreign key (FK) : Field/fields that points to the
primary key of another table.
6
Figure 2.2 - A Relational Diagram

7
8
Data Sources and User
Module Process User Interface

Manage Book Add data Librarian Add data

Data Delete data Librarian Edit/delete data

View data Librarian, student View records

Edit data librarian Edit/delete data


Interface ADD BOOK
Interface EDIT/DELETE BOOK
Interface EDIT BOOK
Interface VIEW BOOK
Data Dictionary
Table BOOK
Field name Description Data type Constraint
B_ISBN_ISSN ISBN ISSN book VARCHAR2(100) PK, NOT NULL
B_MATERIAL Book material VARCHAR2(100)  
B_TITLE Book title VARCHAR2(300)  
B_PUBLISHER Book publisher VARCHAR2(50)  
B_AUTHOR Book author VARCHAR2(100)  
B_YEAR Publication Year YEAR  
B_SUBJECT Book Subject VARCHAR2(200)

And more attributes


Table ACCESSION_NO
Field name Description Data type Constraint
AN_ACCESSION_NO Book Accession number VARCHAR2(50) PK, NOT NULL
AN_EDITION Book Edition VARCHAR2(50)  
B_ISBN_ISSN ISBN ISSN book VARCHAR2(100) FK
Exercise

Create data
dictionary
based on this
interface.
Data Dictionary
Data Dictionary (cont.)
Relationships
Figure 2.3 - The ER Model Notations

20
THANK YOU

You might also like