Tip:
Highlight text to annotate it
X
Once again welcome to ITSE2309, today we'll be talking about Chapter 4 Entity Relationship
Modeling. I'd like to go back and pick up on an example I been using before, and that
has to do with the architect and the bathtub, and how I mentioned that you know if you see
a bathtub, there's an implied process of infrastructure support. which would be the water supply,
and the you know hot and cold water, and the waste water side the drain. I mean that just
the fact, of the picture there's an implied infrastructure to support that idea. Now,
in this chapter what we're going to do is we're going to graphically represent how data
flows through a model. Just like plumbing, water flows down hill there's an implied process
on how data flows through database system. Now, we had talked about the graphical representation
in the models that are used. So there is the Chen model, there is the Crow's Foot model
and there is the UML model, so there's three different models...and the distinction is
that some of those models are theoretical in application, more conceptual some of them
are more, what's the word I am looking for - ah implementation. So you can draw it which
is separate from building it. So in this process of graphical representation the different
models that are used to are used to signify how conceptualization would happen, separate
and apart by the actual physical building of it, and then once it is built the final
physical representation of what's going to happen, so the reason there are these different
models: the idea, the putting the idea on paper and then actually final product.
And usually you know, if you have a,like when you build a house, you're building it and
you say you know what are you going to paint the counters, but you don't know what the
counter or the walls are going to be, there's the idea that yes we're going to paint the
wall, well what color are you going to paint the wall? So there's this evolution process
that evolves. Now as in any process when you are going to
begin with new ideas; because this chapter will have new definitions, terms, concepts.
So to deal with the idea of terms, definitions and concepts we'll be using entities, we'll
be using attributes, we'll be introducing domains, and we'll be using identifiers. We
have 4 general concepts that'll be used to explain the process that we are doing. Also
understand that in this itemization item, there could be a 1 to 1 relationship, a 1
to many relationship, a many to many relationship so you have to graphically identify these
processes. So you have to identify whether it's going
to be a singular event or a plural event. which would help you understand how things
are going. As in any graphical representation there is a tendency to use symbols, now just
as you know when you see a tub, drawn on a piece of paper you know what a tub is and
you know what an electrical outlet is, when you stet to do data flow the Chen model, the
Crow Foot model and the UML have unique identifiers. So the Chen model uses the oval, uses the
diamond and uses a rectangle. The Crows Foot tends to center around the box, or the rectangle
and this one you have the primary key and the data that supports, and then you have
the UML process. Now the Chen diagram is more of the idea type thing this is where you are
going to draft it out and this is what you wanna do. The Crow's Foot is more of what
its going to look like when it gets through. And then this would be the actual product.
So you go from the idea of what I want to do this is how I am going to do it, and then
this is what its going to look like when I get through, after you finish this is the
final product no just as in the plumbing scenario water goes downhill the idea is how do you
graphically represent how data will flow through this process, well they use different graphical
representation. There is the use of a solid line, which has a unique concept, you have
the dashed line that has a unique concept,and you also have the idea of the chevrons now
these items to give you an idea so if you see a piece of paper and you see this you
know which way things are happening, you know where data starts where data goes...now understanding
about relational databases so all this stuff also signifies not only the way data but is
also recognizes signifies how the data is related as it is flowing together. There's
also the idea that sometimes pictures do not give enough information, so there's also the
introduction of 1 to many, 1 to 1, or many to many scenario to help get the idea across
of how information flows. Also there's a lot of text involved, so there's also the use
of text, so on the line they'll add text, sometimes you see "generates," so there is
the line, the chevron, with text with numbers. All these items are used to get the idea across
of what's happening in the database. Now the textbook uses several examples the
two that are used, actually there are three used, there's one about a car. For example
they have where a car so this would be the car, it has a VIN number, a car could have
a year, a car could have a model number and a car could have a color, now understand that
on the color, you can have many types of color. A car can only have one VIN, a car can only
have one year, a car can only have one model but a car can have many colors. So in this
process how do you signify that there's only one VIN, there's only one year, there's only
one model but there are many colors that that car could come in. So you have to help with
these lines. So what the lines will tell you that there's a 1 to 1, 1 to many scenario.
The other one that is used that is used extensively in this item is the idea of
a school and this is where it gets a little bit more complicated in that they use the
idea of a professor and a class, ok so you have a professor and a class. Now there's
a lot of activity that happens that before a professor can have a class, you have to
have students, now before the student can go into the class he has to enroll. So even
though, remember I told you about the implied infrastructure, where you have the tub and
water has to flow down hill? Well as you're drawing this stuff if a students going to
be in class, he has to enroll, so that implied infrastructure that's supporting the methodology
is the idea that as you're drawing this thing out you have to kind of over super impose
the idea that in order for the class to exist the student has to enroll. That's a separate
activity that allows the other activities to unite.
Ah, as you progress through this process you could also limit some of the activities. For
example, how many classes typically does a student have the ability to enroll into? One
to four? So as you are doing this what you could is you could say that a student could
have 1-4 actually zero to four, the problem is zero; is he a student? So you would have
that a student could have 1-4 classes that he can take. Now the professor, he could teach
one to many classes. However the professor could only teach one class at a time. So as
you are drawing this stuff out the symbolism that is used, is used to indicate that yes
a professor can teach many classes however, the professor could only teach one class at
a time. The student can take many classes however he can only take one class at a time,
but he cannot take more than four classes. So the symbolism and the text support is used
to help get the idea across that yes data is flowing, but there are conditions to the
way that data is going to flow. So once again, a professor can teach many classes, but he
can only teach one class at a time, so how do you graphically indicate that yes he can
teach many classes but only one at a time. And then on the student side yes a student
can take many classes but there's a maximum of four. So this is what this chapter talks
about. It talks about entity relationship, modeling the relationship, putting identifiers
on how data flows, to help the person who's reading the graphical representation understand
that once again the professor can teach many classes but he can only teach one at a time,
the student can take four classes max, but he can not take 4 at the same time. So theses
are the conditions that have to be superimposed and then the other scenario is that in order
for the student to take a class he has to enroll. So as you are drawing this stuff out,
you have to put on there the activity that must occur for the action to exist, so before
a student can take a class has to enroll. And then you have an intermediate step so
this would be the enrolled, this would be like the student, this would be the enrolled,
and this would be the class. So this is the action that has to occur before the student
can enroll. Which is the activity of that underlying structure which has to be there
for the activity to exist. So we're talking about the ER diagram, we're
talking about the conceptualization of the idea, you're talking about what its going
to look like and what it actually looks like. So this is the idea, this is what you planned
to do, and this is what you actually wound up with because there's always adjustments
and tweaking all kinds of stuff.So you go from the idea,the plan and the actual event.
And that concludes chapter four.