|
This section explains the tasks that you perform with Table Designer. The tasks are divided into the following categories:
|
Category
|
Description
|
|---|---|
|
Orient you to the overall use of Table Designer
|
|
|
Apply to using the Columns tab
|
|
|
Apply to using the Indexes tab
|
|
|
Apply to using the Statistic tab
|
|
|
Apply to using the Btrieve tab
|
General tasks apply to the overall use of the tool. The following table helps you locate a task by category.
Column tasks apply to the Columns tab.
Note
Inserting, deleting, or moving a column on the Columns tab changes the database. The database is rebuilt when you save the Table Designer information.
Index tasks apply to the Indexes tab.
Statistics tasks apply to the statistics tab.
Btrieve tasks apply to the Btrieve tab.
To start Table Designer from PCC

Note
When started this way (Tasks4Edit Table Design), Table Designer opens a separate instance for each table. This means that you can open multiple instances of Table Designer for the same table. Changes saved in one instance are reflected in another instance only if you perform a reset. For example, suppose you open Table Designer twice (called instance A and B) for table MyTable. If you save changes in instance A, you must perform a reset in instance B to see those changes. Reset causes all of the displayed properties to revert to their last-saved values.
To identify open database and table
The title bar shows the name of the open database and the name of the open table. If Table Designer was started from PCC, the title bar also shows the machine on which the database resides.
For example, the following image shows that Billing is the open table, DEMODATA is the open database, and DOCLAB2 is the machine on which DEMODATA resides.

To work with columns
Ensure that Table Designer is in linked mode. See To change Table Designer mode .
To work with indexes
When Table Designer is in unlinked mode, index changes affect only the data definition files. See To change Table Designer mode .
To display table statistics
To work with Btrieve data
Ensure that Table Designer is in unlinked mode. See To change Table Designer mode .
To change Table Designer mode
The Options dialog appears.
The lower right corner of the Table Designer window indicates the current mode: UNLINKED MODE or LINKED MODE. Note that only in unlinked mode do all four tabbed dialogs appear.

To display help
To view table data
The command (or the icon) starts Pervasive.SQL SQL Data Manager. For more about SQL Data Manager, see SQL Data Manager .
To identify insertions or deletions that have not been saved
To save changes
To discard all changes (Reset)
To determine the length of a record
To copy data from a grid cell
To paste data into a grid cell
Note
You cannot paste data that is not applicable to a particular data type. For example, you cannot paste a value into the Size cell for an INTEGER.
You may paste data that you cut or copied from another application, such as a text editor or a spreadsheet program.
To insert a column at end of column definitions
Inserting, deleting, or moving a column on the Columns tab changes the database. The database is rebuilt when you save the Table Designer information.
This task requires that Table Designer be in linked mode. See To change Table Designer mode .
A new column is inserted. A blue asterisk (*) appears in the leftmost cell. The default name of the column is "col_n," where "n" is a number that automatically increments by one. (The first column you insert is col_1, the second col_2 and so forth.) The column is not added to the table until you save the database.
The following image shows a column inserted after the column named Head_of_Dept:

The save action adds the column.
To insert a column between columns
Inserting, deleting, or moving a column on the Columns tab changes the database. The database is rebuilt when you save the Table Designer information.
This task requires that Table Designer be in linked mode. See To change Table Designer mode .
)A new column is inserted. A blue asterisk (*) appears in the leftmost cell. The default name of the column is "col_n," where "n" is a number that automatically increments by one. (The first column you insert is col_1, the second col_2 and so forth.) The column is not added to the table until you save the database.
The following image shows a column inserted before the column named Head_of_Dept:

The save action adds the column.
To change column order
Inserting, deleting, or moving a column on the Columns tab changes the database. The database is rebuilt when you save the Table Designer information.
This task requires that Table Designer be in linked mode. See To change Table Designer mode .
To delete a column
Data is removed from your database if you delete a column. The database is rebuilt when you save the Table Designer information.
This task requires that Table Designer be in linked mode. See To change Table Designer mode .

A solid, right-point triangle indicates that the column is selected.
A red "x" appears in the gray, leftmost grid cell
. The "x" indicates that the column is marked for deletion. The column is not deleted until you save the table information.
The save action deletes the column.
To set a column name
See also Naming Conventions in Pervasive.SQL Programmer's Guide, which is part of the Pervasive.SQL Software Developer's Kit (SDK).
This task requires that Table Designer be in linked mode. See To change Table Designer mode .

