|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-B3248893-9944-5544-84EA-0F4D40992152" xml:lang="en"><title>Introduction |
|
13 to DBMS databases</title><shortdesc>DBMS provides a functional interface to a relational <keyword>database</keyword>. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <section id="GUID-17774558-A960-43C1-BE06-F549BBC24082"><title>Introduction</title> <p>A |
|
15 database contains a collection of <keyword>tables</keyword>. A table contains |
|
16 a set of <keyword>rows</keyword>. A row contains a set of <keyword>columns</keyword>. |
|
17 Every row in a table conforms to a structure described by the table's <keyword>column |
|
18 set</keyword>. Tables can also <keyword>index</keyword> certain columns to |
|
19 sort their rows into a particular order, or provide fast <keyword>key</keyword> -based |
|
20 access to their rows. </p> <p>Database application programs use a <keyword>rowset</keyword>, |
|
21 which maintains a <keyword>cursor</keyword> on a current row within that set. |
|
22 The rowset provides an abstract interface. Two types of rowset are provided: </p> <ul> |
|
23 <li id="GUID-8348CDA0-FACF-5010-813E-325FFFC66C62"><p>a table rowset is an |
|
24 entire table in a database. Row ordering is either undefined, or by one of |
|
25 the table’s indexes. Fast key-based retrieval using an index can be performed |
|
26 on a table. </p> </li> |
|
27 <li id="GUID-7FAF3656-05E2-5C1B-8E3E-C3523D133995"><p>an SQL view is a rowset |
|
28 generated by an <keyword>SQL</keyword> query on a database. Cursor navigation |
|
29 is implemented by evaluating the view as necessary. Since evaluation may be |
|
30 expensive, a pre-evaluation window may be specified, allowing the rowset to |
|
31 be evaluated once and navigated quickly. Rowsets can also be evaluated in |
|
32 steps. </p> </li> |
|
33 </ul> </section> |
|
34 <section id="GUID-1164A8BE-9B01-4F20-85F0-5C6788DE467C"><title>DBMS transactions</title> <p>DBMS |
|
35 supports various DDL (Schema update) statements and DML (Data update) statements. </p> <p>Atomicity |
|
36 of updates is supported by a <keyword>transaction</keyword> mechanism. A transaction |
|
37 may be begun explicitly, otherwise all updates are made inside an <keyword>automatic |
|
38 transaction</keyword>. Explicitly begun transactions are ended by either a <keyword>commit</keyword> or |
|
39 a <keyword>rollback</keyword>. One restriction is that transactions may contain |
|
40 either only data manipulation operations, or only data definition operations: |
|
41 combinations of both types of operation are not supported. </p> <p>There are |
|
42 a few operations on a database which may take an unknown and potentially long |
|
43 time to execute, such as index creation or recovery. An interface is provided |
|
44 to run these operations <keyword>incrementally</keyword>, so that a user program |
|
45 can remain responsive to other events. </p> </section> |
|
46 <section id="GUID-C9F656D8-806F-4B88-AEDE-E990C1ADE3BE"><title>DBMS API</title> <p>There |
|
47 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. |
|
48 The <xref href="GUID-6433D7F9-B4C7-39DA-BEF4-5EA22B8478A2.dita"><apiname>RDbNamedDatabase</apiname></xref> provides the interface for creating |
|
49 and opening a database identified by name and its format; this is used when |
|
50 accessing a shared database through the DBMS client/server mechanism. The |
|
51 default data storage method is as a store database. </p> <p>The DBMS API is |
|
52 written specifically to allow alternative database implementations to be written, |
|
53 although a new implementation would be a non-trivial undertaking. </p> </section> |
|
54 </conbody><related-links> |
|
55 <link href="GUID-A278C1A2-0724-5800-B353-46809C44C142.dita"><linktext>Transactions |
|
56 on store databases</linktext></link> |
|
57 <link href="GUID-F5B0FE6A-6DE6-56B5-89A5-684CD2602B40.dita"><linktext>Implementation |
|
58 limits</linktext></link> |
|
59 </related-links></concept> |