Object Role Modeling (ORM) is a conceptual modeling language to help database designers create a proper data model. ORM is considered by many to be a successor to entity relationship (ER) modeling, although ORM diagrams can easily be expressed as ER diagrams if necessary. The main difference between ORM and ER is that ORM is designed to accommodate data models during the development stage more easily, where those models change and evolve. ER works best with data models that do not change.
ORM consists of a modeling language called Formal Object-Role Modeling Language (FORML) and a conceptual design process known as the Conceptual Schema Design Procedure (CSDP). Domain experts can use the seven steps of the CSDP in order to design a data model based on the elementary facts of a system. Once the elementary facts are defined, they are drawn on the basic ORM diagram. The rest of the process adds various constraints and performs a number of checks to ensure that the schema accurately captures the data model.
Object Role Modeling (ORM) helps define the conceptual design for a database.
The conceptual design phase works with entities and values but not tables and fields because this phase does not include the type of underlying database (flat file, relational, object-oriented, and so on).
The logical design phase converts entities and values into table names and field names and produces a database schema that is referred to throughout the development of the project.
The physical design phase converts the logical schema into Structured Query Language (SQL) or other code in order to create an actual database.
Visio for Enterprise Architects fully supports ORM diagrams using a helpful add-in.
The process of defining a conceptual design in ORM is known as the Conceptual Schema Design Procedure (CSDP).
Step one of the CSDP defines all the elementary facts of a system, using a natural-language syntax.
Step two of the CSDP draws the elementary facts onto a basic ORM diagram that links entities with either other entities or values using roles.
Step three checks for entities that should be combined and checks for values that could be derived arithmetically.
Step four adds uniqueness constraints to the diagram and checks to see if any fact types need to be split based on arity.
Step five adds mandatory role constraints to the diagram and checks for values that could be derived logically.
Step six adds value constraints to the diagram and determines if any subtypes need to be defined for entities that fulfill complex roles.
Step seven adds a few other constraints and ensures that final checks are performed.
The following questions will help you measure your understanding of the material presented in this chapter. Read all the choices carefully because there might be more than one correct answer. Choose all correct answers for each question.
1. | Which two of the following methodologies, when combined, make up the Object Role Modeling (ORM) process? (Choose two answers.)
|
|
2. | What is the goal of ORM?
|
|
3. | Which of the following components of an application’s data model is defined during the conceptual phase?
|
|
4. | During which phase of database design does a formal schema get created?
|
|
5. | Which of the following are benefits that the ORM modeling methodology has over entity relationship (ER) modeling?
|
|
Answers
1. | B and C. ORM is made up of two components: a language called FORML and a process called CSDP. |
2. | C. The goal of ORM is to define an accurate conceptual database model. |
3. | D. The first step of defining an ORM model is identifying the system objects using a fact-based approach. |
4. | B. The main goal of the logical design phase is to convert the conceptual model into a proper schema. |
5. | A, B, and C. ORM models are written using a natural language, which makes them easier to read and understand and reduces errors. ORM models use actual data as a validation technique, which also reduces errors. In addition, there are some complex business rules that can be incorporated into an ORM diagram that ER cannot accommodate. |
6. | You are the database designer for a large project and have just completed the Conceptual Schema Design Procedure (CSDP) process to create your database’s conceptual design. After the conceptual design is complete, what is the next step in defining your database?
|
|
7. | You are responsible for designing the database for a retail store. The elementary facts you have identified to date are
Which of the following objects are entities in our Object Role Model? (Choose all that apply.)
|
|
8. | Which of the following statements best describes a unary fact?
|
|
9. | Which of the following statements best describes a binary fact? (Choose two answers.)
|
|
10. | What is the purpose of checking an ORM model for arithmetic derivations?
|
|
11. | Which of the following answers most accurately describes the business rule depicted in the following illustration?
|
|
12. | Which of the following diagrams best depicts the statement, “An employee can have one or more offices but cannot have two offices in the same building.”?
|
|
13. | Which of the following diagrams best depicts the statement, “A candidate must have either a phone number or an e-mail address.”?
|
|
14. | What is a set comparison constraint?
|
|
Answers
6. | B. At the end of the CSDP, the resulting conceptual diagram can easily be mapped to a logical design schema, which is the next step in the database design process. |
7. | A, D, and E. The entities of the model are Item, Vendor, and Inventory. Entities have properties of their own, while values are properties for other entities. |
8. | B. A unary fact is a property of a single object. This is generally a two-state property— “Student is enrolled.” The student either is or is not enrolled. |
9. | A and C. Binary facts define the relationship between an object and either another object or a value. |
10. | D. Checking for arithmetic derivations helps trim the data model of unnecessary facts. A data model that is smaller results in a smaller and more efficient database. |
11. | B. The presence of a solid dot on both objects indicates that they are both mandatory, whereas the presence of uniqueness constraints on both roles indicates that each object can occur only once. Therefore, the relationship between A and B is a one-to-one relationship. |
12. | A. Diagram A establishes that an employee and a building are unique to each other. |
13. | B. The external mandatory constraint is represented by a dot inside a circle and indicates that either the phone number or the e-mail address, or both, must contain a value. |
14. | B. A set comparison constraint restricts an object from fulfilling a role unless another role is also being filled. For instance, in ORM we can restrict Student objects from filling the “has graduated” role until the “paid tuition” role has been filled. |
1. | Match the ORM artifact in the left column with its graphical symbol in the right column.
|
|
Answers
1. | A matches to 2. An entity is represented by a solid oval. B matches to 5. A value is represented by a dotted oval. C matches to 1. An external uniqueness constraint is represented by a letter U inside a circle. D matches to 3. An internal uniqueness constraint is represented by a line above one or more roles. E matches to 4. A mandatory constraint is represented by a solid dot. |