edited by
1,148 views
3 votes
3 votes

 

What is the minimum number of tables required to represent this E-R diagram in the relational model? Considering that  for both R1 and R2 cardinality is $1:1$

  1. $2$
  2. $3$
  3. $4$
  4. $5$
edited by

1 Answer

Best answer
5 votes
5 votes

Question is bit confusing. Number of tables depends upon  given cardinality, but it is not specified here that weather generated schema have to be normalized or not.

Here  that relationship R2 is one to one with partial relationship on both sides, (identification: single line, each 1-to-1 and many-to-many is basically partial relationship. bcz that specify one member can be connected with how much number of other side, it never says that it must use every member) (P.S.: with arrow, without arrow for 1-to-1 and many-to-many changes with different sources.)

and relationship R1 is one to one relationship with total participation on both sides (identification: double line)

Now CASE 1: tables do not need to be normalized

In that case obviously A_R1_B needs 1 table as total participation. Now as null can be there in tables, we can make 1 table for C and then connect R2 on either side.

A_R1_B_R2 (C comes here as foreign key), C

or

A_R1_B, R2_C (B comes as foreign key)

So total 2 tables.

(thanks to @reena_kandari, @shubhanshu for clearing idea)

Now coming to doubt that if total participation requires 1 table and partial participation requires 2 tables then why not total being 3? try to understand logic in following image. here complete total participation behaves as one whole entity in R2 relationship and C as another side of R2 relationship. And so as per default rule R2 can merege on either side.

CASE 2: tables has to be normalized

Now i have doubt here that weather after normalization, nulls are allowed in tables or not? I referred many references and asked many fellows but i didn't get any firm side.

So if normalized tables allows null values then 2 tables same as above.

But if normalized tables do not allow null values then we can't merge R2 on either side bcz due to partial participation it will generate null values for sure.

So in that case, we need A_R1_B 1 table, C 1 table and R2 1 table (having B and C as foreign key).

So in total 3 tables required.

So answer can be 2 or 3 depending on question details.

edited by
Answer:

Related questions

1 votes
1 votes
1 answer
1
Bikram asked Nov 26, 2016
319 views
Consider the join of relation R with a relation S. If R has $m$ tuples and S has $n$ tuples, then the maximum and minimum sizes of the join, respectively, are __________....
0 votes
0 votes
1 answer
2
Bikram asked Nov 26, 2016
229 views
A functional dependency of the form x → y is trivial ify ⊆ xy ⊂ xx ⊆ yx ⊂ y
0 votes
0 votes
1 answer
3
Bikram asked Nov 26, 2016
295 views
What does the following Tuple Relational Calculus query produce?The expression σθ1 (E1 ⋈θ2 E2) is the same as: E1 ⋈θ1^ θ2 E2 (σθ1 E1) ∧ (σθ2 E2 ) E1 ⋈ θ...