DBMS provides a functional interface to a relational database.
A database contains a collection of tables. A table contains a set of rows. A row contains a set of columns. Every row in a table conforms to a structure described by the table's column set. Tables can also index certain columns to sort their rows into a particular order, or provide fast key -based access to their rows.
Database application programs use a rowset, which maintains a cursor on a current row within that set. The rowset provides an abstract interface. Two types of rowset are provided:
a table rowset is an entire table in a database. Row ordering is either undefined, or by one of the table’s indexes. Fast key-based retrieval using an index can be performed on a table.
an SQL view is a rowset generated by an SQL query on a database. Cursor navigation is implemented by evaluating the view as necessary. Since evaluation may be expensive, a pre-evaluation window may be specified, allowing the rowset to be evaluated once and navigated quickly. Rowsets can also be evaluated in steps.
DBMS supports various DDL (Schema update) statements and DML (Data update) statements.
Atomicity of updates is supported by a transaction mechanism. A transaction may be begun explicitly, otherwise all updates are made inside an automatic transaction. Explicitly begun transactions are ended by either a commit or a rollback. One restriction is that transactions may contain either only data manipulation operations, or only data definition operations: combinations of both types of operation are not supported.
There are a few operations on a database which may take an unknown and potentially long time to execute, such as index creation or recovery. An interface is provided to run these operations incrementally, so that a user program can remain responsive to other events.
There are two implementations of the API, RDbStoreDatabase and RDbNamedDatabase.
The RDbStoreDatabase class provides the means to create and open an exclusive client-side database. The RDbNamedDatabase provides the interface for creating and opening a database identified by name and its format; this is used when accessing a shared database through the DBMS client/server mechanism. The default data storage method is as a store database.
The DBMS API is written specifically to allow alternative database implementations to be written, although a new implementation would be a non-trivial undertaking.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.