Building blocks of a Data Model
A data model is a structure of the data that contains all the required details of the data like the name of the data, size of the data, relationship with other data and constraints that are applied on the data. It is a communication tool.
A data model is essential in order to store the database in a sorted manner. It will provide the interaction between the system analyst, designer and application programmer. It improves the understanding of designing of the database in which the organization is interested.
A data model constitutes of building blocks. They are:
1. Entities 2. Attributes 3. Relationships 4. Constraints
These are explained as following below in brief.
Entities are real time objects that exist.It can be a person, place, object, event, concept. Entities are represented by a rectangle box containing the entity name in it.
Example: Student, employee.
It is the set of characteristics representing an entity.It is represented by a ellipse symbol with attribute name on it.
Example: A student has attributes like name, roll number, age and much more.
It describes the association between two entities.It is represented using diamond symbol containing relationship name with it.The data model generally uses three kinds of relationships:one to many, many to many, one to one.
Example: The relationship between two entities Student and Class has many to many relationship.
Constraints are conditions applied on the data.It provides the data integrity.
Example: A student can take a maximum of 2 books from the library is applied as a constraint on the student database.
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.