1. Entity
2. Relationship
3. Attributes
4. One-to-Many Relationship
5. One-to-One Relationship
6. Many-to-Many Relationship
7. Total participation
An engineering company has several projects in progress. Each occupies the full attention of several engineers. Moreover, each engineer is working on at least one project, and each project has at least one engineer. Each engineer has a crew of laboratory assistants who report only to that engineer. No assistant is without an engineering supervisor. Furthermore, each engineer supervises at least one assistant. Some assistants have exclusive ownership of one or more instruments. Each instrument is owned by an engineering assistant. However, a particular assistant may own no instruments. Case Study 2 Persons are assigned to departments. Persons work on projects, and each project has a budget. Each project is managed by one department, and a department may manage many projects. But a person may work on only some (or none) of the projects in his or her department. Each project has a number of tasks to be completed. Each task has an attribute estimating its duration. Case Study 3 An organization purchases items from a number of suppliers. It keeps track of the number of each item type purchased from each supplier, and it also keeps a record of suppliers' addresses. Items are identified by item-type and have a description. There may be more than one address for each supplier, and the price charged by each supplier for each item type is stored. There is at least one supplier per item and at least one address per supplier. How do I start modelling? Modelling a scenario properly is crucial towards a stable and robust database schema. Unfortunately there is no rule of thumb since we try to fit real world needs in an artificial model. Software engineering studies methods to obtain fast and correct models. These are heavily biased in accordance with the group's theoretical background and experience. The following attempts to provide guidelines on how to work today in the lab: 1. Study the specifications of the problem 2. Make sure you understand the specifications of the problem. Are there specs implied? 3. Figure out the Entities. 4. Figure out the Relationships. 5. Revisit the Entities if something does not seem right when figuring out the relationships. 6. Retry the relationships. 7. Apply the constraints. If they cannot be applied revisit Entities and Relationships. 8. Check for conceptual mistakes, omissions, duplications. Fix them. If you cannot fix them, goto 1! |
||