i have a few questions about ER diagram

21 views
Skip to first unread message

wajeeha....@gmail.com

unread,
Nov 5, 2007, 10:43:49 PM11/5/07
to DBMS-NIIT
my question
1)why we require definition of entity types and
where these definition are to be written in ER model?
should we write along with the entity type or below the diagram
in entity type " " .
2). if we have to store some instances of the output or the report
should we make the report as the entity . if yes then why ? if not
then why not ?

aatif...@gmail.com

unread,
Nov 6, 2007, 12:39:57 AM11/6/07
to DBMS-NIIT
Nice to see some technical question on the discussion board.
Ok i will reply your questions one by one

Question 01: Why we require definition of entity type and where these
definitions are written in ER model.
Answer:
First lets check what is definition of Entity type. Its basically
consist of two things first the name of the entity second its
constraints. Now these constraints include data type of all the
attributes, entity relationship constraints (degree and cardinality)
and also some other further constraints like range of values that we
can store in attributes etc. Now this entity type definition essential
for creating entity instance (entity type definition is some what
similar to Class definition and entity instance to class insistance)
In ER model (for now, because we have not studied advanced ERs) we do
show entity name, relationship type, degree and cardinality, and then
we also show attributes. But we don't show the the data types of
attributes and range of the values of the attributes these set of
vales are called 'domain', this will come in DB diagram.
So the definition of ER Model "The Entity-Relationship (ER) model, a
high-level data model that is useful in developing a conceptual design
for a database". In 1976, Chen developed the Entity-Relationship (ER)
model, a high-level data model that is useful in developing a
conceptual design for a database. Creation of an ER diagram, which is
one of the first steps in designing a database, helps the designer(s)
to understand and to specify the desired components of the database
and the relationships among those components. An ER model is a diagram
containing entities or "items", relationships among them, and
attributes of the entities and the relationships.

Question 02: if we have to store some instances of the output or the


report should we make the report as the entity . if yes then why ? if
not then why not ?

Answer:
Now this is a tricky question, its answer depends upon the business
logic & requirements. But in general I can say "No we don't store
output or reports as entity". Why? because the report or output are
the information extracted from the data stored in database and if we
store this in DB we are adding redundancy. Here you have to understand
the difference between "data" and "information". Data basically is the
required attributes values that we store in database for an entity.
where as information some thing that we extract from data after
applying some business logic and rules on data. Best example is graph
we don't store graphs in DB what we store is the data that is
required to draw graph.

I hope I have answered your question. If not please don't hesitate to
ask more questions.


Now some quotations:

Chinese proverb: One who asks a question is a fool for five minutes;
one who does not ask a question remains a fool forever.

George Bernard Shaw: Some men see things as they are and say, "Why?" I
dream of things that never were and say, "Why not?"

Have a nice day and OHTs

Aatif Kamal

On Nov 6, 8:43 am, "wajeeha.javed...@gmail.com"
<wajeeha.javed...@gmail.com> wrote

wajeeha javed

unread,
Nov 6, 2007, 6:09:05 AM11/6/07
to dbms...@googlegroups.com
thankyou sir for answering the questions  .sir there is one question no 3 of assignment placed on server  which is stated as

 

Each person keeps a record of documents of interest. The time and source of each document are stored, along with its location. Documents may be books, identified by author and title; journal articles, identified by journal volume and number, author, and title; or private correspondence, identified by sender and date.


here see  that the documents will be the output to user   . and we are storing the time and source   and location . what should i do ?
should i make it entity or not ? 

sarhan ahmed

unread,
Nov 6, 2007, 10:18:25 AM11/6/07
to dbms...@googlegroups.com
salam .... Well in questin no.3 , if v analyze carefully we see that documents is an "ENTITY" bcz it consists of many attributes as stated in one of the slides that entity r those which ve many instances and multiple attributes , but books and journal articles and private correspondence are the "Weak Entity" which depends upon documents .. talking logically if books and journal articles and private correspondence are set as attributes then too much space ll b allocated , whereas , keeping it as "weak entity" ll help us 4 allocating extra spaces ...... N remember sir said : " while making ER diagram and distinguishing entities , always think in terms of entity instances "....





Date: Tue, 6 Nov 2007 03:09:05 -0800
From: wajeeha....@gmail.com
To: dbms...@googlegroups.com
Subject: [dbms-niit] Re: i have a few questions about ER diagram
<br

Ghulam Nasir

unread,
Nov 7, 2007, 11:02:28 AM11/7/07
to dbms...@googlegroups.com
Salam,
            Sarhan has said correctly. But he has not taken one thing in mind. The authors can also be taken as an entity since it can have many entity instances.
 
 
Regards,
Ghulam Nasir

sarhan ahmed <caprico...@hotmail.com> wrote:

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

sameer chaudhary

unread,
Nov 8, 2007, 6:27:03 AM11/8/07
to DBMS-NIIT
hello i am joined this group almost one month before and i am trying
to reply for the first time but it creates some problem in sending.
but today i am saw the topic of my interest and wish to send my query.
hello i also want to develop application in data base but always
thinking of definition of entities and their relationships. i have to
store all the information of students so i make student as entity but
this has lots of information like address, category, telephone number
etc. so i take parents as another entity as well as subjects. now my
question is there are different no. of subjects for different classes.
now if i make one entity and store maximum subjects then some of the
fields remain empty and if i make different entities and then there is
one row of that entity and i read as one of the rule in normalization
is to avoid nullable colums.

