Hello and
welcome to mapping entities to tables.
In this video,
we will learn how entities are mapped
to a relational database tables.
At the end of this video, you will be able
to explain how an Diagram translates into
a relational database table with rows and
columns.
Entity relationship diagrams are the basic
foundations for designing a database.
In the relational database design,
begin with an Diagram, or
ERD and later map the ERD to
the tables in the database.
In this example,
we use the ERD for entity book.
Entity book has several attributes.
The entity and
its attributes will be mapped to a table.
For ease of understanding, let's
separate the entity from the attributes.
In this case, entity book becomes
a table with the same name, book.
All the attributes translate
into columns in the table.
We will now see how a table
would be represented
in a relational database model.
A table is a combination of rows and
columns.
While mapping,
the entity becomes the table.
Having said that, the table has not yet
taken the form of rows and columns.
The attributes get
translated into columns,
in a table providing the actual
table form of rows and columns.
Later we add some data values
to each of the columns,
which completes the table form.
For the author example,
the entity author becomes the table and
the attributes get translated
columns in the table.
Adding some data values into the columns,
complete the table.
You can now explain how an Diagram
translates into a relational database
table with rows and columns.
Thanks for watching this video.
