angela m. carthan advanced database systems csc 8712 georgia state university department of computer...

Download Angela M. Carthan Advanced Database Systems CSC 8712 Georgia State University Department of Computer Science Technology 15 April 2008 Embedded Database

If you can't read please download the document

Upload: shreya-brenton

Post on 29-Mar-2015

217 views

Category:

Documents


1 download

TRANSCRIPT

  • Slide 1

Angela M. Carthan Advanced Database Systems CSC 8712 Georgia State University Department of Computer Science Technology 15 April 2008 Embedded Database Management Systems Slide 2 Outline What are Embedded Database Management (EDBM) Systems? Embedded Database vs. Regular Database Systems Real Time Database for Embedded Systems Embedding the db4o Object-Oriented Database Reducing Energy Consumption of Queries in Memory-resident Database Systems Storage Elasped Time Object Analysis Patterns for Embedded Systems Slide 3 Introduction Embedded DBMS vs. regular DBMS??? Handling Complex Operations Disk Storage Space Expectations for user have gone up Size Cost Newer Design Growth in Memory Technology Data being shifted from memory to disk DBMS capabilities are improving nowadays Slide 4 What are Embedded Database Management Systems? Embedded Systems- A specialized computer system that is part of a larger system. Housed on a single microprocessor board with the programs stored in ROM. All appliances that have a digital interface.digital interface watches microwaves, VCRs, cars -- utilize embedded systems Embedded Database Systems- A database management system (DBMS) embedded into an application. Introduced in 1980s The first embedded databases largely 8-bit, or possibly 16-bit Nowadays EDBMS matured and gained faster (32-bit) processors, memory, and more complexity. Slide 5 Diagram of Embedded Storage Slide 6 Real Time Database for Embedded Systems Often assumed that fast data processing engine, meets real- time requirements. Input data must be correlated, merged, or compared. Data must be shared by concurrent tasks with different functions, time requirements and degrees of importance. Real Time systems use DBMS as a part of the architecture Simplify design Streamline development Improve performance. Slide 7 Slide 8 Current Usage of RTDMS using Embedded Systems McObjects eXtremeDB - the latest commercial addition to family of EDB for real time-systems. Eliminate performance overhead while providing a predictable and reliable transactional model. Works best for pseudo-real-time and real-time systems; telecommunications equipment, factory floor automation systems, process control, zero-latency consumer electronics devices, and medical equipment. Slide 9 Vs. Traditional Database Systems Real-time database systems (RTDBSs) - repositories for data and provide efficient storage, retrieval and manipulation of data. Differences lie in the requirements of the managed data, timing constraints on transactions, and performance goals.T Conventional DBMS goal is to achieve good throughput or average response time Real-Time DBMS provides a predictable response time to guarantee the completion of time-critical transactions. Slide 10 Embedding the db4o Object Oriented Database db4o -open-source, object-oriented database from db4objects. Versions of db4o exist for Java and.NET/Mono. It's an ideal OODBMs engine for Linux applications written in either the Java or.NET frameworks. Allows multiuser access- any access on the database is invisibly wrapped in a transaction and all operations adhere to ACID principles (atomicity, consistency, isolation and durability). Slide 11 Example; A Dictionary Database The application manipulates a database that stores words and their definitions. In such an application, we might define a class to model dictionary entries as follows: Slide 12 Define Class public class DictEntry { private string theWord; private string pronunciation; private ArrayList definitions; public DictEntry() { } // Create a new Dictionary Entry public DictEntry(string _theWord, string _pronunciation) {theWord = _theWord; pronunciation = _pronunciation; definitions = new ArrayList(); } Slide 13 Develop a class describing definition public class Defn { public static int NOUN = 1; public static int PRONOUN = 2; public static int VERB = 3; public static int ADJECTIVE = 4; public static int ADVERB = 5; public static int CONJUNCTION = 6; public static int PARTICIPLE = 7; public static int GERUND = 8; private int pos; private string definition; public Defn(int _pos, string _definition) { pos = _pos; definition = _definition; } Slide 14 Individual characters within a word are stored at different node levels. Slide 15 Activation Depth- Ie; Suppose I've fetched object A into memory from a db4o database using a db.get() call. If I then call db.activate(A,6), that tells db4o also to fetch into memory all objects referenced by A, up to a depth of 6. db.activate() calls that are sprinkled throughout the search routines of the binary tree and the trie classes ensure that the search operation always pulls in enough of the index so that the search can proceed. Object Memory Db.get() Db.activate(A.6 ) Slide 16 Drawbacks Accessibility Poor Elapsed Time Rate Slide 17 Vs. Traditional Database Systems Unlike Traditional object-relational database systems, db4o does not require you to pass your code through an instrumentation pre- or post-compilation step. Nor must classes whose objects are to be made persistent be derived from a special persistence-aware superclass. db4o works with ordinary objects, and does not to be informed of an object's structure before that object is stored into a db4o database. Slide 18 Reducing Energy Consumption of Queries in Memory-resident Database Systems Memory paradigm is different Partitioned and more structured Banks each bank can be controlled individually Lot of work done for compilers, OS and architecture Authors goal Study the implications of banked memory environment on memory- resident databases Reduce energy consumption of embedded systems that run such DBMS Reduce energy consumption of embedded systems that run such DBMS Any interesting takes from DBMS? Cannot simply extend existing models Hardware and DB designers can use our results for redesigning embedded DBMS Slide 19 Slide 20 Banked Memory Slide 21 Available Operating Modes Active (2.063 nJ) Power Dwn (0.025 nJ) Nap (0.035 nJ) Standby (0.743 nJ) Read / Write 9000 cycles1 cycle 16 cycles Slide 22 Energy Management Idea Goal: To reduce the energy consumption of a query by utilizing banks idleness during the querys execution A query accesses only a small set of tables a.k.a, banks Unused memory banks can be placed into a low-power operating mode Question is how and when? Two approaches Correct (automated) use of low-power modes at hardware level Changing a query to use minimal energy software level Slide 23 Hardware Scheme Static Standby Already exists in most memory systems (RDRAM) Its a per-access optimization After a read/write access, the memory module that gets accessed can be placed into the standby mode in the following cycle. Open/close (page) policies - Static standby mode Scheme may lead to frequent resynchronizations The rest of the schemes that we propose aim to minimize the expensive resynchronization costs (also, static) Slide 24 Hardware Scheme Dynamic Threshold Full Power StandbyNap Power Down 10 1001000 1 16 9000 Slide 25 Query plans give a detailed break up of primitive operations that are contained in a query A typical query will have: Scan (SELECT) Check for a condition (>, Bibliography [ Konrad04] Sascha Konrad, Betty H.C.Cheng, Object Analysis Patterns for Embedded Systmes," IEEE Transactions on Software Engineering (IEEE 04), pages 970-992. [Pisharath04] Jayapraskash Pisharath, Alok Choudhary, Mahmut Kandemir, Reducing Engergy Consumption of Queries in Memory-Resident Database Systems," International Conference on Compilers, Architectures and Synthesis of Embedded Systems (CASES 04), Washington, DC, September 24, 2004, pages 35-45. [Cmkovic05] Ivica Cmkovix, Component- Based Software Engineering for Embedded Systems," Internation Conference on Software Engineeing (ICSE 05), St.Louus, MS, May 15- 21, 2005, pages 712-715 [Kraft07] Tobias Kraft, A Cost Estimation Component for Statement Sequences, Very Large Databases Conference,(VLDB), Vienna, Austria, September 23-28, 2007, pages 1382- 1385 [Navas01] Julio Navas, Michael Wynblatt, The Network is the Database, Association of Computer Machinery (ACM), Santa Barbara, CA May 21-24, 2001, pages 544-551