当前位置:高等教育资讯网  >  中国高校课件下载中心  >  大学文库  >  浏览文档

复旦大学:《面向对象分析和设计》课程资料_UML&GRASP_5.5 Iteration 3 持久化框架 DESIGNING A PERSISTENCE FRAMEWORK WITH PATTERNS

资源类别:文库,文档格式:PPT,文档页数:64,文件大小:6.61MB,团购合买
点击下载完整版文档(PPT)

DESIGNING A PERSISTENCE FRAMEWORKWITH PATTERNS

DESIGNING A PERSISTENCE FRAMEWORK WITH PATTERNS

The Problem: persistent obiects ● persistent object o An object that can survive the process or thread that created it. a persistent object exists until it is explicitly deleted e ProductDescription e Storage Mechanisms and persistent Objects Object databases Relational databases ● others

The Problem: Persistent Objects persistent object ⚫ An object that can survive the process or thread that created it. A persistent object exists until it is explicitly deleted ProductDescription Storage Mechanisms and Persistent Objects ⚫ Object databases ⚫ Relational databases ⚫ others

The Solution A Persistence service from a persistence framework The framework should provide functions such as store and retrieve objects in a persistent storage mechanism ● commit and ro∥ back transactions

The Solution: A Persistence Service from a Persistence Framework The framework should provide functions such as: ⚫ store and retrieve objects in a persistent storage mechanism ⚫ commit and rollback transactions

e persistence framework o general-purpose, reusable, and extendable set of types that provides functionality to support persistent objects ● framework o a set of collaborating abstract and concrete classes that may be used as a template to solve a related family of problems. It is usually extended via subclassing for application-specific behavior

persistence framework ⚫ general-purpose, reusable, and extendable set of types that provides functionality to support persistent objects framework ⚫ A set of collaborating abstract and concrete classes that may be used as a template to solve a related family of problems. It is usually extended via subclassing for application-specific behavior

Key Ideas e Mapping .Object identity Database mapper e Materialization and dematerialization e Caches Transaction state of object e Transaction operations e Lazy materialization vIrtual proxies

Key Ideas Mapping Object identity Database mapper Materialization and dematerialization Caches Transaction state of object Transaction operations Lazy materialization Virtual proxies

he Representing objects as Tables pattern How do you map an object to a record or relational database schema? e The Representing objects as Tables pattern

The Representing Objects as Tables pattern How do you map an object to a record or relational database schema? The Representing Objects as Tables pattern

Manufacturer MANUFACTURER TABLE Manufacturer name= Now&Zen name name cit city Mumbai Now &Zen Mumbai Celestial Shortening San Ramon

Manufacturer name city ... ... name city Now&Zen Mumbai MANUFACTURER TABLE : Manufacturer name = Now&Zen city = Mumbai Celestial Shortening San Ramon

UML Data Modeling Profile aggregate signifies a referential constraint: a ProductDescription row can t exist without a related Manufacturer row OlD: char(16) Name: varchar(100 Description: varchar (100) City: varchar (50) PK-primary key FK-foreign key Manu_ OID: char(16)

UML Data Modeling Profile «Table» ProductDescription «PK» OID : char(16) Description : varchar(100) ... «FK» Manu_OID : char(16) «Table» Manufacturer «PK» OID : char(16) Name : varchar(100) City : varchar(50) 1 * aggregate signifies a referential constraint: a ProductDescription row can't exist without a related Manufacturer row PK - primary key FK - foreign key

对关系的存储设计 将一对一关联映射到表。 两个需要存储的永久类,二者之间有一个一对一关联。 职员 与;一 办公室 职员号码 办公室名 名字 地点

对关系的存储设计

点击下载完整版文档(PPT)VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
共64页,可试读20页,点击继续阅读 ↓↓
相关文档

关于我们|帮助中心|下载说明|相关软件|意见反馈|联系我们

Copyright © 2008-现在 cucdc.com 高等教育资讯网 版权所有