Data model
|
A data model is a model that describes in an abstract way how data is represented in an information system or a database management system.
This term is ambiguously defined to mean:
- how data generally is organized, e.g. as described in Database management system. This is sometimes also called "database model"
- or how data of a specific application is organized logically (e.g. the data model of some business)
Contents |
General Organization of Data
In general the first aspect ("database model") describes the following:
- Structure: defines how data are organized (hierarchical, network, relational, object-oriented).
- Integrity: provides a language for the definition of rules that restrict which instances of the defined structure are allowed.
- Manipulation: provides a language in which updates of the data can be expressed.
- Querying: provides a language in which the data can be queried.
For example in the relational model all data is represented by mathematical relations (or, to be precise, a slightly generalized version thereof). There exists a general language for specifying constraints (first-order logic), and for manipulations and querying the data the relational algebra, tuple calculus and domain calculus are introduced. Additional information about this topic can also be found in database management system.
Organization of Data in a Specific Application (Domain)
For a specific application tables (objects, relations, ..., the naming conventions depend on the general model) are defined, for example "customer", "order", "item" as well as relations between them ("customer orders items").
If a relational model is used, sets of specific constraints (candidate keys, foreign keys) have to be defined (using the appropriate language as defined for the general model, e.g. SQL).
Tools for Creating a Data model for an Application
While simple data models consisting of few tables or objects can be created "manually" large applications need a more systematic approach. The Entity-Relationship Model method is used to establish a domain specific data model. Other methods like the Functional Data Model and Object Role Modeling (ORM) also describe subsets/aspects of a data model and the application based on it. The Unified Modeling Language (UML) is another method more related to object-oriented data models. Especially the "Object Model" part has a number of parallel representations with the Entity-Relationship Model.