Hello and welcome to the Golang programming language course in the peregrine's session, we talked about
crowd operations, and in this session we want to talk about the others database concept.
E.R. Diagrams, E.R. Diagram is a visual representation of data that describes how data is related to
each other.
In E.R. model, we disintegrate data into entities, attributes and set up relationships between entities.
All this can be represented visually using the inner diagram, for example, in the below diagram.
Anyone can see and understand what the dark wrong wants to convey.
Developer develops that sign, whereas a visitor visits a website.
Components of air diagram, entity attributes, relationships and etc. form the components of E.R. diagram,
and there are defined symbols and shapes to represent each one of their.
Let's see how we can represent these in our yard diagram.
Entity Database Entity is a team, person, place, unit object or any item about which the data should
be captured and this stored in the form of properties, workflow and tables.
Simple, rectangular blocks represent an entity.
Relationships between entities weak and a strong home boss is used to set up relationships between two
or more entities.
Attributes for any entity.
Ellipse is used to represent attributes of any entity.
It is connected to the entity.
Which entity?
A weak entity is represented using double rectangular boxes.
It is generally connected to another entity.
Key attributes for any entity to represent a key attribute, the attribute name inside the ellipse is
underlined.
Derived attributes for any entity, the right attributes are those which are derived based on other
attributes.
For example, age can be derived from date of birth to represent a drive attribute.
Another dot ellipse is created inside the main ellipse multi value attribute for any entity.
Double ellipse.
One inside another represent the attribute, which can have multiple values.
Composite attribute for any entity, a composite attribute is the attribute, which also has attributes
you will see the address composite attribute, which contains other attributes like country, city estate
and a suite.
E.R., Model two relational model, as we all know, that E.R. model can be represented using E.R. diagrams,
which is a great way of designing and representing the database design in more of a flowchart form.
It is very convenient to design the database using the E.R. model by creating an E.R. diagram and literally
converting it into relational modern to design your table.
Not all the E.R. model constrains in components can be directly transformed into relational model,
but an approximate schema can be right.
So let's take a few examples of your diagrams and convert it into relational model schema, hence creating
tables in our DMs.
Entity becomes table.
Entity in your model is changed into tables, or we can say for every entity in our model, a table
is created in relational model and attributes of the entity gift converted to columns of the table,
and the primary key is specify for entity in the E.R. model will become the primary key for the table
in relational model.
Entity relationship model.
In this database, model, relationships are created by dividing object of interest into entity and
its characteristics into attributes.
Different entities are related using relationships.
E.R. models are designed to represent the relationships and to picture real form to make it easier for
different stakeholders to understand, this model is good to design the database, which can then be
turned into tables in relational model.
Let's take an example If we have to design a person database, the student will be an entity with attributes
i.e. the name, age and address as address is generally complex.
It can be another entity Venus Williams Street Name, PIN Code, S.T.A.R., cetera, and there will
be a relationship between then.
Relational model.
In this model, data is organized in two dimensional tables, and the relationship is maintained by
is touring a common field.
This model was introduced by EAF called in 1970, and since then it has been the most widely used database
model.
In fact, we can say the only database model used around the world.
The basic structure of data in the relational is table.
All the information related to a particular type is stored in rows of that table.
Hence, tables are often known as relations in relational model.
In the coming tutorials, we will learn how to design tables in order not to prolong the time of decision.
We will finish it and we will continue the content in the next session.
Goodbye.