Database System -
Database System -
Mr.Nouman Asim
ER Diagram
To be discussed:
• Entity
• Attributes
• Types of Attributes
• Relationships
• ERD representation
• Generalization
• Specialization
• Inheritance
Entity
Types of attributes
Types of Attributes
.
Relationship
.
Mapping Cardinalities
.
One To One
Entity A Entity B
.
One To Many
Entity A Entity B
.
Many To One
Entity A Entity B
.
Many To Many
Entity A Entity B
.
ERD Representation
.
ERD Representation
.
ERD Representation
.
ERD Representation
.
.
.
.
.
Many To Many
Generalization and specialization
.
Generalization
.
specialization
.
.
Key Constrains
Key Constrains
ER Model To relational Model
.
Database Systems
Role of Data in Computer
Data
A collection of facts (numbers, words, measurements, observations, etc) that has
been translated into a form that computers can process
Types of Data
Structured data
Information stored DB
Strict format
Semi-structured data
Data may have certain structure but not all information collected
has identical structure
Some attributes may exist in some of the entities of a particular type
but not in others
Unstructured data
Very limited indication of data type
E.g., a simple text document
Why Study Databases?
“One or more large structured sets of persistent data, usually associated with software to update and
query the data”
Free On-Line Dictionary of Computing
“A collection of data arranged for ease and speed of search and retrieval”
Dictionary.com
Databases