Database Slides 5
Database Slides 5
Concepts and
Architecture
Ch.2
Data Models
• Data model
– Collection of concepts that describe the structure
of a database
• structure of a database means the data types,
relationships, and constraints that apply to the data.
– Provides means to achieve data abstraction
Categories of Data Models
https://www.youtube.com/watch?v=9qWjpVtr_Hg
Categories of Data Models
• High-level or conceptual data models
– Close to the way many users perceive data
– e.g. Entity-relationship model (ER)
• Low-level or physical data models
– Describe the details of how data is stored
on computer storage media
• Representational data models (also called
logical or implementation data models)
– Easily understood by end users
– Also similar to how data organized in
computer storage
– e.g. relational model
Schemas, Instances, and Database
State
• Database schema
– Description of a database
• Schema diagram (displayed schema)
– Displays selected aspects of schema
• Schema construct
– Each object in the schema (structure of each record)
• Database state or snapshot
– Data in database at a particular moment in time
Schema diagram & schema construct
A constraint such as
students majoring in
computer science must
take CS1310 before the
end of their sophomore
year is quite difficult to
represent
diagrammatically.
Database state / snapshot
The current set of
occurrences or instances
Data in database at a
particular moment in
time
Same view
(should not be affected)
Physical data independence
The capacity to change the internal schema without
having to change the conceptual schema.