retagged by
7,108 views
5 votes
5 votes

Doubts -

1) When a ER diagram is given and no cardinalities are provided. How to determine relationship type 1:1 or 1:N or M:N ?

    Generally in such ER diagrams arrows are given. Referring to this article where arrow is a Bachman notation   http://stackoverflow.com/questions/4755497/entity-relationship-diagram.

Is the following interpretation correct : The side on which an arrow is present represents N side relation

2) Can there be two different relations among two enties?

    An example I can think of is Emp worksFor Dept ( M:N relation Many employees can work for many Dept )

   Emp manages Dept ( 1:N One emp manages more than 1 department. But at any time given a department can be managed by only one emp)

3) When there is total participation (double line) on both sides of the Entities. In order to minimize tables should they be combined into single table?

4) Also how to understand ternary relation? Is there a relationship between E3 and E2 via R1 in below example ?

Question 1 -

Question 2 -

retagged by

2 Answers

2 votes
2 votes

To understand your

Doubt # 1)  When a ER diagram is given and no cardinalities are provided. How to determine relationship type 1:1 or 1:N or M:N ?

When a diagram is given , we need to check that diagram , see below image from korth :

it clearly says the arrow side means 1 cardinality .  which you wrote reversely in your question . It would be  " The side on which an arrow is present represents 1 side relation" .

For question 1, minimum table require is 3 . ( for Many to one we need 2 tables, for 1:1 with total participation at one side we need 1 table so in total 3 tables require )

----------------

And for 2 nd question , there is a mistake in diagram , see below picture :

There is no arrow with double line to represent total participation . Only double line is require like that = 

But in question between E1 and R , there is a double line with arrow , which is not correct. there should be no arrow to represent total participation. 

And for question 2 minimum table require is 3 ( 1:1 with only single side total participation we always take 1 table) .

-----------

For your doubt #3 : When there is total participation (double line) on both sides of the Entities. In order to minimize tables should they be combined into single table ?

yes, we can minimize them into a single table .

edited by
1 votes
1 votes
for ur 3rd question

ans: if er diagram is 1:1 relationship with total participation then we can combine both relations to minimise the table

consider the exmaple: customer and license here the participation of both the entities is full and every customer should have only one license and every license should be owned by only one customer hence it is one to one relationship and participation is also total on both sides

hence here we dont need 2 tables one for customer and other for license we can maintain it in just 1 table by combining both the tables.
Answer:

Related questions

15 votes
15 votes
13 answers
1
targate2018 asked Aug 12, 2017
8,614 views
How many minimum relations required for given ER diagram ?
11 votes
11 votes
4 answers
2
targate2018 asked Aug 11, 2017
11,493 views
The minimum number of tables to represent ER-Diagram such that the relational database satisfies 1NF.
3 votes
3 votes
1 answer
3
Manu Thakur asked Sep 17, 2017
1,866 views
this question is from virtual gate test series. what is the minimum number of RDBMS tables needed for the following er diagram:
1 votes
1 votes
0 answers
4
Mk Utkarsh asked Sep 23, 2018
665 views
Tables needed for ER diagram