Data Models can be defined as the structure of a database. It is collection of conceptual tools for describing data, data relationships, data semantics and consistency constraints. Any tool, which provides a way to describe the design of the database in a logical way, is called a data model.
The Entity-Relationship (ER) Model
The ER model is based on a perception of a real world that consists of a collection of basic objects called entities and of relationships among these objects. An entity is a thing or object. Entities are described in a database by a set of attributes. A relationship is an association among several entities.
For example, ‘customer’ and ‘account’ are entities in a banking database. Customer-ID, name are the attributes of a customer. Customer and account are related with each other.
The overall logical structure of a database can be expressed graphically by an E-R diagram, which is built up from the following components:
· Rectangle, which represents entity sets.
· Ellipse, which represents attributes.
· Diamond, which represents relationships among entity sets.
· Line, which link attributes to entity sets and entity sets to relationships.
Relational Model
The relational model uses a collection of tables to represent both data and the relationships among that data. Each table in this model has multiple columns and each column has a unique name. The relational data model is the most widely used data model and a vast majority of current database systems are based on this model. The relational model is at a lower level of abstraction than the E-R model. Database designs are often carried out in the E-R model and then translated to the relational model.
No comments:
Post a Comment