whefetish.blogg.se

Object oriented modeling and design james rumbaugh ppt
Object oriented modeling and design james rumbaugh ppt







  • Sometimes in the O-O design an association arc may have a name on it.
  • Embed the primary key of the one table as a foreign key in the many table.
  • Remember to include any attributes of the association as fields in the table in the middle.
  • Embed the primary keys of the base tables in the table in the middle and make its primary key the concatenation of the embedded foreign keys.
  • Remember to give those tables primary keys.
  • Make a table for each of the base classes.
  • For others, it’s limited to a verbal description.
  • It gives a verbal summary of how they are mapped.
  • The book lists the different types of O-O associations, with differing multiplicity (cardinality)
  • For example, when mapping a many-to-many relationship in an O-O system, it will be necessary to create the table in the middle.
  • If classes map to tables, then associations will generally map to the inclusion of pk and fk fields.
  • Remember that the term associations in UML refers to relationships between classes.
  • A UML class diagram will be shown, followed by a table schema, followed by the SQL statement for creating the table.
  • This pattern will be repeated for following examples:.
  • An example is shown on the following overhead.
  • Since you already know databases, how it’s done will be no surpriseĬonstructors and methods in a class have nothing to do with the relational table the class is mapped to.
  • The details of this will emerge gradually.
  • Strictly speaking, classes typically don’t contain primary and foreign key attributes.
  • Each attribute in a class will map to a column in the table.
  • Each class in an O-O design will generally map to a table in a relational design.
  • Implement identity = make sure you have suitable pk identifiers in tables

    object oriented modeling and design james rumbaugh ppt

    Implement generalizations, namely classes in superclass-subclass relationships = again, create tables that are related by pk, fk pairs

    object oriented modeling and design james rumbaugh ppt

    Implement associations = create tables that are related by pk, fk pairs It’s worthwhile knowing how to do it by hand in case you have to and so you know what it is the tools generate.The book notes that there are software tools out there that will do this for you automatically.What happens next is a discussion of how elements of the OO model are converted into database constructs, like tables.The abbreviated model is shown on the following overhead.A couple of things are added so that specific db related things can be addressed which weren’t present in the original model.Some things are taken out so that the amount of stuff isn’t overwhelming.The book presents an abbreviated ATM model for chapter 19.Not surprisingly, the example pursued in chapter 19 is based on the example of chapter 12.SQL Unit 21: Object-Oriented Modeling and Design with UMLMichael Blaha and James Rumbaugh Summary of Selections from Chapter 19 prepared by Kirk ScottĬhapter 19 in the book is specifically on the topic of developing a database to match an object-oriented design









    Object oriented modeling and design james rumbaugh ppt