Object Role Modeling Prepared by   Ahmed Magdy Ezzeldin
Outline What & Why ORM? ORM Building Blocks Example ORM Process ORM Symbol Glossary Summary
What & Why ORM? Object Role Modeling (ORM) is a powerful method for  designing  and  querying  database models at the  conceptual  level, where the application is described in non-technical terms.  1. Communicating models with your  team 2. Communicating and validating models with your  client 3. Great  brainstorming  tool In practice, ORM data models often  capture more business rules , and are easier to validate and evolve than data models in other approaches.
ORM Building Blocks Object Types - Entity Types (map directly to an  ER Entity ) - Value Types (map directly to  ER attributes ) Facts - Predicates:  {0} is enrolled in {1} - Roles:  {0}  and  {1} Constraints - Like uniqueness constraint
Example The  Student  named   Ahmed  is enrolled in  the  Course  named  Math Entity Types:  Student, Course Value Types:  Ahmed, Math We have 3 Facts (predicates) with 2 roles each: - Student  is named  Ahmed - Course  is named  Math - Student  is enrolled in  Course
ORM Process To model any application using ORM we need to follow these steps starting from the requirements provided by the domain expert: 1.  Transform information  examples into facts 2.  Draw the  Entity & value types 3.  Add  Fact  types and assign  roles 4.  Add  constraints
ORM Symbol Glossary Value Entity Description Symbol Example Entity Type Student, course, song, band Value Type Student name, course name, song title, band name Fact with 2 roles (Predicate with 2 arities) Student  is enrolled in  course Uniqueness Constraint (has one) the first role is unique ti the second role. Each student has at most 1 name but there may be 2 students who have the same name 1:1 both roles are unique to each other Every student has at most one name and there are no 2 students with the same name. m:n Many to many Every student may be enrolled in many courses and each course may have many students.
Summary ORM can be changed to  ER . ORM can easily be changed to  UML . ORM is rich as it captures more business details by capturing  facts  and  constraints .
Questions Thank you Questions ???

Object Role Modeling

  • 1.
    Object Role ModelingPrepared by Ahmed Magdy Ezzeldin
  • 2.
    Outline What &Why ORM? ORM Building Blocks Example ORM Process ORM Symbol Glossary Summary
  • 3.
    What & WhyORM? Object Role Modeling (ORM) is a powerful method for designing and querying database models at the conceptual level, where the application is described in non-technical terms. 1. Communicating models with your team 2. Communicating and validating models with your client 3. Great brainstorming tool In practice, ORM data models often capture more business rules , and are easier to validate and evolve than data models in other approaches.
  • 4.
    ORM Building BlocksObject Types - Entity Types (map directly to an ER Entity ) - Value Types (map directly to ER attributes ) Facts - Predicates: {0} is enrolled in {1} - Roles: {0} and {1} Constraints - Like uniqueness constraint
  • 5.
    Example The Student named Ahmed is enrolled in the Course named Math Entity Types: Student, Course Value Types: Ahmed, Math We have 3 Facts (predicates) with 2 roles each: - Student is named Ahmed - Course is named Math - Student is enrolled in Course
  • 6.
    ORM Process Tomodel any application using ORM we need to follow these steps starting from the requirements provided by the domain expert: 1. Transform information examples into facts 2. Draw the Entity & value types 3. Add Fact types and assign roles 4. Add constraints
  • 7.
    ORM Symbol GlossaryValue Entity Description Symbol Example Entity Type Student, course, song, band Value Type Student name, course name, song title, band name Fact with 2 roles (Predicate with 2 arities) Student is enrolled in course Uniqueness Constraint (has one) the first role is unique ti the second role. Each student has at most 1 name but there may be 2 students who have the same name 1:1 both roles are unique to each other Every student has at most one name and there are no 2 students with the same name. m:n Many to many Every student may be enrolled in many courses and each course may have many students.
  • 8.
    Summary ORM canbe changed to ER . ORM can easily be changed to UML . ORM is rich as it captures more business details by capturing facts and constraints .
  • 9.
    Questions Thank youQuestions ???