Tables Wizard (Sybase ASE)

From DBArtisan
Jump to: navigation, search

Go Up to Sybase ASE Object Wizards

A table is a column-based arrangement of data in which the content of one column has a bearing on the other column(s). So, for example, a table might have a column for authors, another column for the books each author has written, and a third for the number of copies each title by a given author has sold. The data moves across the columns in rows.

Note: You must have CREATE TABLE permissions to generate a new table.

To create a new table using a wizard:

  1. Open a creation wizard for a table. For details, see Opening an Object Wizard.
  2. Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:
  3. Finally, use the Execute button to create the object.

Tables (Sybase ASE) - Properties

When creating or editing a table, this tab/panel lets you work with the following settings:

Setting Description

Owner

Select the owner of the table.

Name

Provide a name for the table

Segment Name

Specify the segment on which you want to place the table.

Maximum Rows Per Page

Specifying a number allows you to override the default. The default, 0, creates indexes with full pages and nonclustered indexes with full leaf pages. This number can be changed at any time.

Reserve Page Gap

Identity Gap

Specify the size of the identity gap for the table.

MRU Replacement Strategy

When enabled, new pages are read into the least recent end of the page chain. When pages reach the most recent end of the chain, the pages are flushed.

Prefetch Strategy

Enabling this feature allows you to fetch as many as eight 2K data pages simultaneously instead of one at a time (the default).

Lock Scheme

Select a locking scheme of ALLPAGES, DATAPAGES, or DATAROWS.

Expected Row Size

If you specified a Lock Scheme of DATAROWS or DATAPAGES, provide an expected row size

Tables (Sybase ASE) - Columns

For each column in the table, click the Add Column button to create a column, provide a Name for the column and provide or select the remaining column attributes.

Use the Delete button to drop a selected column.

Use the arrow buttons to reposition the columns.

Note: Because the smalldatetime datatype stores dates and time with less precision than the datetime datatype, before outputting you use the CAST or CONVERT functions to convert any boxes with the smalldatetime datatype to either VARCHAR or datetime datatypes.

Tables (Sybase ASE) - Indexes

Click Add to open the Index Wizard. For details, see Indexes Wizard (Sybase ASE).

Tables (Sybase ASE) - Constraints

Selecting a constraint type and clicking Add opens the object wizard for that object type. For details see:

Tables (Sybase ASE) - Partition

Click Add to open the Table Partition Wizard. For details, see Table Partition wizard for Sybase ASE.

Tables (Sybase ASE) - Permissions

Set up the user permissions for this table.

Table Partition wizard for Sybase ASE

See the following topics for information on editors and wizards that let you open the Sybase ASE Table Partition Wzard:

Use the following topics as a guide to understanding and setting the options on this wizard:

Step Settings and tasks

Properties

Select a Partition Type of ROUNDROBIN, RANGE, HASH, or LIST

Columns (not available with a Partition Type of ROUNDROBIN)

For each column, click the Insert a new column button to create a column, provide a Name for the column and provide or select the remaining column attributes. Use the Delete button to drop a selected column. Use the arrow buttons to reposition the columns.

Partition Definition (only available with a Partition Type of HASH or ROUNDROBIN)

Take one of the following actions: (1) Select the Number Of Partitions radio box, specify the Number Of Partitions, and for each partition, click the New button and choose a tablespace from the dropdown, or (2) select the By Partition Name radio box and for each partition, click the New button provide a name and then choose a tablespace from the dropdown.

Range Definitions (only available with a Partition Type of RANGE)

Click the Define a new partition button to open a dialog that lets you provide a name, select a segment and Add the partition definition.

List Definitions (only available with a Partition Type of LIST)

Click the Define a new partition button to open a dialog that lets you provide a name, select a segment, click the New button to add values, and then Add the partition definition.

When finished, click the Finish button.