Mar 20, 200291.3913 R McFadyen1 Persistent Objects Persistent objects are objects that continue to exist after the application program terminates Persistence.

Slides:



Advertisements
Similar presentations
Database Concepts Lec. 5. What Is a Database? Data are unprocessed raw facts that include text, number, images, audio, and video. Information is processed.
Advertisements

Accounting System Design
Fall 2009ACS-3913 R McFadyen1 Persistent Objects Persistent objects are objects that continue to exist after the application program terminates Persistence.
November R McFadyen1 Aggregation and Composition – section 27.2 both are associations used to denote that an object from one class is part.
ACS R McFadyen 1 Transaction A transaction is an atomic unit of work that is either completed in its entirety or not done at all. For recovery purposes,
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design Copyright 2001 © John Wiley & Sons, Inc. All rights reserved. Slide 1.
Chapter 14 Organizing and Manipulating the Data in Databases
Data Management Design
March Ron McFadyen1 Using Rational Rose to create a database.
Methodology Logical Database Design for the Relational Model
March 31, R McFadyen1 Persistent Objects Persistent objects are objects that continue to exist after the application program terminates Persistence.
Introduction to Structured Query Language (SQL)
Implementing an REA Model in a Relational Database
Michael F. Price College of Business Chapter 6: Logical database design and the relational model.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 11: Data Management Layer Design Alan Dennis, Barbara.
Introduction to the Other Databases
DBMS Lecture 9  Object Database Management Group –12 Rules for an OODBMS –Components of the ODMG standard  OODBMS Object Model Schema  OO Data Model.
Appendix B© copyright Janson Industries SQL ▮ Explain basic SQL concepts ▮ Demonstrate SQL commands ▮ Results Sets.
PHP Programming with MySQL Slide 8-1 CHAPTER 8 Working with Databases and MySQL.
I Copyright © 2004, Oracle. All rights reserved. Introduction.
Data Access Patterns Some of the problems with data access from OO programs: 1.Data source and OO program use different data modelling concepts 2.Decoupling.
CS 160: Software Engineering October 8 Class Meeting
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
1 Chapter 1 Overview of Database Concepts. 2 Chapter Objectives Identify the purpose of a database management system (DBMS) Distinguish a field from a.
RELATIONSHIPS Generally there are two main database types: flat-file and relational.
I Copyright © Oracle Corporation, All rights reserved. Introduction.
Chapter 7 Working with Databases and MySQL PHP Programming with MySQL 2 nd Edition.
CS 3630 Database Design and Implementation. 2 Mathematical Relation A mathematical relation is a subset of a Cartesian Product. A1  A2  A3  …  An.
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design Copyright 2001 © John Wiley & Sons, Inc. All rights reserved. Slide 1.
MS Access: Creating Relational Databases Instructor: Vicki Weidler Assistant: Joaquin Obieta.
1 CS 3630 Database Design and Implementation. 2 Sets Foundation of relational database. Basic Operations Power set Mapping.
1 Mathematical Relation A mathematical relation is a subset of a Cartesian Product. A1  A2  A3  …  An = {(x1, x2, x3, …, xn): xi  Ai} R  A1  A2.
Object Persistence Design Chapter 13. Key Definitions Object persistence involves the selection of a storage format and optimization for performance.
CPSC 203 Introduction to Computers Tutorial 03 & 29 By Jie (Jeff) Gao.
Chapter 12: Designing Databases
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
Core Concepts of ACCOUNTING INFORMATION SYSTEMS Moscove, Simkin & Bagranoff John Wiley & Sons, Inc. Developed by: Marianne Bradford, Ph.D. Bryant College.
Designing a Persistence Framework With Patterns
1 Mapping to Relational Databases Presented by Ramona Su.
CS 1308 Computer Literacy and the Internet
DataBase Management System What is DBMS Purpose of DBMS Data Abstraction Data Definition Language Data Manipulation Language Data Models Data Keys Relationships.
Chapter 38 Persistence Framework with Patterns 1CS6359 Fall 2011 John Cole.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 3rd Edition Copyright © 2009 John Wiley & Sons, Inc. All rights.
Core Concepts of ACCOUNTING INFORMATION SYSTEMS Moscove, Simkin & Bagranoff John Wiley & Sons, Inc. Developed by: S. Bhattacharya, Ph.D. Florida Atlantic.
Access Review. Access Access is a database application A database is a collection of records and files organized for a particular purpose Access supports.
Nov 20, R McFadyen1 Persistent Objects Key ideas/definitions UML representations Mapping patterns Transactional states Example Some commercial.
Chapter 9 Logical Database Design : Mapping ER Model To Tables.
BSA206 Database Management Systems Lecture 2: Introduction to Oracle / Overview of Database Concepts.
Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
1 ER Modeling BUAD/American University Mapping ER modeling to Relationships.
1 Announcements Reading for next week: Chapter 4 Your first homework will be assigned as soon as your database accounts have been set up.  Expect an .
Database Connectivity with ASP.NET. 2 Introduction Web pages commonly used to: –Gather information stored on a Web server database Most server-side scripting.
Elaboration Iteration 3 – Part 3 - Persistence Framework -
Understand Relational Database Management Systems Software Development Fundamentals LESSON 6.1.
1 Advanced Database Concepts Transaction Management and Concurrency Control.
Mapping Objects ↔Relational DB. The Problem with Databases Databases store data in rows in tables, which are not like objects. We can simulate object.
Relational Database Management System(RDBMS) Structured Query Language(SQL)
DESIGNING A PERSISTENCE FRAMEWORK WITH PATTERNS. The Problem: Persistent Objects persistent object An object that can survive the process or thread that.
10 1 Chapter 10 - A Transaction Management Database Systems: Design, Implementation, and Management, Rob and Coronel.
Chapter 3: Relational Databases
Microsoft Access 2010 Chapter 11 Database Design.
CS 3630 Database Design and Implementation. 2 Mathematical Relation A mathematical relation is a subset of a Cartesian Product. A1  A2  A3  …  An.
1 Database Fundamentals Introduction to SQL. 2 SQL Overview Structured Query Language The standard for relational database management systems (RDBMS)
Relational vs. Object Oriented Database Management System Syazwani Nur Dayana Nur Fatin Syafiqa M3cs2305B.
SQL 101.
Updating Databases With Open SQL
Updating Databases With Open SQL
Presentation transcript:

