0 votes 0 votes Databases database-normalization databases + – Na462 asked Oct 21, 2018 Na462 1.0k views answer comment Share Follow See all 21 Comments See all 21 21 Comments reply Utkarsh Joshi commented Oct 21, 2018 reply Follow Share Here (customerid,storeid) is a key. As they have not mentioned any FD's explicitly we can assume that FD storeid -> storelocation exists. (It's quite logical too to assume that this FD exists) As storeid is a part of a key and storelocation is a nonprime attribute, this FD leads to the violation of 2NF. Now if we are decomposing our table as (cid,sid,amount) and (sid,slocation) both the tables will be in BCNF. It would also be a lossless and dependency preserving decomposition. So I think option C is correct! 1 votes 1 votes himgta commented Oct 21, 2018 reply Follow Share @Utkarsh Joshi why not b? 0 votes 0 votes Magma commented Oct 21, 2018 reply Follow Share can anyone explain me properly ! I have doubt in this question 0 votes 0 votes Utkarsh Joshi commented Oct 21, 2018 reply Follow Share himgta what doubt you have in option B?? can you explain?? 0 votes 0 votes Shaik Masthan commented Oct 21, 2018 reply Follow Share note that, this is a non-standard question.. We have to make some assumptions to solve it.. by checking all the options and with some common sense, we get the FD 1) storeid ---> storelocation 2) customerid,storeid ----> billamount. @himgta note that all foreign keys are not acts as primary keys, but a relation should have a primary key, due to this reason, option c is preferred than option b 0 votes 0 votes Utkarsh Joshi commented Oct 21, 2018 reply Follow Share @Shaik Masthan in option B they are saying storeid of store refers to storeid of reciept correct? 0 votes 0 votes Shaik Masthan commented Oct 21, 2018 reply Follow Share yes, receipt is parent table and store is child table 0 votes 0 votes Utkarsh Joshi commented Oct 21, 2018 reply Follow Share but storeid is not a primary key in parent table! how can we do such a reference? 1 votes 1 votes Utkarsh Joshi commented Oct 21, 2018 i edited by Utkarsh Joshi Oct 21, 2018 reply Follow Share according to me option B should be the first one which we should eliminate! As its not proper reference! 0 votes 0 votes Shaik Masthan commented Oct 21, 2018 reply Follow Share i already commented that, it is not a standard question... but note that any unique key can be work as referencable. 0 votes 0 votes Shaik Masthan commented Oct 21, 2018 reply Follow Share @joshi Why option C is eliminate? Note that, the storeid in the store table is primary key... It is referencing to the receipt table means receipt is child table and store is a parent table from option C 0 votes 0 votes Sukanya Das commented Oct 21, 2018 i edited by Sukanya Das Oct 21, 2018 reply Follow Share ans. will be c), and after that decomposition, it'll be in 2nf, 3nf and bcnf also. 1 votes 1 votes Subarna Das commented Oct 21, 2018 i edited by Subarna Das Oct 21, 2018 reply Follow Share here, storelocation is partially dependent on storeid, and in 2NF we remove all the partial dependencies so, we'll make a new table as STORE, where storeid, storelocation will be the attributesand storeid will be primary key, and in the RECEIPT table customerid, storeid, billamount will be the attributes, and customerid will be the primary key & storeid will be foreign key 1 votes 1 votes Shaik Masthan commented Oct 21, 2018 reply Follow Share mam, storeid is a foreign key in customer table but option b conveying that storeid is foreign key in store table. isn't it? 1 votes 1 votes Utkarsh Joshi commented Oct 21, 2018 reply Follow Share Shaik Masthan TYPO* I meant option B should be the first to eliminate!! 1 votes 1 votes Utkarsh Joshi commented Oct 21, 2018 reply Follow Share edited! 0 votes 0 votes Subarna Das commented Oct 21, 2018 reply Follow Share @ Shaik Masthan yes, option b) conveying to make the storeid as foreign key in the STORE table -- so, b) will be eliminated 0 votes 0 votes Sukanya Das commented Oct 21, 2018 i edited by Sukanya Das Oct 21, 2018 reply Follow Share storeid -> storelocation is partially dependent. then, if we remove storelocation from receipt table and make a store table with storeid and storelocation where storeid will be the primary key and in receipt table storeid will be referencing to the store table. then it'll be in 2nf. and after that, no transitive dependencies are there. that's why it is already in 3nf, and bcnf also. so, ans. will be c) 1 votes 1 votes Subarna Das commented Oct 21, 2018 reply Follow Share option A), B) & D) will be eliminated ans will be option C) 1 votes 1 votes Subarna Das commented Oct 21, 2018 i edited by Subarna Das Oct 21, 2018 reply Follow Share @ Sukanya Das yes, after making storeid as a primary key in the STORE table, & if the customerid is the primary key & storeid is the foreign key in the RECEIPT table, then the relation will be in 2NF, 3NF and as well as BCNF 1 votes 1 votes Sukanya Das commented Oct 21, 2018 reply Follow Share @ Subarna Das it is corrected now. ans. will be c) 1 votes 1 votes Please log in or register to add a comment.