Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Systems:
Data Centers,
Data Modeling
and Relational
Database
Russel G. Reyes
Lesson Objectives
• Database:
– Organized collection of data
• Record:
– Collection of related data fields
• File:
– Collection of related records
• Database:
– Collection of integrated and related
files
The Hierarchy of Data
Data Entities, Attributes,
and Keys
• Entity:
– A person, place, or thing for which data is
collected, stored, and maintained
• Attribute:
– Characteristic of an entity
• Data item:
– Specific value of an attribute
Data Entities, Attributes,
and Keys
• Key:
– Field or set of fields in a record that is
used to identify the record
• Primary key:
– Field or set of fields that uniquely
identifies the record
The Database Approach
• Data model:
– Diagram of data entities and their relationships
Relational model:
• Describes data using a standard tabular
format
• Each row of a table represents a data entity
(record)
• Columns of the table represent attributes
(fields)
• The domain is the range of allowable values
for data attributes
Tables as Database Objects
Table A Table B
The Relational Database Model
Project
Manager
Proj_Num
MgrID Primary Key
Proj_Name
MgrName
MgrID
Foreign Key
Types of Database Relationship
Table A Table B
Record 1 Record 1
Record 2 Record 2
Record 3 Record 3
Record 4
Record 4
One-to-one relationship
Types of Database Relationship
Table A Table B
Record 1A
Record 1B
Record 1 Record 1C
Record 2A
Record 2 Record 2B
Record 3A
Record 3 Record 3B
Record 3C
Record 3D
Record 4 Record 4A
Record 4B
One-to-Many Relationship
Types of Database Relationship
Table B Table A
Table D
Table C
Lookup
Table E Many-to-Many Relationship
Data modelling using ERD with
Crow Foot Notation
Many-to-
One-to-one many
One-to-many One-to-many
SUMMARY