DOC PREVIEW
CU-Boulder CSCI 5448 - Object Relational Database Mapping

This preview shows page 1-2-17-18-19-35-36 out of 36 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 36 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 36 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 36 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 36 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 36 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 36 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 36 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 36 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

+Object Relational Database Mapping Alex Boughton Spring 2011+Presentation Overview  Overview of database management systems  What is ORDM  Comparison of ORDM with other DBMSs  Motivation for ORDM  Quick Example  How does ORDM work  Attributes of ORDM  Discussion of ORMLite framework  Main Components  Conceptual Diagrams and Comparisons  In depth look at ORMLite and using its support for Android OS  More Motivation  Comparison using ORDM and RDBMS in an Android application  Trade offs specific to ORMLite and Android Applications+Overview of Database Technologies  Relational Database Management Systems introduced in 1970[3]  mySQL, SQLite3  Object Oriented Database Management Systems were released next+Overview of Database Technologies (cont.)  Object Relational Mapping Database Management APIs were developed out of motivation to combine the good things from the previous two.  Introduced in 1990’s[1]  Combined rich data type support and code minimization offered by OODBMS with the speed and portability of RDBMS * There are other types of database management systems (i.e. Document-oriented, NoSQL) but they are not mentioned here because they are not in the scope of object oriented development.+What is Object Relational Database Mapping?  Programming technique typically utilized through an API  Can be implemented by the application  A few popular APIs[1]  Hibernate – widely used Java implementation  ORMlite – Java implementation, gaining popularity with its new Android support (more on this API later)  Django – Python framework that has ORDM support built in  Core Data – Cocoa framework that ships with Mac OSX and iPhoneOS+Object Relational Database Mapping Advantages  Allows developers to convert data from rich data types used in object oriented programming languages to lower level relational database types  Allows the use of self defined ADTs in database storage  Helps developers maintain continuity in databases that are shared between applications  For example instead of storing “address” as a VARCHAR, you can store it as an ADT Address with the specified format of that data type. Have all applications use the same Address class and continuity is achieved.+Object Relational Mapping Limitations  With the ability to have complex ADTs, efficiency may be lower for large scale applications  Database size can also increase depending on the amount of methods stored with the objects and the number of entries stored  Many larger applications with frequent database read/write activity will not gain from ORDM.  ORDM can be very useful for mobile phone use(example later) and small applications+What is a Relational Database?  Relational Database Management System (RDBMS)  Simple data with queries  Example of data types in SQLite3 (Supported on Android OS and iPhone OS)[2] Data Type Description NULL Null value INTEGER signed integer REAL floating point value, stored as an 8-byte IEEE floating point BLOB blob of data, stored exactly as it was input TEXT text string, stored using the database encoding+Relational Database Data Type Limitations and Advantages[3]  Lack of support for abstract data types (ADTs) causes extra code in applications for going in between raw data types and ADTs  The simplistic data types can be faster for large databases and applications where speed is important  Uses Structured Query Language (SQL) which makes databases portable across different systems+What are Object Oriented Databases?[1]  Essentially allows objects to be stored persistently with support for storage and retrieval  Allows for complex data storage but does not use SQL for query support  ODL – Object Defining Language  OID – Object ID  OQL – Object Query Language; similar to SQL but has features for inheritance, polymorphism, and object identity+Object Oriented Database Management Systems Limitations and Advantages[3]  Decreases the amount of code in applications because they don’t need to generate SQL statements  Poor performance and scalability compared to other data storage methods  Difficulty catching on because with lack of standards developers are cautious about using these systems  Introduced the idea for better data type support in database systems+Motivation for ORDM Technology[4]  Wanted the efficiency from having the underlying RDBMS implementation, along with the portability gained by using the SQL  Wanted ADTs, inheritance, and polymorphism as in OODBMS implementation  Result was a software layer between RDBMS and applications to provide both.  ORDM Technology arose in the 1990’s and gained popularity with the rise of social media and web applications[3]+Code Example for RDBMS[4]  Query to select names of customers whose address is in New York  The query requires information from “Customers” and “Addresses” because the database does not know the relationship between customer id’s and the unique identifier in the table “Addresses”+Code Example for ORDBMS (cont.)  The same query to select the names of customers who live in New Yo rk  The query becomes more simple for the developer because the database knows that the customers are linked to the address by their id’s+Attributes Common to ORDM APIs  Database  Underlying RDBMS implementation  ORMLite supports MySQL, SQLite, Postgres, Oracle and others  Query Representation  Offer a simplified way for developers to issue queries  Many APIs also offer support for executing raw SQL statements  Data Object  Some API’s have interfaces that the application defined objects must implement  Usually require an empty constructor  Must use some mark up language(@ notation in eclipse) or some other way to denote which data fields will be stored+Attributes Common to ORDM APIs (cont.)  Iterator  Sometimes referred to as a cursor  Typically the API will implement this class as a subclass of the RDBMS’s Iterator class, giving the developer a better encapsulation for  Objects for logging support  Other Database specific classes that vary with the RDBMS implementation+A


View Full Document

CU-Boulder CSCI 5448 - Object Relational Database Mapping

Documents in this Course
Django

Django

42 pages

ENRS

ENRS

30 pages

PhoneGap

PhoneGap

22 pages

Load more
Download Object Relational Database Mapping
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Object Relational Database Mapping and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Object Relational Database Mapping 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?