Mar 20, R McFadyen1 Persistent Objects Persistent objects are objects that continue to exist after the application program terminates Persistence is provided by a DBMS ACID property “D” Two main categories OODBMS RDBMS Sections Intro, 34.1, 2, 4, 5, 6,7 8, 9, 16, 19

Mar 20, R McFadyen2 Persistent Objects To use an RDBMS, we require an object to relational mapping service persistence service is a subsystem within the Technical Services Layer mismatch between record-oriented and object-oriented representations of data recommendation is to buy, not to build provides functions such as store, retrieve, modify, commit, rollback

Mar 20, R McFadyen3 Key Ideas Mapping There are two schemas: object and relational. We need a mapping that translates from one to the other. Object Identity Records and objects have a unique identifier Materialization/Dematerialization need to be able to translate the non-object representation to an object representation, and vice versa Lazy Materialization Some objects are not materialized all-at-once; part of the object may be done first, and other parts later on

Mar 20, R McFadyen4 Each class becomes a table Representing Objects as Tables pattern define a table for each persistent object class Some mappings are straight forward We require 1NF tables ClassAn objectThe table Many of these patterns mentioned come from a paper “Crossing Chasms: A Pattern Language for Object-RDBMS” published in 1996 in Pattern Languages of Program Design

Mar 20, R McFadyen5 > stereotype We can indicate tables in UML using the stereotype: >

Mar 20, R McFadyen6 OIDs Objects have an OID that is used as the PK in a relational table. Each object is uniquely mapped to a row in the table Object Identifier Pattern assigns an OID to each record and object

Mar 20, R McFadyen7 Façade Persistence subsystem will have a Façade that provides access to its services façade Requesting a ProductSpecification with a specific OID

Mar 20, R McFadyen8 Representing Relationships in Tables Representing Object Associations as Tables pattern one-to-one place an OID FK in one or both tables representing the objects in the association or, create an associative table that records the OIDs of each object in the association Consider StoreRegister houses 11

Mar 20, R McFadyen9 Representing Relationships in Tables Representing Object Associations as Tables pattern one-to-many create an associative table that records the OIDs of each object in relationship Consider ProductCatalogProductSpecification contains 11..*

Mar 20, R McFadyen10 Representing Relationships in Tables Representing Object Associations as Tables pattern many-to-many create an associative table that records the OIDs of each object in relationship CompanyPerson employs **

Mar 20, R McFadyen11 Representing Relationships in Tables Representing Object Associations as Tables pattern many-to-many AND with an Association Class create an associative table that records the OIDs of each object in relationship... CompanyPerson employs ** Employment

Mar 20, R McFadyen12 Representing Relationships in Tables Representing Object Associations as Tables pattern many-to-many AND with an Association Class create an associative table that records the OIDs of each object in relationship... Person marries * * Marriage

Mar 20, R McFadyen13 Representing Relationships in Tables Representing Object Associations as Tables pattern Aggregation and Composition... SaleSalesLineItem contains 1..* ProgrammeCourse contains 1..* *

Mar 20, R McFadyen14 Representing Relationships in Tables Representing Object Associations as Tables pattern Superclass/Subclass... Payment CreditPaymentCashPaymentChequePayment

Mar 20, R McFadyen15 Transactional States Persistent objects can be inserted, updated, deleted Transactions are committed or rolled back Consider as states for a persistent object : New, OldClean, OldDirty, OldDelete, and Deleted Figure helps us understand how and when a persistent object can be in a certain persistent state. This is useful if you need to design/code this capability, or perhaps to help you evaluate a package providing this service

Mar 20, R McFadyen16 Transactional States New an object is created in the application, but does not exist in the database yet OldClean When a new object is committed, or when an object is first materialized from the database it is old and it is clean (hasn’t been altered by an application) OldDirty When an object that is represented in the database is modified by an application, it is considered dirty (it has values that are not the same as those in the database copy)

Mar 20, R McFadyen17 Transactional States OldDelete When an object that is represented in the database is deleted by an application it is considered deleted, but this is not permanent yet (the transaction has not committed) Deleted An object is considered deleted when the application that deleted it is committed.

Mar 20, R McFadyen18 Transactional States - Fig modified This statechart diagram is a succinct representation of the states that an object may be in.