Symbian3/SDK/Source/GUID-B3248893-9944-5544-84EA-0F4D40992152.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 13 Aug 2010 16:47:46 +0100
changeset 14 578be2adaf3e
parent 7 51a74ef9ed63
permissions -rw-r--r--
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-B3248893-9944-5544-84EA-0F4D40992152" xml:lang="en"><title>Introduction
to DBMS databases</title><shortdesc>DBMS provides a functional interface to a relational <keyword>database</keyword>. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<section id="GUID-17774558-A960-43C1-BE06-F549BBC24082"><title>Introduction</title> <p>A
database contains a collection of <keyword>tables</keyword>. A table contains
a set of <keyword>rows</keyword>. A row contains a set of <keyword>columns</keyword>.
Every row in a table conforms to a structure described by the table's <keyword>column
set</keyword>. Tables can also <keyword>index</keyword> certain columns to
sort their rows into a particular order, or provide fast <keyword>key</keyword> -based
access to their rows. </p> <p>Database application programs use a <keyword>rowset</keyword>,
which maintains a <keyword>cursor</keyword> on a current row within that set.
The rowset provides an abstract interface. Two types of rowset are provided: </p> <ul>
<li id="GUID-8348CDA0-FACF-5010-813E-325FFFC66C62"><p>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. </p> </li>
<li id="GUID-7FAF3656-05E2-5C1B-8E3E-C3523D133995"><p>an SQL view is a rowset
generated by an <keyword>SQL</keyword> 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. </p> </li>
</ul> </section>
<section id="GUID-1164A8BE-9B01-4F20-85F0-5C6788DE467C"><title>DBMS transactions</title> <p>DBMS
supports various DDL (Schema update) statements and DML (Data update) statements. </p> <p>Atomicity
of updates is supported by a <keyword>transaction</keyword> mechanism. A transaction
may be begun explicitly, otherwise all updates are made inside an <keyword>automatic
transaction</keyword>. Explicitly begun transactions are ended by either a <keyword>commit</keyword> or
a <keyword>rollback</keyword>. 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. </p> <p>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 <keyword>incrementally</keyword>, so that a user program
can remain responsive to other events. </p> </section>
<section id="GUID-C9F656D8-806F-4B88-AEDE-E990C1ADE3BE"><title>DBMS API</title> <p>There
are two implementations of the API, <xref href="GUID-F4A68645-2265-307F-B951-8295827E000B.dita"><apiname>RDbStoreDatabase</apiname></xref> and <xref href="GUID-6433D7F9-B4C7-39DA-BEF4-5EA22B8478A2.dita"><apiname>RDbNamedDatabase</apiname></xref>. </p> <p>The <xref href="GUID-F4A68645-2265-307F-B951-8295827E000B.dita"><apiname>RDbStoreDatabase</apiname></xref> class provides the means to create and open an exclusive client-side database.
The <xref href="GUID-6433D7F9-B4C7-39DA-BEF4-5EA22B8478A2.dita"><apiname>RDbNamedDatabase</apiname></xref> 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. </p> <p>The DBMS API is
written specifically to allow alternative database implementations to be written,
although a new implementation would be a non-trivial undertaking. </p> </section>
</conbody><related-links>
<link href="GUID-A278C1A2-0724-5800-B353-46809C44C142.dita"><linktext>Transactions
on store databases</linktext></link>
<link href="GUID-F5B0FE6A-6DE6-56B5-89A5-684CD2602B40.dita"><linktext>Implementation
limits</linktext></link>
</related-links></concept>