Ali Salehi
Ali Salehi

Reputation: 6999

is this relation in third normal form?

I was wondering, is the following relation in 3rd normal form ?

USER (username:String PrimaryKey, 
      userType:String, 
      fname:String,
      lname:String, 
      dateOfBirth:TimeStamp)

and userType can be one of the following values

  1. Guest
  2. Registered User
  3. Referred User

Thanks,

Upvotes: 1

Views: 238

Answers (3)

Carlos Gavidia-Calderon
Carlos Gavidia-Calderon

Reputation: 7253

I don't see any transitive dependencies between non-key attributes... so it's 3NF compliant.

Upvotes: 1

Philippe Grondier
Philippe Grondier

Reputation: 11138

but of course be very careful when considering the user name as the primary key of the user table. It usually does not work...

Upvotes: 0

Erwin Smout
Erwin Smout

Reputation: 18408

If the FD's that apply in your database are

{username} -> {userType, fname, lname, dateOfBirth}

then your design is even in 5NF.

Upvotes: 3

Related Questions