1*b1cdbd2cSJim Jagielski<?xml version="1.0" encoding="UTF-8"?>
2*b1cdbd2cSJim Jagielski<helpdocument version="1.0">
3*b1cdbd2cSJim Jagielski
4*b1cdbd2cSJim Jagielski<!--***********************************************************
5*b1cdbd2cSJim Jagielski *
6*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one
7*b1cdbd2cSJim Jagielski * or more contributor license agreements.  See the NOTICE file
8*b1cdbd2cSJim Jagielski * distributed with this work for additional information
9*b1cdbd2cSJim Jagielski * regarding copyright ownership.  The ASF licenses this file
10*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the
11*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance
12*b1cdbd2cSJim Jagielski * with the License.  You may obtain a copy of the License at
13*b1cdbd2cSJim Jagielski *
14*b1cdbd2cSJim Jagielski *   http://www.apache.org/licenses/LICENSE-2.0
15*b1cdbd2cSJim Jagielski *
16*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing,
17*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an
18*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19*b1cdbd2cSJim Jagielski * KIND, either express or implied.  See the License for the
20*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations
21*b1cdbd2cSJim Jagielski * under the License.
22*b1cdbd2cSJim Jagielski *
23*b1cdbd2cSJim Jagielski ***********************************************************-->
24*b1cdbd2cSJim Jagielski
25*b1cdbd2cSJim Jagielski
26*b1cdbd2cSJim Jagielski
27*b1cdbd2cSJim Jagielski
28*b1cdbd2cSJim Jagielski<meta>
29*b1cdbd2cSJim Jagielski      <topic id="textsharedguidedata_tabledefinexml" indexer="include" status="PUBLISH">
30*b1cdbd2cSJim Jagielski         <title xml-lang="en-US" id="tit">Table Design</title>
31*b1cdbd2cSJim Jagielski         <filename>/text/shared/guide/data_tabledefine.xhp</filename>
32*b1cdbd2cSJim Jagielski      </topic>
33*b1cdbd2cSJim Jagielski   </meta>
34*b1cdbd2cSJim Jagielski   <body>
35*b1cdbd2cSJim Jagielski<bookmark xml-lang="en-US" branch="index" id="bm_id3155448"><bookmark_value>tables in databases; creating in design view (manually)</bookmark_value>
36*b1cdbd2cSJim Jagielski      <bookmark_value>designing; database tables</bookmark_value>
37*b1cdbd2cSJim Jagielski      <bookmark_value>properties;fields in databases</bookmark_value>
38*b1cdbd2cSJim Jagielski      <bookmark_value>fields;database tables</bookmark_value>
39*b1cdbd2cSJim Jagielski      <bookmark_value>AutoValue (Base)</bookmark_value>
40*b1cdbd2cSJim Jagielski      <bookmark_value>primary keys;design view</bookmark_value>
41*b1cdbd2cSJim Jagielski</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>
42*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_id3155448" role="paragraph" l10n="E" oldref="103"
43*b1cdbd2cSJim Jagielski                 localize="false"/>
44*b1cdbd2cSJim Jagielski      <paragraph xml-lang="en-US" id="hd_id3149798" role="heading" level="1" l10n="U"
45*b1cdbd2cSJim Jagielski                 oldref="104"><variable id="data_tabledefine"><link href="text/shared/guide/data_tabledefine.xhp" name="Table Design">Table Design</link>
46*b1cdbd2cSJim Jagielski</variable></paragraph>
47*b1cdbd2cSJim Jagielski      <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>
48*b1cdbd2cSJim Jagielski      <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>
49*b1cdbd2cSJim Jagielski      <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>
50*b1cdbd2cSJim Jagielski      <list type="unordered">
51*b1cdbd2cSJim Jagielski         <listitem>
52*b1cdbd2cSJim Jagielski            <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>
53*b1cdbd2cSJim Jagielski         </listitem>
54*b1cdbd2cSJim Jagielski         <listitem>
55*b1cdbd2cSJim Jagielski            <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>
56*b1cdbd2cSJim Jagielski         </listitem>
57*b1cdbd2cSJim Jagielski         <listitem>
58*b1cdbd2cSJim Jagielski            <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>
59*b1cdbd2cSJim Jagielski         </listitem>
60*b1cdbd2cSJim Jagielski      </list>
61*b1cdbd2cSJim Jagielski      <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>
62*b1cdbd2cSJim Jagielski      <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>
63*b1cdbd2cSJim Jagielski      <paragraph xml-lang="en-US" id="hd_id3153379" role="heading" level="2" l10n="U"
64*b1cdbd2cSJim Jagielski                 oldref="42">Field Properties</paragraph>
65*b1cdbd2cSJim Jagielski      <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>
66*b1cdbd2cSJim Jagielski      <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>
67*b1cdbd2cSJim Jagielski      <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>
68*b1cdbd2cSJim Jagielski      <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>
69*b1cdbd2cSJim Jagielski      <embed href="text/shared/00/00000004.xhp#related"/>
70*b1cdbd2cSJim Jagielski      <embed href="text/shared/guide/database_main.xhp#database_main"/>
71*b1cdbd2cSJim Jagielski   </body>
72*b1cdbd2cSJim Jagielski</helpdocument>