A solid, right-point triangle indicates that the column is selected.
The name can be alpha-numeric, 20 characters or less. The name can have spaces, but if spaces are included you must always enclose the name in quotes whenever using the name in SQL statements. For this reason, Pervasive recommends avoiding spaces. Also avoid using reserved words for column names. See Reserved Words in SQL Engine Reference.
To set a column data type
The data in your database is converted if you change a column data type. For a listing of data types, see Pervasive.SQL Supported Data Types in SQL Engine Reference.
This task requires that Table Designer be in linked mode. See To change Table Designer mode .

A solid, right-point triangle indicates that the column is selected.
).
To set a column size
Data in your database is truncated if you change the column to a smaller size for the following data types:
This task requires that Table Designer be in linked mode. See To change Table Designer mode .

A solid, right-point triangle indicates that the column is selected.
You can set a size only for applicable data types, such as CHAR. If size is not applicable, you will be unable to position the cursor in the Size grid cell.
To set column precision
This task requires that Table Designer be in linked mode. See To change Table Designer mode .

A solid, right-point triangle indicates that the column is selected.
You can set precision only for applicable data types, such as DECIMAL. If precision is not applicable, you will be unable to position the cursor in the Precision grid cell.
Precision specifies the number of significant digits for floating point values.
To set a column scale
This task requires that Table Designer be in linked mode. See To change Table Designer mode .

A solid, right-point triangle indicates that the column is selected.
You can set a scale value only for applicable data types, such as NUMERIC. If collating sequence is not applicable, you will be unable to position the cursor in the Scale grid cell.
Scale specifies the number of significant digits that are to the right of the decimal point for floating point values.
To set a column to allow or disallow nulls
For additional information about nulls, see Rebuild Utility Concepts in Advanced Operations Guide, INSERT in SQL Engine Reference, and Null Value in the Pervasive.SQL Programmer's Guide, which is part of the Pervasive.SQL Software Developer's Kit (SDK).
This task requires that Table Designer be in linked mode. See To change Table Designer mode .

A solid, right-point triangle indicates that the column is selected.
You can allow nulls only for applicable data types. A shaded square indicates that null values do not apply to the data type.
A checkmark in the box indicates that nulls are allowed for the column. Lack of a checkmark indicates that the column cannot be blank (that is, for every record, the column must contain a value other than null).
Also see Null Values .
To set case sensitivity for a column
Case sensitivity does not apply if the key uses an alternate collating sequence (ACS). You cannot specify case sensitivity and use an ACS.
This task requires that Table Designer be in linked mode. See To change Table Designer mode .

A solid, right-point triangle indicates that the column is selected.
You can set a collating sequence only for applicable data types. A shaded square indicates that case sensitivity does not apply to the data type.
A checkmark in the box indicates that column values are case insensitive. Lack of a checkmark indicates that column values are case sensitive.
By default, Pervasive.SQL is case sensitive when sorting string keys. Uppercase letters are sorted before lowercase letters. If you specify case insensitive, values are sorted without distinguishing case.
To set a column collating sequence
For additional information about collating sequences, see Manipulating Btrieve Data Files with Maintenance in Advanced Operations Guide and Alternate Collating Sequences in the Pervasive.SQL Programmer's Guide, which is part of the Pervasive.SQL Software Developer's Kit (SDK).
If you use an alternate collating sequence (ACS), you cannot specify case sensitivity. Case sensitivity does not apply if the key uses an ACS.
This task requires that Table Designer be in linked mode. See To change Table Designer mode .

A solid, right-point triangle indicates that the column is selected.
You can set an alternating collating sequence (ACS) only for applicable data types. If collating sequence is not applicable, you will be unable to position the cursor in the Collate grid cell.
Pervasive.SQL supplies an ACS file, upper.alt, in the Samples folder. To use this file, you would type c:\pvsw\samples\upper.alt.
Upper.alt treats upper and lower case letters the same for sorting. For example, if a database has values abc, ABC, DEF, and Def, inserted in that order, the sorting with upper.alt returns as abc, ABC, DEF, and Def. (The values abc and ABC, and the values DEF and Def are considered duplicates and are returned in the order in which they were inserted.) Normal ASCII sorting sequences upper case letters before lower case, such that the sorting would return as ABC, DEF, Def, abc.
To set a column default
This task requires that Table Designer be in linked mode. See To change Table Designer mode .

