i.e. there is a table with only 1 primary key (no composite keys). Is it 2NF by default? Assume that it is already 1NF
相关问题
- NOT DISTINCT query in mySQL
- Flush single app django 1.9
- keeping one connection to DB or opening closing pe
- Mysql-installer showing error : Memoy could not be
- Android Room Fetch data with dynamic table name
相关文章
- Connection pooling vs persist connection mysqli
- Speed up sqlFetch()
- How Do I Seed My Database in the setupBeforeClass
- I set a MySQL column to “NOT NULL” but still I can
- Where in Django can I run startup code that requir
- Google OAuth 2.0 User id datatype for MYSQL
- Restore deleted records in PostgreSQL
- SQLSTATE[HY000] [2002] Permission denied
Loosely speaking, a table is in 2NF if and only if it's
That's not quite the same thing as saying a table that has a single-column primary key is in 2NF. A table like this
has a single-column primary key ("person_id"), but it isn't in 1NF. (See wikipedia for details.) And since it's not in 1NF, it can't possibly be in 2NF.
http://en.wikipedia.org/wiki/Second_normal_form
in your example, PatNo is not a primary key since PatNo may see more than one doctor, or have more than one appNo.
Maybe this late response might be helpful to others. We were taught (perhaps mistakenly) that irrelevant data also fell under 2NF. So
animal(phylum, class, order, family, genus, species, greek_phoneme)
would not be in 2NF because Greek phonemes have nothing to do with Animals.I think got it now.
In my example if there is more than 1 doctor, then doctor is also partially dependent on the patient number because the doctor has to see the correct patient. It's just confusing because doctor is also transitively dependent to patNo via appNo.