| ||||||||
|
Data modeling is the process used to design a database. It is essential to completely understand the information that is to be stored in a database in order to access and use that information. The purpose of a database is to store information about "things" which include people, equipment, and books. Databases usually store information about objects that are somehow related, for example: students, classes, and instructors. These objects are called entities. For example, a school database could contain 2000 entities called students, 300 entities called classes, and 120 entities called instructors. The “entity class” is an abstract description, that is, it describes the kind of information for that object (entity) in the database. The actual data is called an “entity set” and includes the names, addresses and so forth of all of the students in the entity. Entities have attributes that describe the characteristics of entities. For example, the attributes of a student entity might include:
The purpose of attributes are:
The key thing to remember is that some attribute or combination of attributes should uniquely identify each entity in the set. Keys are used to identify attributes that make a particular entity unique. Keys can consist of single attributes or a combination of attributes. For example, a “studentid” would be the key to a students entity while a courses entity might require a “studentid” and “courseid” for a key. Keys come in a variety of flavors:
Entity RelationshipsConsider the following diagram model…
This is an entity-relationship diagram (also known as a semantic diagram). It is used to illustrate the interactions between attributes, entities, and entity classes. Note the “1” and “many” designations showing the numerical relationships between entities (e.g., many books can have many authors, but each book has one publisher). A Review of Key TermsA glossary of essential terms so far:
Notice that “entity”, “entity class”, and “entity set” are three different, although arguably related, terms that are often referred to collectively as simply “entity”. For simplicity, consider the following:
The column on the left includes the terms used to design a database while the terms on the right are most often used during database implementation. |
|
Copyright © 1999
- 2005 |