A solid, right-point triangle indicates that the column is selected.
You can set a default only for applicable data types. If a default is not applicable, you will be unable to position the cursor in the the Default grid cell.
The default value is used if you perform an SQL INSERT for a row but do not provide a value for the column.
To insert an index
When Table Designer is in unlinked mode, index changes affect only the data definition files.
Tip
You may create "dummy" indexes in your data definition files to match indexes in your Btrieve file. An example helps clarify.
Suppose your Btrieve file has indexes 0, 1, 2, and 5 and in your Index.ddf file you have indexes 0, 1, and 2. You could create "dummy" indexes in the definition file for 3 and 4, and an actual index for 5. Thus, your indexes would match as follows:
Btrieve File Indexes Data Definition File Indexes
0 0
1 1
2 2
3 "dummy"
4 "dummy"
5 5
The "dummy" indexes can be on any column that can be indexed because they are not used by your Btrieve file.
A new index is inserted. A blue asterisk (*) appears in the leftmost gray cell. The default name of the column is "index_n," where "n" is a number that automatically increments by one. (The first index you insert is index_1, the second index_2 and so forth.)
The following image shows an index inserted:

The save action adds the index. See also Creating Indexes in Pervasive.SQL Programmer's Guide, which is part of the Pervasive.SQL Software Developer's Kit (SDK).
To delete an index
When Table Designer is in unlinked mode, index changes affect only the data definition files.

A solid, right-point triangle indicates that the index is selected.
A red "x" appears in the gray, leftmost grid cell
. The "x" indicates that the index is marked for deletion. The index is not deleted until you save the table information.
The save action deletes the index.
To insert an index segment
For detailed information about segments, see Segmentation in the Pervasive.SQL Programmer's Guide, which is part of the Pervasive.SQL Software Developer's Kit (SDK).
When Table Designer is in unlinked mode, index changes affect only the data definition files.
A new index segment is inserted below the existing index or segment. A blue asterisk (*) appears in the leftmost cell. The new segment is not added until you save the database.
The following image shows an index segment inserted:

The save action adds the index segment.
To delete an index segment
When Table Designer is in unlinked mode, index changes affect only the data definition files.

A solid, right-point triangle indicates that the index segment is selected.
A red "x" appears in the gray, leftmost grid cell
. The "x" indicates that the index segment is marked for deletion. The segment is not deleted until you save the table information.
The save action deletes the index segment
To specify index sort column
For detailed information about sort order, see Sort Order in the Pervasive.SQL Programmer's Guide, which is part of the Pervasive.SQL Software Developer's Kit (SDK).
When Table Designer is in unlinked mode, index changes affect only the data definition files.
To allow duplicates in index
For detailed information about duplicates, see Duplicatability in the Pervasive.SQL Programmer's Guide, which is part of the Pervasive.SQL Software Developer's Kit (SDK).
When Table Designer is in unlinked mode, index changes affect only the data definition files.

A solid, right-point triangle indicates that the index is selected.
A checkmark in the box indicates that the index allows duplicates (the values are not unique).
Lack of a checkmark indicates that the index values are unique (duplicate values are not allowed).
The default for all SQL data types is that the index column allows duplicates.
To specify index as modifiable
For detailed information about modifiability, see Modifiability in the Pervasive.SQL Programmer's Guide, which is part of the Pervasive.SQL Software Developer's Kit (SDK).
When Table Designer is in unlinked mode, index changes affect only the data definition files.

A solid, right-point triangle indicates that the index is selected.
A checkmark in the box indicates that the index value can be modified. Lack of a checkmark indicates that the index value cannot be modified.
The default for all SQL data types is that the index column is modifiable.
To specify index sort sequence
For detailed information about sort order, see Sort Order in the Pervasive.SQL Programmer's Guide, which is part of the Pervasive.SQL Software Developer's Kit (SDK).
When Table Designer is in unlinked mode, index changes affect only the data definition files.
If a sort sequence is not applicable, you will be unable to position the cursor in the Sort grid cell.
).
To change the location of a table's data file
Changing the Table Location parameter does not move the table's data file. The change only instructs the database engine where to find the data file. If you wish to have your existing data still available, you must move the data file to the newly specified location.
A database also must be unbound for you to change the location of a data file or move the data file. When you create a database in PCC, you are offered the option of creating a bound database.
Pervasive.SQL automatically binds a data file to a named database if the file meets any of the following criteria:
See also the tool Pervasive.SQL Database GUI Reference in Advanced Operations Guide. This tool lets you bind and unbind a database.
If you are specifying a location on the same server where the database engine is running, specify the location in this manner:
:\path. If you are specifying a location to data files on another server, specify the full UNC path:
\\server\vol:\path
To display table information
To insert a Btrieve column at end of column definitions
Ensure that Table Designer is in unlinked mode. See To change Table Designer mode . Tasks performed on the Btrieve tab affect only the table definition files. The data files are not modified.
A new column is inserted. A blue asterisk (*) appears in the leftmost cell. The default name of the column is "col_n," where "n" is a number that automatically increments by one. (The first column you insert is col_1, the second col_2 and so forth.) The column is not added to the definition files until you save the database.
The following image shows a column inserted after the column named Head_of_Dept:

