1*cdf0e10cSrcweir<?xml version="1.0" encoding="UTF-8"?>
2*cdf0e10cSrcweir<helpdocument version="1.0">
3*cdf0e10cSrcweir
4*cdf0e10cSrcweir<!--
5*cdf0e10cSrcweir***********************************************************************
6*cdf0e10cSrcweir *
7*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8*cdf0e10cSrcweir *
9*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates.
10*cdf0e10cSrcweir *
11*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite
12*cdf0e10cSrcweir *
13*cdf0e10cSrcweir * This file is part of OpenOffice.org.
14*cdf0e10cSrcweir *
15*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify
16*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3
17*cdf0e10cSrcweir * only, as published by the Free Software Foundation.
18*cdf0e10cSrcweir *
19*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful,
20*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of
21*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details
23*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code).
24*cdf0e10cSrcweir *
25*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License
26*cdf0e10cSrcweir * version 3 along with OpenOffice.org.  If not, see
27*cdf0e10cSrcweir * <http://www.openoffice.org/license.html>
28*cdf0e10cSrcweir * for a copy of the LGPLv3 License.
29*cdf0e10cSrcweir *
30*cdf0e10cSrcweir ************************************************************************
31*cdf0e10cSrcweir -->
32*cdf0e10cSrcweir
33*cdf0e10cSrcweir
34*cdf0e10cSrcweir<meta>
35*cdf0e10cSrcweir      <topic id="textsharedguidedata_tabledefinexml" indexer="include" status="PUBLISH">
36*cdf0e10cSrcweir         <title xml-lang="en-US" id="tit">Table Design</title>
37*cdf0e10cSrcweir         <filename>/text/shared/guide/data_tabledefine.xhp</filename>
38*cdf0e10cSrcweir      </topic>
39*cdf0e10cSrcweir   </meta>
40*cdf0e10cSrcweir   <body>
41*cdf0e10cSrcweir<bookmark xml-lang="en-US" branch="index" id="bm_id3155448"><bookmark_value>tables in databases; creating in design view (manually)</bookmark_value>
42*cdf0e10cSrcweir      <bookmark_value>designing; database tables</bookmark_value>
43*cdf0e10cSrcweir      <bookmark_value>properties;fields in databases</bookmark_value>
44*cdf0e10cSrcweir      <bookmark_value>fields;database tables</bookmark_value>
45*cdf0e10cSrcweir      <bookmark_value>AutoValue (Base)</bookmark_value>
46*cdf0e10cSrcweir      <bookmark_value>primary keys;design view</bookmark_value>
47*cdf0e10cSrcweir</bookmark><comment>MW deleted "database tables;" and changed "tables in databases;"</comment><comment>UFI added AutoValue and Primary Key entry - i48831</comment><comment>MW changed Tables in databases, AutoValue and Primary Key entries</comment>
48*cdf0e10cSrcweir<paragraph xml-lang="en-US" id="par_id3155448" role="paragraph" l10n="E" oldref="103"
49*cdf0e10cSrcweir                 localize="false"/>
50*cdf0e10cSrcweir      <paragraph xml-lang="en-US" id="hd_id3149798" role="heading" level="1" l10n="U"
51*cdf0e10cSrcweir                 oldref="104"><variable id="data_tabledefine"><link href="text/shared/guide/data_tabledefine.xhp" name="Table Design">Table Design</link>
52*cdf0e10cSrcweir</variable></paragraph>
53*cdf0e10cSrcweir      <paragraph xml-lang="en-US" id="par_id3155535" role="paragraph" l10n="U" oldref="2">This section contains information about how to create a new database table in the <link href="text/shared/explorer/database/05010000.xhp" name="design view">design view</link>.</paragraph>
54*cdf0e10cSrcweir      <paragraph xml-lang="en-US" id="par_id3154288" role="paragraph" l10n="CHG" oldref="3">Open the database file of the database where you want a new table. Click the <emph>Tables</emph> icon. Choose <emph>Create Table in Design View</emph> to create a new table.</paragraph>
55*cdf0e10cSrcweir      <paragraph xml-lang="en-US" id="par_id3146798" role="paragraph" l10n="U" oldref="4">In the Design view, you can now create the fields for your table.</paragraph>
56*cdf0e10cSrcweir      <list type="unordered">
57*cdf0e10cSrcweir         <listitem>
58*cdf0e10cSrcweir            <paragraph xml-lang="en-US" id="par_id3153349" role="listitem" l10n="U" oldref="5">Enter new fields in rows from top to bottom. Click the <emph>Field Name</emph> cell and enter a field name for each data field.</paragraph>
59*cdf0e10cSrcweir         </listitem>
60*cdf0e10cSrcweir         <listitem>
61*cdf0e10cSrcweir            <paragraph xml-lang="en-US" id="par_id1595507" role="listitem" l10n="NEW">Include a "primary key" data field. Base needs a primary key to be able to edit the table contents. A primary key has unique contents for each data record. For example, insert a numerical field, right-click the first column, and choose <emph>Primary Key</emph> from the context menu. Set <emph>AutoValue</emph> to "Yes", so Base can automatically increment the value for each new record.</paragraph>
62*cdf0e10cSrcweir         </listitem>
63*cdf0e10cSrcweir         <listitem>
64*cdf0e10cSrcweir            <paragraph xml-lang="en-US" id="par_id3150084" role="listitem" l10n="U" oldref="6">In the next cell to the right, define the <emph>Field Type</emph>. When you click in the cell, you can select a field type in the combo box.</paragraph>
65*cdf0e10cSrcweir         </listitem>
66*cdf0e10cSrcweir      </list>
67*cdf0e10cSrcweir      <paragraph xml-lang="en-US" id="par_id3154760" role="note" l10n="U" oldref="38">Each field can only accept data corresponding to the specified field type. For example, it is not possible to enter text in a number field. Memo fields in dBASE III format are references to internally-managed text files which can hold up to 64KB text.</paragraph>
68*cdf0e10cSrcweir      <paragraph xml-lang="en-US" id="par_id3149456" role="paragraph" l10n="U" oldref="41">You can enter an optional <emph>Description</emph> for each field. The text of the description will appear as a tip on the column headings in the table view.</paragraph>
69*cdf0e10cSrcweir      <paragraph xml-lang="en-US" id="hd_id3153379" role="heading" level="2" l10n="U"
70*cdf0e10cSrcweir                 oldref="42">Field Properties</paragraph>
71*cdf0e10cSrcweir      <paragraph xml-lang="en-US" id="par_id3148798" role="paragraph" l10n="U" oldref="45">Enter properties for each selected data field. Depending on the database type, some input facilities may not be available.</paragraph>
72*cdf0e10cSrcweir      <paragraph xml-lang="en-US" id="par_id3144762" role="paragraph" l10n="U" oldref="46">In the <emph>Default value</emph> box, enter the default contents for every new record. This contents can be edited later.</paragraph>
73*cdf0e10cSrcweir      <paragraph xml-lang="en-US" id="par_id3150869" role="paragraph" l10n="U" oldref="47">In the <emph>Entry required</emph> box, specify whether or not the field may remain empty.</paragraph>
74*cdf0e10cSrcweir      <paragraph xml-lang="en-US" id="par_id3154908" role="paragraph" l10n="U" oldref="7">For the <emph>Length</emph> box, a combo box may be shown that provides the available choices.</paragraph>
75*cdf0e10cSrcweir      <embed href="text/shared/00/00000004.xhp#related"/>
76*cdf0e10cSrcweir      <embed href="text/shared/guide/database_main.xhp#database_main"/>
77*cdf0e10cSrcweir   </body>
78*cdf0e10cSrcweir</helpdocument>