filmov
tv
What is a Relational Model? Relational Model | Mapping ER model to Relational Model
Показать описание
Welcome back MechanicaLEi, did you know that the relational model for database management is an approach to managing data using a structure and language? This makes us wonder, What is a relational model? Before we jump in check out the previous part of this series to learn about what an Extended Entity-Relationship model is? Now, In a relational data model, relations are saved in the format of Tables. A table has rows and columns, where rows represent records and columns represent the attributes. A single row of a table, which contains a single record for that relation is called a tuple. A finite set of tuples in the relational database system represent a relation instance. Relation instances do not have duplicate tuples. A relation schema describes the relation name that is the table's name, attributes, and their names. Each row has one or more attributes, known as relation key, which can identify the row in the relation uniquely and Every attribute has some pre-defined value scope, known as attribute domain.
ER Model, when conceptualized into diagrams, gives a good overview of entity-relationship, which is easier to understand and hence, ER diagrams are mapped to relational schema using the following processes: First comes the mapping of entities which starts with creating a table for each entity and then assigning entity's attributes to fields of tables with their respective data types, followed by declaring the primary key. Second comes mapping the relationships, here we create a table for a relationship then Add the primary keys of all participating Entities as fields of the table with their respective data types. If the relationship has any attribute, we add each attribute as a field of the table and Declare a primary key composing all the primary keys of participating entities then finally Declare all foreign key constraints. Hence, we first saw what the relational data model is and then went on to see how ER models can be mapped to a relational model?
In the next episode of MechanicaLEi find out what the advantages of a Relational model are?
Attributions:
ER Model, when conceptualized into diagrams, gives a good overview of entity-relationship, which is easier to understand and hence, ER diagrams are mapped to relational schema using the following processes: First comes the mapping of entities which starts with creating a table for each entity and then assigning entity's attributes to fields of tables with their respective data types, followed by declaring the primary key. Second comes mapping the relationships, here we create a table for a relationship then Add the primary keys of all participating Entities as fields of the table with their respective data types. If the relationship has any attribute, we add each attribute as a field of the table and Declare a primary key composing all the primary keys of participating entities then finally Declare all foreign key constraints. Hence, we first saw what the relational data model is and then went on to see how ER models can be mapped to a relational model?
In the next episode of MechanicaLEi find out what the advantages of a Relational model are?
Attributions:
Комментарии