문제

Given this following table definition:

TRUCK (TruckNum, TruckType, TypeDesc, TruckMiles, DatePurchased, TruckSerialNum, BaseCity, BaseState, BaseNum, BaseManagerName, ManagerPhone, BasePhone)

I need to set up a list of functional dependencies.

So far I have:

FDs = {TruckNum ->  TruckType, TypeDesc, TruckMiles, DatePurchased, TruckSerialNum, BaseNum

     BaseNum -> BaseCity, BaseState,  BasePhone

     BaseManagerName -> ManagerPhone}

I'm also given the following notes/limitations:

  1. A truck is based at a single base.

  2. A base can be the base for many trucks.

Anyway, the question I have is actually pretty simple and (probably) completely newbie-ish. What is confusing me is BaseNum.

Notice I have this:

TruckNum -> (...) BaseNum

and then

BaseNum -> (...)

See how I am using BaseNum twice? Is this allowed?

The definition for 1NF is that the table should not have any repeating groups. But isn't that just for the table definition (rather than the FDs)? I'm confused.

도움이 되었습니까?

해결책

From what I see/understand of your situation, you are going in the right direction.

You have a list of attributes, and while normalizing (you are actually further ahead than 1NF), its perfectly fine that you are using BaseNum as an attribute in the Trucks tbl.

Your Functional Dependencies would easily be converted into PK/FK pairs. From that perspective, you are also going in the right direction.

다른 팁

I never had a formal course of databases as computer science subject but the practical definition of 1NF is that in a cell of a table you cannot have any comma separated lists of values. That is it.

So you can have functional dependencies as described in OP. As long you store your trackNums (or other entities) in separate rows of some table and not as comma separated lists it will comply with 1NF.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top