Presentation is loading. Please wait.

Presentation is loading. Please wait.

Database Design Principles – Lecture Data Dictionary.

Similar presentations


Presentation on theme: "Database Design Principles – Lecture Data Dictionary."— Presentation transcript:

1 Database Design Principles – Lecture Data Dictionary

2 2 Lecture Objectives Purpose of a data dictionary Building a data dictionary

3 3 Purpose of a Data Dictionary Purpose Use to define the purpose of each table and attribute Describes the table Describes the characteristics of each attribute

4 4 Building a Data Dictionary Data Dictionary template Template used can vary but key information required Table name Column name Data type Length PK/FK? Nulls allowed? Unique? Domain Default

5 5 Building a Data Dictionary Data Dictionary template Table Name: ColumnData Type LengthPKFKNot Null UniqueDomainDefault

6 6 Building a Data Dictionary Data Dictionary template Table name Use a meaningful name i.e. COURSE Column name i.e. CRSE_CODE, CRSE_DESC Data type i.e. CRSE_CODE numeric; CRSE_DESC character Length length of the field (column)

7 7 Building a Data Dictionary Data Dictionary template PK/FK? Is this attribute a PK? If attribute is an FK, identify the table it is PK of Nulls allowed? Are nulls allowed in this field Unique? Does the value of this field have to be unique? By default PK’s always unique

8 8 Building a Data Dictionary Data Dictionary template Domain Is there a range of values that are only allowed in this table? Default Is there a default value for this field no data is stored

9 9 Building a Data Dictionary Data Dictionary template Table Name: Student ColumnData Type LengthPKFKNot Null UniqueDomainDefault Stud_noNum3Y Stud_LnameChar15 Stud-FnameChar15 Stud_PgmChar3PGM (pgm_id) Locker_numNum3Y

10 10 Building a Data Dictionary Data Dictionary template Table Name: Program ColumnData Type LengthPKFKNot Null UniqueDomainDefault Pgm_idChar3YCPA, CPD Pgm_NameChar40Y No_SemstrsNum1Y>=06


Download ppt "Database Design Principles – Lecture Data Dictionary."

Similar presentations


Ads by Google