DataPersistence

DataPersistence - Data Persistence CS 340 Persistence...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Data Persistence CS 340 Persistence Strategies ` There are many strategies a program can use for persisting its in-memory object model ` Approach #1 – Full in-memory object model with bulk updates ` Approach #2 – Full in-memory object model with incremental updates ` Approach #3 – Partial in-memory object model with incremental updates Full in-memory object model with bulk updates ` Load full object model from disk into memory ` Application features operate on in-memory object model ` Save full object model to disk at appropriate times (“Save”, application exit, etc.) ` Crash causes data loss ` Full in-memory model and bulk load/save is not feasible for large data sets Full in-memory object model with incremental updates ` Load full object model from disk into memory ` Application features operate on in-memory object model ` Incremental changes to the in-memory object model are immediately saved to disk ` Full in-memory model and bulk load is not feasible for large data sets Partial in-memory model with incremental updates ` Full object model exists only on disk (not in memory) ` Application dynamically loads a subset of the object model from disk as needed to perform an operation. ` Incremental changes to the partial in-memory object model are immediately saved to disk ` The partial in-memory object model is discarded when the operation is complete ` Scales to large data sets ` Takes work to fetch the data required for each operation Persistence Technologies ` Persistence Options ` Serialization ` XML ` Custom file format ` Database ` Cloud storage services (Amazon, Microsoft, Google, …) ` Each of these approaches is appropriate in different contexts ` Database advantages ` Easy to use ` Allows incremental updates ` Allows concurrent data sharing by multiple users and programs ` Relational Databases are the most common Database Management Systems (DBMS) ` Databases are implemented by software systems called Database Management Systems (DBMS) ` Commonly used Relational DBMS’s include MySQL, MS SQL Server, and Oracle ` DBMS’s store data in files in a way that scales to large amounts of data and allows data to be accessed efficiently Programmatic vs. Interactive Database Access DB Program DB Driver Management Console Programs can access a database through APIs such as ADO.NET or JDBC. End users can access a database through an interactive management application that allows them to query and modify the database. DB API Embedded vs. Client/Server DB Program DB Driver DB Program DB Driver DB Server Network Local File Access Local File Access Some DBMS’s are Embedded only. Some are Client/Server only. Some can work in either mode. DB API DB API Relational Databases ` Relational databases use the relational data model you learned about in CS 236 ` In the object-oriented data model we have classes. Objects are instances of classes. Objects have attributes. Relationships between objects are represented as pointers....
View Full Document

This note was uploaded on 03/02/2012 for the course C S 340 taught by Professor Woodfield,s during the Winter '08 term at BYU.

Page1 / 37

DataPersistence - Data Persistence CS 340 Persistence...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online