A data model determines the logical structure of a database and fundamentally determines in which manner data can be stored, organized, and manipulated, representing a real world scenario. Data models are based on data, data relationship, data semantic and data constraint.
A data model provides tools and languages for describing:
- Conceptual/logical and external schema defined by the data definition language (DDL)
- Integrity constraints, domains defined by DDL
- Operations on data defined by the data manipulation language (DML)
- Directives that influence the physical schema (affects performance, not semantics).
lets learn some data models that originated in the 1970s.
Why study the older data models ?
Older data models were based on the following themes.
- Data redundancy
- Physical data independence
- Logical data independence
- High level language
These themes are still relevant today for structured data and application driven data stores. Also we should know the older data models, so that we do not repeat their short comings when designing new database systems. As historians have said –
“Those that do not understand the mistakes of their ancestors will end up repeating them”
Common data models are:
- Flat File Model :
- The flat file model consists of a single, two-dimensional array of data elements, where all members of a given column are assumed to be similar values, and all members of a row are assumed to be related to one another.
- Hierarchical model :
- In hierarchical data model, the data is organized into a tree-like structure. The data is stored as records and the records are connected to one another through links. A record is a set of fields, where each field contains only one value. The entity type of a record defines which type of fields the record contains.
- Network model :
- This model organizes data using two fundamental constructs, called records and sets. Records contain fields, and sets define one-to-many relationships between records: one owner, many members.The network data model is an abstraction of the design concept used in the implementation of databases.
- Relational model :
- The relational model represents data in terms of tuples, grouped into relations. data is managed using a structure and language consistent with predicate calculus.
- Object-relational model :
- This model is similar to a relational database model, but with support of objects, classes and inheritance in database schemas and in the query language.
- Star schema :
- The star schema refers to a model where a “fact table” is present along with many “dimension tables”. The star schema is considered an a special flavor of the snowflake schema.