Deprecated: Implicit conversion from float-string "1629688517.020" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1629688517.020" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1629688517.020" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1629688517.020" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1629688517.020" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1543396136.480" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1543396136.480" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1543396136.480" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1543396136.480" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1543396136.480" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1543832601.490" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1543832601.490" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1543832601.490" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1543832601.490" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1543832601.490" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1558936923.269" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1558936923.269" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1558936923.269" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1558936923.269" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1558936923.269" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1703552715.131" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1703552715.131" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1703552715.131" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1703552715.131" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1703552715.131" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594
GATE CSE 2008 | Question: 83 / GATE Overflow for GATE CSE
edited by
10,648 views
30 votes
30 votes

Consider the following $\text{ER}$ diagram

The minimum number of tables needed to represent $M$, $N$, $P$, $R1$, $R2$ is

 Which of the following is a correct attribute set for one of the tables for the minimum number of tables needed to represent $M$, $N$, $P$, $R1$, $R2$?

  1. ${M1, M2, M3, P1}$
  2. ${M1, P1, N1, N2}$
  3. ${M1, P1, N1}$
  4. ${M1, P1}$
edited by

2 Answers

Best answer
37 votes
37 votes

First strong entity types are made to tables. So, we get two tables $\text{M}$ and $\text{P}$.

I assume $\text{R1}$ is $1:1$ or $1:n$ as that would minimize the number of tables as asked in question. 

Now participation of $M$ in $R1$ is total (indicated by double arrow) meaning every entity of $M$ participate in $R1$. Since $R1$ is not having an attribute, we can simple add the primary key of $P$ to the table $M$ and add a foreign key reference to $M$. This handles $R1$ and we don't need an extra table. So, $M$ becomes $\text{{M1, M2, M3, P1}}$. 

$N$ here is a weak entity weakly related to $P$. So, we form a new table $N$, and includes the primary key of $P (P1)$ as foreign key reference. Now $(P1, N1)$ becomes the primary key of $N$. 

Thus we get $3$ tables.

$M$: ${M1, M2, M3, P1}$ - $M1$ primary key, $P1$ references $P$

$P$: ${P1, P2}$ - $P1$ primary key

$N$: ${P1, N1, N2}$ - $(P1, N1)$ primary key, $P1$ references $P$. 

So, answers is $A$. 

edited by
Answer:

Related questions

26.4k
views
6 answers
64 votes
Kathleen asked Sep 11, 2014
26,397 views
Consider the following $\text{ER}$ diagramThe minimum number of tables needed to represent $M$, $N$, $P$, $R1$, $R2$ is$2$$3$$4$$5$
27.9k
views
5 answers
60 votes
Kathleen asked Sep 12, 2014
27,935 views
Consider the following relational schemes for a library database:Book (Title, Author, Catalog_no, Publisher, Year, Price) Collection(Title, Author, Catalog_no)with the fo...
17.9k
views
4 answers
66 votes
Kathleen asked Sep 12, 2014
17,948 views
Let R and S be two relations with the following schema$R(\underline{P,Q}, R1, R2, R3)$$S(\underline{P,Q}, S1, S2)$where $\left\{P, Q\right\}$ is the key for both schemas....
21.6k
views
6 answers
50 votes
Kathleen asked Sep 12, 2014
21,611 views
A B-tree of order $4$ is built from scratch by $10$ successive insertions. What is the maximum number of node splitting operations that may take place?$3$$4$$5$$6$
Total PHP MySQL Other RAM
Time (ms) % Time (ms) % File count Time (ms) % Query count Time (ms) % Amount %
Setup 5.2 3% 3.7 2% 72 1.5 1% 2 0.0 0% 569k 44%
Control 14.3 10% 2.4 1% 5 12.3 9% 12 0.0 0% 281k 21%
View 4.4 3% 4.4 3% 12 0.0 0% 0 0.0 0% 116k 9%
Theme 101.2 77% 6.9 5% 15 94.5 72% 3 0.0 0% 312k 24%
Stats 5.8 4% 0.1 0% 0 5.7 4% 1 0.0 0% 0k 0%
Total 131.0 100% 17.6 13% 104 114.0 87% 18 0.0 0% 1281k 100%