开发者

BCNF Decomposition (Database Design)

开发者 https://www.devze.com 2023-03-24 19:06 出处:网络
I\'m trying to decompose several tables into BCNF. I believe the first one is decomposed correctly, but I\'m unsure whether or not the others can be decomposed. Any help is appreciated

I'm trying to decompose several tables into BCNF. I believe the first one is decomposed correctly, but I'm unsure whether or not the others can be decomposed. Any help is appreciated

**make(id, name, est, founder, city, state)**

id->name;
name->est, city, state, founder;
city->state

New Relations: [Key(id),name], [Key(name),est,city,state,founder], [Key(city),state]

**model(id, makeId, name, year, category)**

id->makeId, name;
name->year, category (not superkey, but can't really decompose)

**features(i开发者_Go百科d, modelId, abs, tpms, sidebags, drl)**

id->modelID, abs, tpms, sidebags, drl 

**user(id, name, pass, first, last, phone, isAdmin)**

id->name, pass, isAdmin; name->first, last, phone

**selling(id, price, modelId, mileage, userId)**

id->price, modelId, mileage, userID


BCNF is easy: just make sure all dependencies between attribute sets in a single relation are dependencies on a superkey of the relation. Your first one is close, but the second relation needs to omit "state". Often, people stop at 3NF since not all relations with FDs have dependency-preserving BCNF decompositions. Do you need help decomposing the other relations? I will help, if you need it.

Edit: Help on other relations.

Selling and Features are fine. Models and Users need to be split on Name in order to be in BCNF; you indicate this isn't something you can do for Models. Why? Name implies the stuff on the right of the arrow, right?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号