
CSIS 350 โ Lecture 13
Read: Chapter 5: 119 โ 135
Discuss Multivalued dependencies
Chapter 4:
Last time we started looking at some of the issues surrounding database design when we
start with a set of tables. Major Question: Are there problems with the data?
- Unsatisfied referential Integrity constraints (we looked at this last time)
- Multicolumn data
- Inconsistent values
- Missing values
- "comment" columns
Multivalue, Multicolumn data
Sometimes you will find tables where multiple columns are used for the different values
of the same type of data. For example,
Book( Title, Publisher, Author1, Author2, Author3,
NumPages, ISBN )
This problem is commonly associated with data that is not from a database, but is from
another source such as a spreadsheet.
What problems are associated with organizing data this way?
1) Limits amount of data that can be stored โ what if you need to store more values
than you have columns?
2) Makes queries more complex. How do I find all books written by 'Gretchen
Hansen'?
How do you fix it?
Move multiple column data into a separate table:
Book( Title, Publisher, NumPages, ISBN )
Author( BookTitle, AuthorName )
Where Author.BookTitle must exist in Book.Title
Now how do I find all the books written by Gretchen Hansen?
Note that this is very similar to the Multivalue dependency problems we saw earlier.