Sunday, July 27, 2008

Databases

Relational databases seem to be a quite complex subject. The theory behind relational databases can be complex. Practical implementations of the theory are more simple. As a practical matter, many-to-many entity relationships are to be avoided. Interestingly, many-to-many entity relationships are not problematic theoretically. But relational database management systems (RDMS) are unable to implement such relationships. Many-to-many entity relationships are resolved with intersection entities. Database modeling involves conceptualizing the database structure, by identifying entities (relevant things), attributes (descriptive aspects of each thing), and relationships (associations between things.) Relationships generally have up to three aspects, a name, optionality, and degree. For me, I am still having difficulty understanding optionality, which is whether a relationship is optional for mandatory. For instance, two examples in this week's readings were: 1. an author can write 0 or more books, and 2. a plant may be given one or more waterings (optional.) I do not understand 1. how an author can be an author having written 0 books, and 2. how it is optional that a plant be given a watering. (Maybe the plant is outside?)

With respect to normalization, I followed the normalization procedure detailed in the Three Normal Forms tutorial. It was slow-going at first, but after a while I think I got the hang of it. However, starting with a database model of four entities, the normalization process proliferated their number to ten. I think I normalized the database correctly, but, for the purposes of the class assignment, I am using a modified schema with four entities. So I think there are different levels at which a database can be implemented, depending upon its purpose.

No comments: