A Relational Model
Welcome to this segment on ‘A Relational Model’. In this segment, you will understand the concept of a relational model and the characteristics of a table in it.
A Relational Model
A relational model stores data in the form of tables; these tables are called relations. A relational model is based on the fact that tables are related to each other.
Every table in a relational model has the following characteristics:
- In a relational model database, the name of every table must be unique.
- The name of every attribute of a table must be unique to that table.
- Every table must have a key attribute. The value of this key attribute cannot be the same for any two rows of that table.
- The data type for each attribute must be defined.
- The order of the rows does not matter in relation.
- The order of the attributes does not matter in relation.
Every row or a tuple in a table represents one data record — information about one particular type of entity. Consider Product as a table.
- Product name and Product Brand as columns.
- One row in this table will represent one product each.
- Columns contain the value of each product’s properties.
A relational model is a more detailed implementation of the E-R model. E-R models identify real-world objects, finds properties relevant to business requirements and identify a relation between these real-world objects.
The E-R model is more of a design that is built to understand the business requirements and data the business wants to store. A relational model is more detailed in how actually the schema will be implemented in a system. An entity becomes a table, an attribute becomes a column and the relations are established using foreign keys.