embedded database management systems
Post on 30-Dec-2015
79 Views
Preview:
DESCRIPTION
TRANSCRIPT
Angela M. CarthanAdvanced Database Systems CSC 8712
Georgia State UniversityDepartment of Computer Science
Technology15 April 2008
Embedded Database Management Systems
OutlineWhat are Embedded Database
Management (EDBM) Systems?Embedded Database vs. Regular
Database SystemsReal Time Database for Embedded SystemsEmbedding the db4o Object-Oriented
DatabaseReducing Energy Consumption of Queries in
Memory-residentDatabase Systems Storage Elasped Time
Object Analysis Patterns for Embedded Systems
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
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 .
watches microwaves, VCRs, cars -- utilize embedded systems
Embedded Database Systems- A database management system (DBMS) embedded into an application.Introduced in 1980’s
The first embedded databases largely 8-bit, or possibly 16-bit
Nowadays EDBMS matured and gained faster (32-bit) processors, memory, and more complexity.
Diagram of Embedded Storage
Real Time Database for Embedded SystemsOften 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 architectureSimplify designStreamline developmentImprove performance.
Current Usage of RTDMS using Embedded SystemsMcObject’s 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.
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.
Embedding the db4o Object Oriented Databasedb4o -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).
Example;A Dictionary DatabaseThe 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:
Define Classpublic 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();
}
Develop a class describing definitionpublic 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;
}
Individual characters within a word are stored at different node levels.
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)
Drawbacks
Accessibility
Poor Elapsed Time Rate
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.
Reducing Energy Consumption of Queries in Memory-resident Database SystemsMemory paradigm is different
Partitioned and more structuredBanks – each bank can be controlled individuallyLot of work done for compilers, OS and
architectureAuthor’s goal
Study the implications of banked memory environment on memory-resident databases
Reduce energy consumption of embedded systems that run such DBMS
Any interesting takes from DBMS?Cannot simply extend existing modelsHardware and DB designers can use our results
for redesigning embedded DBMS
text Query OptimizerQuery Execution
Engine
Memory Database
Queries
Data
Results
Energy & Performance Optimizations
(Using Cost Plan)
Hardware Optimizations
Targeting DBMS
Rewrite SystemParser
System Catalog
Banked Memory
Configuration Registers
Self-Monitoring/Prediction Hardware
Memory Controller
Bank
To/From CPU
Module
Memory Bus
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
Energy Management IdeaGoal: To reduce the energy consumption of a query by
utilizing banks idleness during the query’s execution A query accesses only a small set of tables a.k.a, banksUnused memory banks can be placed into a low-power
operating mode Question is “how” and “when”?
Two approachesCorrect (automated) use of low-power modes at hardware
levelChanging a query to use minimal energy – software level
Hardware Scheme – Static StandbyAlready exists in most memory systems
(RDRAM)It’s a per-access optimizationAfter 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 modeScheme may lead to frequent resynchronizationsThe rest of the schemes that we propose aim to
minimize the expensive resynchronization costs (also, static)
Hardware Scheme – Dynamic Threshold
Full Power
Standby NapPower
Down
10
100 1000
1
16
9000
Query plans give a detailed break up of “primitive” operations that are contained in a queryA typical query will have:
Scan (SELECT)Check for a condition (>, <, ==)Refine results (GROUP BY, JOIN)Could also be recursive (scan of scan)
SQL Example: Who’s birthday is it today?
SELECT nameFROM addressbookWHERE DOB = “today”
and CITY = “my city”
Energy Evaluation
Software scheme is the bestBank idleness are well estimated using
access patterns
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
P1 P2 P3
No
rma
lize
d E
ne
rgy
Static Standby Dynamic Threshold On/Off Instr
ConclusionThere is a gap between memory growth and
DB designVerified this by simple hardware and software
schemes to reduce energy consumptionHardware vs. Software schemes
Hardware is good when access patterns are totally random
Software is good when access patterns show enough inter-table access times (which is related to energy savings) – up to 68% reduction in energy
Combination of both would be ideal
Improvement: Object Analysis Patterns for Embedded SystemsCurrently, most embedded systems uses ad
hoc development approaches that emphasize design coding over analysis. Analyze phase is often neglect in current
development practice. This causes errors during design and coding.
Propose; Object Analysis Patterns for use in the analysis phase in the development to guide construction.Meets System RequirementsLower Elapsed TimeLower Shipping Cost
Broy Logical Interface Architecture for Embedded Systems
Abstracted Software Development Process
Example; User Interface
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
top related