Entity-Relationship (ER) Diagram — Transcript
Full transcript
- 0:01[Music]
- 0:06hello everyone welcome back the most
- 0:09awaited topic of this chapter The Entity
- 0:12relationship diagram which is also
- 0:15called as simply ER diagram let's step
- 0:18into the topics of the day what we are
- 0:20going to learn in this presentation we
- 0:23are going to understand the entity
- 0:25relationship diagram which is the ER
- 0:27diagram and also we are going to
- 0:29understand this ER diagram with the help
- 0:31of the basic structure and components of
- 0:34the ER model while waiting let's step
- 0:37into the topic of the day the ER diagram
- 0:40as I mentioned ER diagram means it is
- 0:43the entity relationship diagram we know
- 0:45what is an entity and we know how
- 0:47relationship is also formed among
- 0:49entities so this diagram is going to
- 0:52basically involve the entities and the
- 0:54relationship among the entities and we
- 0:57also have seen the basic components of
- 0:59the ER model which which are the entity
- 1:00sets the attributes and the relationship
- 1:03sets let's start with the basics of this
- 1:06ER diagram now basically this ER diagram
- 1:09is used to express the overall logical
- 1:12structure of a database we have already
- 1:14seen about the ER model which is mainly
- 1:16used for expressing the overall logical
- 1:19structure of a database and we know ER
- 1:21model is a high level data model and
- 1:24basically this ER diagram is a graphical
- 1:27representation so it is depicted or
- 1:30portrayed as diagrams so er model when
- 1:33it is portrayed as diagrams they are
- 1:35represented as ER diagrams and that is
- 1:38why it is mentioned that this is a
- 1:40graphical representation and as I
- 1:42mentioned a picture is a worth of
- 1:44thousand words so it's easy to
- 1:47understand things with the picture and
- 1:49that to when it involves a lot of
- 1:50complexities instead of having a written
- 1:53or a verbal communication if things are
- 1:56represented with the help of diagrams it
- 1:58has more advantages and hence these are
- 2:02simple and clear while looking at the
- 2:04diagram itself we will be able to
- 2:06understand how many relations are there
- 2:08I mean how many tables are there what
- 2:10are the attributes in the table how
- 2:12relationships are formed among the
- 2:14entities which is a primary key
- 2:15attribute is there any weak relationship
- 2:18Etc and because of its Simplicity and
- 2:21the very clear nature of depicting the
- 2:23things it has a widespread usage in the
- 2:26database deployment areas we are done
- 2:29with the basics of ER diagram let's step
- 2:32into the notations that are used in the
- 2:34ER diagram when we talk about entities
- 2:37The Entity set is actually represented
- 2:39using rectangle and if it is a single
- 2:41rectangle it means it is a strong entity
- 2:44set and when things are represented with
- 2:46double rectangle then it is a weak
- 2:48entity set don't worry about this what
- 2:51is a strong entity set and what is a
- 2:52weak entity set now anyway I'm going to
- 2:55show you some examples shortly that time
- 2:57I will explain you what is strong entity
- 3:00set and what is weak entity set with
- 3:02some examples so this is about the
- 3:04entity set and what about the
- 3:06relationship when we have strong entity
- 3:09set and weak entity set we also do have
- 3:12strong relationship and weak
- 3:14relationship when relationship is
- 3:16expressed with a single Diamond it is
- 3:18strong relationship if it is depicted
- 3:21with two diamonds or a Double Diamond it
- 3:24is a weak relationship anyway when we
- 3:27understand strong entity and weak entity
- 3:29that time I will explain you what is
- 3:31strong relationship and what is weak
- 3:33relationship just recollect what are the
- 3:35basic components of ER diagram or ER
- 3:37model The Entity sets the relationship
- 3:41what is missing attributes and these
- 3:43attributes in ER diagram are represented
- 3:46like this we have already seen about
- 3:47this in the previous presentation single
- 3:49oval it is simple attribute or single
- 3:52valued attribute and composite attribute
- 3:54is represented like this multivalued
- 3:57attribute is represented with double
- 3:58oval and derived attribute is expressed
- 4:01with dotted oval and remember we also
- 4:04have null values in the attribute level
- 4:06so these are the notations that are used
- 4:09in the ER diagram in order to understand
- 4:11things clearly let's see few examples
- 4:14and things will be easy for you to
- 4:16understand let me show you a part of the
- 4:18ER diagram here it is this instructor is
- 4:23an entity student is an entity
- 4:26instructor and student have advice is
- 4:28relationship so in instructor advises
- 4:31student and what are the attributes of
- 4:33instructor relation the instructor ID
- 4:35name and salary what are the attributes
- 4:38of student entity student ID name and
- 4:41credits earned so this is how actually
- 4:44an ER diagram is represented now when
- 4:47you look into this it is a simple
- 4:50rectangle and it is a simple diamond
- 4:52symbol so it means this is a strong
- 4:54entity and this is also a strong entity
- 4:57and if we represent with double I mean
- 4:59double rectangle or Double Diamond then
- 5:02it is a weak entity or weak relationship
- 5:04let's see that shortly there are some
- 5:07conventions that represents ER diagram
- 5:09like this but in this lecture series I'm
- 5:12going to represent the same kind of ER
- 5:14diagram like this can you see here I'm
- 5:16going to represent entity and attributes
- 5:18like this so the first half is the
- 5:20instructor which is the name of the
- 5:22entity set like here and the attributes
- 5:25are represented like this ID name and
- 5:27salary which are the attributes ID name
- 5:29salary here and the same advises
- 5:32relationship here and the equivalent for
- 5:34this entity student is represented like
- 5:36this student with the attributes ID name
- 5:39and credits can you see here ID name and
- 5:41credits and again this is a strong
- 5:43relationship only because it is
- 5:45represented with single Diamond if it is
- 5:48Double Diamond then it is a weak
- 5:49relationship now you may be wondering
- 5:51what is a strong relationship and what
- 5:53is a weak relationship let me explain
- 5:55that now let me take the same a diagram
- 5:58and go to a new page in order to depict
- 6:00this so let me focus on only this part
- 6:04now when you look into this this is an
- 6:06ER diagram that has only two relations
- 6:08or two tables or two entities to be
- 6:11precise instructor entity and student
- 6:14entity and what is the relationship it
- 6:16is advises relationship I mean
- 6:19instructor advises student I'm going to
- 6:23bring in something from the previous
- 6:25lecture can you recollect this we have
- 6:28seen the basic structure and components
- 6:30where the relationship among the
- 6:32entities are depicted if you are
- 6:35directly watching this lecture I request
- 6:37you to watch my previous lecture I mean
- 6:39part two of the ER model in order to
- 6:41understand things better this is the
- 6:43entity set instructor and this is the
- 6:45entity set student and we have advises
- 6:48relationship and the same is here the
- 6:50instructor entity set student entity set
- 6:53and advises relationship now what is
- 6:55additional here the date attribute that
- 6:58gives more information about the
- 7:00relationship when the relationship is
- 7:02formed I mean on what date this
- 7:05instructor is assigned as the adviser
- 7:07for this particular student let me take
- 7:10John John is appointed as the instructor
- 7:13for Jennifer on third of May 2024 now
- 7:17there is an attribute here and what
- 7:19attribute is this it's a date attribute
- 7:22that gives more information about this
- 7:24relationship isn't it how this is
- 7:26represented in ER diagram we are going
- 7:28to use dotted lines with the attribute
- 7:32date in order to tell the relationship
- 7:34attribute what is this relationship and
- 7:37what attribute it is date attribute that
- 7:40tells or gives more information about
- 7:42the association when the instructor is
- 7:45assigned as the adviser to the student
- 7:48so what is this diagram this is the
- 7:51attribute attached to the relationship
- 7:53set what is the relationship set the
- 7:56advises is the relationship set that has
- 7:59an attribute that is attached to this
- 8:01relationship set isn't it so we use
- 8:04dotted lines in order to represent this
- 8:06remember what is a dotted line it is an
- 8:09attribute attached to a relationship set
- 8:12what is this it's a line line means it
- 8:16is used to connect the entity with the
- 8:17relationship set or the relationship set
- 8:20with the entity so two entities are
- 8:23associated with the help of relationship
- 8:25set and lines are used to connect the
- 8:27entity with the relationship set so
- 8:30remember two types of lines are here the
- 8:32dotted line and the straight line so
- 8:35dotted lines are to connect the
- 8:37attribute with the relationship set so
- 8:39attribute attached to the relationship
- 8:41set is represented using dotted line and
- 8:44straight line is used to connect the
- 8:46entity or entity set with the
- 8:47relationship let's see another example
- 8:50and what we are going to see now the
- 8:52strong entity set if you see the
- 8:55relationship is with single Diamond so
- 8:57obviously this is a strong relationship
- 8:59and at the same time if you see here
- 9:01this is also single rectangle only so
- 9:04this is a strong entity set and this is
- 9:06also strong entity set now we need to
- 9:08understand what is a strong entity set
- 9:11when an entity has a primary key
- 9:13attribute then it is a strong entity set
- 9:16because this entity set is not depending
- 9:19on any other entity because it has a
- 9:23primary key attribute which helps in
- 9:25identifying the records uniquely
- 9:27similarly coming to this entity set
- 9:29student we also have a primary key
- 9:31attribute here so the relationship that
- 9:34is formed between two strong entity set
- 9:37is going to be a strong relationship
- 9:39only and that is why this relationship
- 9:41is a strong relationship I hope now you
- 9:43are able to understand what is a strong
- 9:45entity set the entities in the strong
- 9:48entity set are not dependent on other
- 9:50entity also it will have a primary key
- 9:54attribute let's now see the weak entity
- 9:56set here is an example for weak entity
- 10:00can you see here it is represented using
- 10:02Double Diamond so when it is represented
- 10:04with Double Diamond it is a weak
- 10:07relationship and also what are new
- 10:09things here this is a strong entity set
- 10:12but this is a weak entity set the reason
- 10:14is there is no primary key attribute and
- 10:17the attributes are underlined with
- 10:19dashed lines so from this it's clear
- 10:21that there is no primary key attribute
- 10:24like this attribute in this course
- 10:25relation however in section there is no
- 10:28primary key attribute since there is no
- 10:30primary key attribute this is a weak
- 10:32entity set so the relationship formed
- 10:35between a strong entity set and this
- 10:37weak entity set is a weak
- 10:39relationship also we have double light
- 10:42what does it mean this is dealing with
- 10:44the participation whether it is a total
- 10:46participation or an optional
- 10:48participation or partial participation
- 10:51don't worry about this now we have an
- 10:53exclusive lecture that deals with
- 10:55participation so for now just understand
- 10:58double lines deals with with total
- 11:00participation the entities present in
- 11:02the entity set must compulsorily
- 11:04participate in at least one entity in
- 11:07the relationship anyway I will explain
- 11:09more about this later also we have an
- 11:12arrowed line here there are some
- 11:14conventions that uses arrowed line to
- 11:17represent the cardinality ratio or the
- 11:19cardinality number but in this lecture
- 11:21series we are going to represent
- 11:23something different because here the
- 11:25exact numbers cannot be specified anyway
- 11:27in the coming presentation you are going
- 11:29to understand about the mapping
- 11:30cardinalities in diagram for now just
- 11:33understand this is a weak relationship
- 11:35This Is the participation related and
- 11:38this is cardinality related so this
- 11:40example is for a weak entity set because
- 11:44this entity set has no primary key
- 11:46attribute also the attributes are
- 11:48dependent on a strong entity set in
- 11:50order to ensure its existence when we
- 11:54see an example for ER diagram we will be
- 11:56able to know things better since we are
- 11:58going to deal about the participation in
- 12:00the coming presentation I'm going to
- 12:02ignore this for now what about this this
- 12:05is actually the cardinality ratio isn't
- 12:07it so here instructor and student are
- 12:11having a relationship instructor advises
- 12:13student and what is the cardinality
- 12:16ratio this is represented with some
- 12:18numbers here so no worries this is the
- 12:21way to represent the cardinality limits
- 12:23in the next presentation I will tell you
- 12:25the numbers here and how it differs when
- 12:27we give numbers here and here
- 12:30so this is how cardinality limits are
- 12:32represented in the ER diagram let's see
- 12:35the next example here is an example of
- 12:38an instructor entity this instructor
- 12:41entity has ID name address phone number
- 12:46date of birth age and salary as the
- 12:49attributes I request you to pause this
- 12:51video for a while and compare this with
- 12:54the type of attribute that we have seen
- 12:56in the recent lecture
- 12:59I hope you are done from this we can say
- 13:03this is a primary key attribute this is
- 13:05a composite attribute right so name has
- 13:08first name middle name and last name
- 13:10what about the attribute address this is
- 13:12a complex attribute because it has
- 13:15Street and Street has Street number
- 13:17street name and apartment number and
- 13:20what are the other attributes in the
- 13:21street it's city state and zip zip or
- 13:25postal code so remember this is a
- 13:27composite attribute under another
- 13:29composite attribute and what about this
- 13:31phone number we have seen this phone
- 13:33number is a multivalued attribute so
- 13:35multivalued attributes are represented
- 13:37using this flow brackets and what about
- 13:40date of birth this is a single valued
- 13:43attribute this is simply mentioned just
- 13:44like that single valued attribute or
- 13:47even simple attributes what about this
- 13:50age this age is a derived attribute from
- 13:53which attribute this age can be derived
- 13:55from this date of birth attribute and
- 13:57that is why age is represented with
- 13:59parenthesis meaning it is a derived
- 14:02attribute what about salary this is a
- 14:05simple attribute because this is atomic
- 14:07in nature which cannot be decomposed
- 14:09into further components or further
- 14:11values so salary is a simple attribute
- 14:14which is just like that represented so
- 14:17what we understand from here is this is
- 14:19how an entity is represented with
- 14:21different types of attribute now I want
- 14:24to show one more thing here which is
- 14:26this we have only one entity
- 14:29which is course which has course ID as
- 14:32the primary key attribute which has
- 14:33other attributes like title and credits
- 14:36and we also have a relationship and this
- 14:39relationship is a strong relationship
- 14:41only and the relationship is
- 14:43prerequisite is it a binary relationship
- 14:46no a binary relationship is formed
- 14:49between two entity sets but here we have
- 14:51only one entity and we have this
- 14:53relationship achieved with the help of
- 14:56course ID and prerequisite ID then what
- 14:59kind of relationship is it it is
- 15:01recursive relationship I will elaborate
- 15:04about this recursive relationship in the
- 15:06a diagram examples but for now I will
- 15:08just give you only few things let's say
- 15:10there are two courses here course one
- 15:12and course two let's say course two that
- 15:15requires course one as a prerequisite
- 15:17let's say if one student has to undergo
- 15:19course two then course one should have
- 15:22been completed in that case course one
- 15:25and course two are interl so that course
- 15:27two can be complet
- 15:29if and only if course one is completed
- 15:32and that is why these kind of
- 15:34relationship are represented as
- 15:35recursive relationship I'm not
- 15:37articulating more about this because we
- 15:39are going to see that when we see some
- 15:41examples in the ER diagram now let me
- 15:44show you another example just tell me is
- 15:47it an attribute or an entity it is an
- 15:50entity right if it is an attribute we
- 15:53have already seen in this presentation
- 15:55it is connected with a dotted line so
- 15:57that this is a descriptive attribute we
- 15:59have seen date as an example but here
- 16:01this is Project which is an entity set
- 16:03not an attribute like instructor like
- 16:06student and these three are strong
- 16:09entities and that is why we have a
- 16:11strong relationship now what this
- 16:13example is all about this is an example
- 16:17for tary relationship because this
- 16:19relationship is formed between three
- 16:21entities instructor project and student
- 16:25remember the third entity is connected
- 16:28with the help of dotted lines because
- 16:30this exist only when these two exist
- 16:33remember these dotted lines or dashed
- 16:35lines are used to link attributes of a
- 16:38relation to the relationship set or it
- 16:40is used in a tary relationship and
- 16:42that's it guys what are the topics we
- 16:44have seen in this presentation we have
- 16:46seen the entity relationship diagram
- 16:48which is the ER diagram with various
- 16:50notations that are used in the ER
- 16:52diagram and also we have understood the
- 16:54basic structure and components of the ER
- 16:56model with the help of some examples in
- 16:59E
- 17:00diagram I hope the session is
- 17:02informative and thank you for watching
- 17:06[Applause]
- 17:08[Music]
About this transcript
This page contains the full transcript of Entity-Relationship (ER) Diagram by Neso Academy, generated from the public captions YouTube serves with the video. The transcript has 2,833 words across 421 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.