On Nov 7, 9:02 pm, Ghulam Nasir <nasir.n...@yahoo.com> wrote:
> Salam,
> Sarhan has said correctly. But he has not taken one thing in mind. The authors can also be taken as an entity since it can have many entity instances.
>
> Regards,
> Ghulam Nasir
>
> sarhan ahmed <capricorn_1...@hotmail.com> wrote:
>
> .hmmessage P { margin:0px; padding:0px } body.hmmessage { FONT-SIZE: 10pt; FONT-FAMILY:Tahoma } salam .... Well in questin no.3 , if v analyze carefully we see that documents is an "ENTITY" bcz it consists of many attributes as stated in one of the slides that entity r those which ve many instances and multiple attributes , but books and journal articles and private correspondence are the "Weak Entity" which depends upon documents .. talking logically if books and journal articles and private correspondence are set as attributes then too much space ll b allocated , whereas , keeping it as "weak entity" ll help us 4 allocating extra spaces ...... N remember sir said : " while making ER diagram and distinguishing entities , always think in terms of entity instances "....
>
> ---------------------------------

> Date: Tue, 6 Nov 2007 03:09:05 -0800
> From: wajeeha.javed...@gmail.com

> To: dbms...@googlegroups.com
> Subject: [dbms-niit] Re: i have a few questions about ER diagram
>
> thankyou sir for answering the questions .sir there is one question no 3 of assignment placed on server which is stated as
>
> Each person keeps a record of documents of interest. The time and source of each document are stored, along with its location. Documents may be books, identified by author and title; journal articles, identified by journal volume and number, author, and title; or private correspondence, identified by sender and date.
>
> ---------------------------------

>
> here see that the documents will be the output to user . and we are storing the time and source and location . what should i do ?
> should i make it entity or not ?
>

Ghulam Nasir

unread,
Nov 8, 2007, 1:15:14 PM11/8/07
to dbms...@googlegroups.com, sameer...@gmail.com
Dear Sameer,
                  I have tried my best to create the attached ER-diagrams for the situation you are explaining. I hope that it will help you.
 
 
Regards,
Ghulam Nasir

sameer chaudhary <sameer...@gmail.com> wrote:

hello i am joined this group almost one month before and i am trying
to reply for the first time but it creates some problem in sending.
but today i am saw the topic of my interest and wish to send my query.
hello i also want to develop application in data base but always
thinking of definition of entities and their relationships. i have to
store all the information of students so i make student as entity but
this has lots of information like address, category, telephone number
etc. so i take parents as another entity as well as subjects. now my
question is there are different no. of subjects for different classes.
now if i make one entity and store maximum subjects then some of the
fields remain empty and if i make different entities and then there is
one row of that entity and i read as one of the rule in normalization
is to avoid nullable colums.
On Nov 7, 9:02 pm, Ghulam Nasir wrote:
> Salam,
> Sarhan has said correctly. But he has not taken one thing in mind. The authors can also be taken as an entity since it can have many entity instances.
>
> Regards,
> Ghulam Nasir
>
> sarhan ahmed wrote:
>
> .hmmessage P { margin:0px; padding:0px } body.hmmessage { FONT-SIZE: 10pt; FONT-FAMILY:Tahoma } salam .... Well in questin no.3 , if v analyze carefully we see that documents is an "ENTITY" bcz it consists of many attributes as stated in one of the slides that entity r those which ve many instances and multiple attributes , but books and journal articles and private correspondence are the "Weak Entity" which depends upon documents .. talking logically if books and journal articles and private correspondence are set as attributes then too much space ll b allocated , whereas , keeping it as "weak entity" ll help us 4 allocating extra spaces ...... N remember sir said : " while making ER diagram and distinguishing entities , always think in terms of entity instances "....
>
> ---------------------------------
> Date: Tue, 6 Nov 2007 03:09:05 -0800
> From: wajeeha.javed...@gmail.com
> To: dbms...@googlegroups.com
> Subject: [dbms-niit] Re: i have a few questions about ER diagram
>
> thankyou sir for answering the questions .sir there is one question no 3 of assignment placed on server which is stated as
>
> Each person keeps a record of documents of interest. The time and source of each document are stored, along with its location. Documents may be books, identified by author and title; journal articles, identified by journal volume and number, author, and title; or private correspondence, identified by sender and date.
>
> ---------------------------------
>
> here see that the documents will be the output to user . and we are storing the time and source and location . what should i do ?
> should i make it entity or not ?
>
> wrote
>
> > my question
> > 1)why we require definition of entity types and
> > where these definition are to be written in ER model?
> > should we write along with the entity type or below the diagram
> > in entity type " " .
> > 2). if we have to store some instances of the output or the report
> > should we make the report as the entity . if yes then why ? if not
> > then why not ?
>
> >
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection aroundhttp://mail.yahoo.com




Reply all
Reply to author
Forward
0 new messages