Symbian3/SDK/Source/GUID-FCBEE38E-FA6D-5C09-8B17-F18EF3E2E826.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Thu, 21 Jan 2010 18:18:20 +0000
changeset 0 89d6a7a84779
permissions -rw-r--r--
Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385

<?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 xml:lang="en" id="GUID-FCBEE38E-FA6D-5C09-8B17-F18EF3E2E826"><title>Columns, column sets and keys</title><prolog><metadata><keywords/></metadata></prolog><conbody><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>. Each column has attributes such as a name, a type, a maximum length, etc. Column types include every type of integer, real, date-time and text supported by Symbian OS. In addition, a long binary column (sometimes known as BLOBs) may be written using the <keyword>stream</keyword> interface, allowing stream-aware components to use a database column for persistence. </p> <p>Auto-increment columns support automatic key or id generation. Column names within a single table must be unique, and follow the rules for DBMS names. A column definition is encapsulated by the <codeph>TDbCol</codeph> class, and the set of columns which describes the table in the <codeph>CDbColSet</codeph> class.</p> <p>Every <keyword>index</keyword> in a database is defined by its <keyword>key</keyword>, represented by the <codeph>CDbKey</codeph> class. Tables can index certain columns to sort their rows into a particular order, or provide fast key-based access to their rows. A key has attributes such as being unique or primary, a comparison specification for text columns, and a list of columns which make up the key, the <codeph>TDbKeyCol</codeph> class.</p> <p>See also:</p> <ul><li id="GUID-E72E42DB-EA6F-5021-BC8A-36C905ADDAC9"><p><xref href="GUID-8579426F-C443-558B-9380-FED79D4BA8F4.dita">Rules for DBMS names</xref> </p> </li> </ul> </conbody></concept>