The save action adds the column to the definition files.
To insert a Btrieve column between columns
Ensure that Table Designer is in unlinked mode. See To change Table Designer mode . Tasks performed on the Btrieve tab affect only the table definition files. The data files are not modified.
)A new column is inserted. A blue asterisk (*) appears in the leftmost cell. The default name of the column is "col_n," where "n" is a number that automatically increments by one. (The first column you insert is col_1, the second col_2 and so forth.) The column is not added to the definition files until you save the database.
The following image shows a column inserted before the column named Head_of_Dept:

The save action adds the column to the definition files.
To delete a Btrieve column
Ensure that Table Designer is in unlinked mode. See To change Table Designer mode . Tasks performed on the Btrieve tab affect only the table definition files. The data files are not modified.

A solid, right-point triangle indicates that the column is selected.
A red "x" appears in the gray, leftmost grid cell
. The "x" indicates that the column is marked for deletion. The column is not deleted until you save the table information.
The save action deletes the column from the definition files.
To set a Btrieve column name
Ensure that Table Designer is in unlinked mode. See To change Table Designer mode . Tasks performed on the Btrieve tab affect only the table definition files. The data files are not modified.

A solid, right-point triangle indicates that the column is selected.
The name can be alpha-numeric, 20 characters or less.
To set a Btrieve column type
Ensure that Table Designer is in unlinked mode. See To change Table Designer mode . Tasks performed on the Btrieve tab affect only the table definition files. The data files are not modified.

A solid, right-point triangle indicates that the column is selected.
).For a listing of data types, see Pervasive.SQL Supported Data Types in SQL Engine Reference.
To set a Btrieve column size
Ensure that Table Designer is in unlinked mode. See To change Table Designer mode . Tasks performed on the Btrieve tab affect only the table definition files. The data files are not modified.

A solid, right-point triangle indicates that the column is selected.
You can set a size only for applicable data types, such as CHAR. If size is not applicable, you will be unable to position the cursor in the Size grid cell.
To set decimal places for a Btrieve column
Ensure that Table Designer is in unlinked mode. See To change Table Designer mode . Tasks performed on the Btrieve tab affect only the table definition files. The data files are not modified.

A solid, right-point triangle indicates that the column is selected.
You can set a decimal value only for applicable data types.
Decimal specifies the number of significant digits that are to the right of the decimal point for floating point values.
To set a Btrieve column to allow nulls
Ensure that Table Designer is in unlinked mode. See To change Table Designer mode . Tasks performed on the Btrieve tab affect only the table definition files. The data files are not modified.
For detailed information about null values, see Null Value in the Pervasive.SQL Programmer's Guide, which is part of the Pervasive.SQL Software Developer's Kit (SDK).

A solid, right-point triangle indicates that the column is selected.
You can allow nulls only for applicable data types. A shaded square indicates that null values do not apply to the data type.
A checkmark in the box indicates that nulls are allowed for the column. Lack of a checkmark indicates that the column cannot be blank (that is, for every record, the column must contain a value other than null).
Also see Null Values .
To set case sensitivity for a Btrieve column
Ensure that Table Designer is in unlinked mode. See To change Table Designer mode . Tasks performed on the Btrieve tab affect only the table definition files. The data files are not modified.

A solid, right-point triangle indicates that the column is selected.
You can set a collating sequence only for applicable data types. A shaded square indicates that case sensitivity does not apply to the data type.
A checkmark in the box indicates that column values are case insensitive. Lack of a checkmark indicates that column values are case sensitive.
To change Btrieve column position on the GUI
Ensure that Table Designer is in unlinked mode. See To change Table Designer mode . Tasks performed on the Btrieve tab affect only the table definition files. The data files are not modified.
|
Chapter contents
Prev topic: Table Designer GUI Visual Reference
|