87 87 votes Consider the following relational schema:$\text{Suppliers}(\underline{\text{sid:integer}},\text{ sname:string, city:string, street:string})$ $\text{Parts}(\underline{\text{pid:integer}}, \text{ pname:string, color:string})$ $\text{Catalog}(\underline {\text{sid:integer, pid:integer}}, \text{cost:real})$Assume that, in the suppliers relation above, each supplier and each street within a city has unique name, and (sname, city) forms a candidate key. No other functional dependencies are implied other than those implied by primary and candidate keys. Which one of the following is $\text{TRUE}$ about the above schema?The schema is in $\text{BCNF}$The schema is in $\text{3NF}$ but not in $\text{BCNF}$The schema is in $\text{2NF}$ but not in $\text{3NF}$The schema is not in $\text{2NF}$ Databases gatecse-2009 databases sql database-normalization normal + – go_editor 43.3k views answer comment Share Follow Print See all 16 Comments 16 16 Comments reply Show 13 previous comments ꧁༒☬ĿọŗԀ 🆂🅷🅸🆅🅰☬༒꧂ commented Mar 20, 2024 reply Follow flag bro @Golla Sai Venkatesh every primary key is a ck which is superkey and minimal too . and (sname, city) they gave as ck we are not explicitly assuming this thing from our side. 0 0 replyShare justanotherguy commented Jul 2, 2025 reply Follow flag @satvik_t The first statement says that in the schema, there are only those FDs whose LHS is a SK.And as for your second doubt, no city-->street and city-->name are not valid fds. They are violating the concept of FDs.CityStreetMumbaiAMumbaiB Now, according to the question yes Street names are unique within a city. But look at this instance:Using Mumbai can you determine street? Like there are 2 different street values for Mumbai which is violation of FD. If there are two tuples with same A values, then their corresponding B values should be same. If their corresponding B values are different, then the FD will be invalid. Same goes for City-->Sname too. 0 0 replyShare DΛΞMON commented Aug 28, 2025 reply Follow flag "each supplier and each street within a city has unique name" each supplier, within a city - unique name that means $(sname, city)$ is a candidate key. each street, within a city - unique name that means $(street, city)$ is also a candidate key. 1 1 replyShare Please log in or register to add a comment.
Best answer 109 109 votes The non-trivial $\text{FD}$s are (sname, city) $\to$ street sid $\to$ street (sname, city) $\to$ sid sid $\to$ sname sid $\to$ city For all these, $\text{LHS}$ is a super key and hence $\text{BCNF}$ condition is satisfied. But we have some more dependencies here: "each supplier and each street within a city has unique name" This basically means each supplier in a city has unique name making (sname, city) determine sid and hence making it a candidate key. Each street within a city also has a unique name and so (street, city) is also a candidate key. Even then with all $3$ candidate keys (for Suppliers schema), for any $\text{FD}$, the $\text{LHS}$ is a super key here, and hence the relation schema (for other two relations it is straight forward) is in $\text{BCNF}$. http://db.grussell.org/section009.html Correct Answer: $A$ Arjun answered Apr 29, 2016 • edited Jun 21, 2021 by Lakshman Bhaiya Arjun comment Share Follow See all 27 Comments 27 27 Comments reply Piyush Kapoor commented Aug 26, 2016 reply Follow flag sir, from above explanaion (Street,city) -> sname also becuase (street,city ) is unique. can't it be candidate key?? also if its a candidate key then no problem its in BCNF, otherwise its not in bcnf but in 3NF please reply sir. piyush 4 4 replyShare Arjun commented Aug 26, 2016 reply Follow flag Yes, that is a candidate key as it is unique. I corrected the last part. 3 3 replyShare Himanshu Joshi commented Dec 6, 2016 reply Follow flag Sir is it not having partial dependency? Because (sname,city) is C.K and (city,street) is also a C.K. City is present in both the dependency!. So option d should be correct? Please correct me if am wrong. 0 0 replyShare indrajeet commented Dec 14, 2016 reply Follow flag how (STREET,CITY) is candidate key?? 1 1 replyShare Himanshu Joshi commented Dec 15, 2016 reply Follow flag "each supplier and each street within a city has unique name" because of this statement. 0 0 replyShare indrajeet commented Dec 15, 2016 reply Follow flag each supplier and each street within a city has unique name It means CITY -> Street,Supplier.Am i right ??? if not please correct me.. 0 0 replyShare Arjun commented Dec 15, 2016 reply Follow flag each supplier and each street within a city has unique name This means when supplier name cannot repeat within a city and same for street. CITY -> Street,Supplier is wrong as it basically says all street and supplier must be same for a city. 16 16 replyShare indrajeet commented Dec 15, 2016 reply Follow flag sir this line "This means when supplier name cannot repeat within a city and same for street." is not clear .please explain.. 0 0 replyShare Himanshu Joshi commented Dec 15, 2016 reply Follow flag Sir what i understood from the statement is that within a city streets and suppliers are unique. So the combination of city,street and city,supplier should be unique. 2 2 replyShare TNadeem commented Dec 31, 2016 reply Follow flag (street,city) not a candidate key.. two suppliers can live on the same street and this does not violate the condition. 4 4 replyShare sushmita commented Jan 6, 2017 reply Follow flag because each street is unique within a city and hence combination of street and city will be unique in ech tuple of the relation making it a candidate key. 1 1 replyShare habedo007 commented Nov 10, 2017 reply Follow flag Can two $sid$ point to same $city$? is that allowed, or will it break the super key property? 0 0 replyShare srestha commented Nov 25, 2017 reply Follow flag " each supplier and each street within a city has unique name " means supplier, street and city are unique combination of 3 elements. And unique means , it could represent a key by it So, any two combination of them will be unique candidate key. 0 0 replyShare Iqra Islam commented May 22, 2018 reply Follow flag How can we take out the non trivial FD? 0 0 replyShare Kaluti commented Sep 23, 2018 reply Follow flag But two different suppliers can live on same street and city combination in that case street and city combination will not be key right 0 0 replyShare Dushyant Raut 4 commented Dec 11, 2018 reply Follow flag @Arjun sir about your comment Each street within a city also has a unique name and so (street, city) is also a candidate key. but according to question "each supplier and each street within a city has unique name" this statement can also mean that given a street name within a city can also have more than 1 suppliers(different name). 0 0 replyShare Syedarshadali commented Dec 24, 2018 reply Follow flag @Arjun Sir if (street, city) is candidate key. Then by same argument (sid, city) is also a key[superkey because sid is a candidate key]. Therefore (sid, city) -> sname and (street, city) -> sid are true. But how can we say that (sname, city) ->sid 0 0 replyShare mrinmoyh commented Jul 23, 2019 reply Follow flag this question is concern about only Suppliers schema??? 0 0 replyShare srestha commented Feb 4, 2020 reply Follow flag yes, only supplier table. chk this line Assume that, in the suppliers relation above, 0 0 replyShare Gaurav Yadav commented May 15, 2020 reply Follow flag each supplier and each street within a city has unique name gives you following FDs in addition to those implied: (sname,city)=>sid (street,city)=>sid Hence, making both of them {(sname,city);(street,city)} Candidate keys. 0 0 replyShare sanjaysharmarose commented Oct 19, 2020 reply Follow flag @GauravYadav How you got this “ (street,city)=>sid “ “each supplier and each street within a city has unique name “ It means each supplier within a city has unique supplier name and each street within a city has unique street name. So your 2nd FD should be “(street,city)=>street” which is trivial. Hence we have two CK’s {sid, (sname,city)} and Supplier is BCNF. Is this correct? 0 0 replyShare Shivateja MST commented Nov 12, 2020 reply Follow flag From the statement “each supplier and each street within a city has unique name“ can we infer (sname,street) also a candidate key like (sname,city) and (city,street) ? 0 0 replyShare Abhilash Behera commented Jan 17, 2021 reply Follow flag sid → sname How was this derived? 0 0 replyShare reboot commented Jan 17, 2021 reply Follow flag @Arjun sir why are we not considering these dependencies $pid \rightarrow pname, color$ $sid, pname\rightarrow cost$ These clearly seem to be lossless and dependency preserving decomposition of the whole schema. And the question is asking “which one of the following is true about the above schema” And then because of $pid \rightarrow pname, color$ FD, it is not even in 2NF. 1 1 replyShare ashesh.singh8 commented Feb 24, 2021 reply Follow flag @Arjun Sir, each supplier and each street within a city has unique name For this you have mentioned below This means when supplier name cannot repeat within a city and same for street. CITY -> Street,Supplier is wrong as it basically says all street and supplier must be same for a city. My question is this : Does that mean that for each CITY Street or Supplier can have multiple values. For Example – CITY = “ Delhi” Street = “MG Road” Supplier = “ABC” CITY = “ Delhi” Street = “Nehru Road” Supplier = “EFG” CITY = “ Mumbai” Street = “MG Road” Supplier = “EFG” CITY = “ Mumbai” Street = “Nehru Road” Supplier = “ABC” Is above valid ? If yes , doesn’t it means that they form Multi-valued Dependency? Please correct if I am wrong. 1 1 replyShare satyaAchar commented Jan 27, 2024 reply Follow flag @Arjun Sir @srestha ma’am Is the table represent the above question statement….. sid sname city street 1 Amit Pune A 2 Ravi Pune B 3 Ravi Kolkata C 4 Amit Kolkata B 5 Soham Pune Ehere, sid→ sname,sid→ city,sid→ street;(sname,city)→ sid; (sname,city)→ street;Also for the statement in the suppliers relation above, each supplier and each street within a city has unique name means (Look at above table)(street,city)→ sname; (street,city)→ sid;Thank you for reading….. 1 1 replyShare Anantha_R commented May 18 reply Follow flag how did we say that primaru key is pid, its not given in question. right? so should we generally consider the ids as primary key? 0 0 replyShare Please log in or register to add a comment.
35 35 votes "No other functional dependencies are implied other than those implied by primary and candidate keys" This line is sufficient to indicate that we have superkeys on LHS always which is the necessary condition to be the relation in BCNF. So, option A is correct. Kuljeet Shan answered Apr 5, 2019 Kuljeet Shan comment Share Follow See all 2 Comments 2 2 Comments reply ankit3009 commented Dec 19, 2021 reply Follow flag Yes true. I don’t get it why people are bothered about other things :( 1 1 replyShare i_ronak commented Dec 16, 2022 reply Follow flag @Deepak Poonia sir, can we declare directly ?? 1 1 replyShare Please log in or register to add a comment.
5 5 votes From the given data the FDs will be , (Sid, Street) $\rightarrow$ Sname As Sid is a primary key, then (Sid, Street) will be super key. Hence, it is in BCNF. King Suleiman answered Jul 16, 2019 King Suleiman comment Share Follow 0 reply Please log in or register to add a comment.
3 3 votes i think ans is d because street and sname functionally depend on city (acc to question) indrajeet answered Apr 28, 2016 indrajeet comment Share Follow See all 4 Comments 4 4 Comments reply Anup patel commented Sep 6, 2017 reply Follow flag D can not be possible since that combination is given as candidate key .so it satisfy bcnf 0 0 replyShare Ahwan commented Sep 24, 2017 reply Follow flag "each supplier and each street within a city has unique name" @indrajeet I guess here you think that, City->name , City->street It is wrong. It means name,City -> sid street,City -> sid So BCNF. 2 2 replyShare manav kothari commented Oct 8, 2018 reply Follow flag No other functional dependencies are implied other than those implied by primary and candidate keys. dont this directly says that it is in BCNF. 6 6 replyShare satendra commented Oct 15, 2018 reply Follow flag @manav ,exactly i also think the same. 0 0 replyShare Please log in or register to add a comment.
2 2 votes In Supplier relation: sid → sid, sname, city, street sname, city → sid, sname, city, street (given) Primary attributes are: sname, city, sid Check 2NF. Part of CK → non-prime attributes? No. So, 2NF. Check 3NF Non-prime attribute → Non-prime attribute? No. So, 3NF. Check BCNF For every X → Y, is X a Superkey? Yes. So, BCNF. Option A. PS: We can't directly check BCNF. Start with 2NF (Assuming 1NF is always satisfied) JashanArora answered Aug 26, 2019 JashanArora comment Share Follow See 1 comment 1 1 comment reply reboot commented Jan 17, 2021 reply Follow flag sir why are we not considering these dependencies $pid \rightarrow pname, color$ $sid, pname\rightarrow cost$ These clearly seem to be lossless and dependency preserving decomposition of the whole schema. And the question is asking “which one of the following is true about the above schema” And then because of $pid \rightarrow pname, color$ FD, it is not even in 2NF. 0 0 replyShare Please log in or register to add a comment.
1 1 vote Please explain clearly i am not getting the concept that how we can conclude BCNF without FD's and by theory i think we can only derive that (sname , city) is candidate key and city --> sname but how bcnf is concluded ? nikunj answered Aug 28, 2017 nikunj comment Share Follow See all 2 Comments 2 2 Comments reply Aishwarya Gujrathi commented Nov 27, 2017 i reshown by Aishwarya Gujrathi Mar 6, 2018 reply Follow flag What i understood is in a city the street names are unique. But in a street there can be multiple suppliers residing. And candidate key basically means it should identify a row uniquely. But (street, city) returns multiple sid's. How can it be candidate key? Please correct me if i am wrong. 0 0 replyShare Aishwarya Gujrathi commented Mar 6, 2018 reply Follow flag @Arjun sir please help. I still do not understand how (street,city) can uniquely identify a supplier. 0 0 replyShare Please log in or register to add a comment.