Relational Databases and Object Orientation RDBMS and Object Orientation are not entirely compatible RDBMS ·Focus is on data Better suited for ad-hoc relationships and reporting application Expose data (column values) Object Oriented system ·Focus is on behavior Better suited to handle state-specific behavior where data is secondary Hide data (encapsulation) Object Oriented Analysis and Design 6
Object Oriented Analysis and Design 6 RDBMS and Object Orientation are not entirely compatible ▪ RDBMS • Focus is on data • Better suited for ad-hoc relationships and reporting application • Expose data (column values) ▪ Object Oriented system • Focus is on behavior • Better suited to handle state-specific behavior where data is secondary • Hide data (encapsulation) Relational Databases and Object Orientation
The Relational Data Model Relational model is composed of Entities Relations Entity Relation ORDER LINE ITEM products Order_ld Lineltem_ld lineltems Description Price PRODUCT lineltem order Quantity Product_ld Product_ld Order_ld Name Price Columns Object Oriented Analysis and Design
Object Oriented Analysis and Design 7 The Relational Data Model Relational model is composed of ▪ Entities ▪ Relations ORDER LINE ITEM PRODUCT Order_Id LineItem_Id Description Price Quantity Product_Id Order_Id Product_Id Name Price lineItem order products lineItems Entity Relation Columns