Tables And Views

Introduction

The purpose of this section is to explain how the wizard deals with database tables and views.

A table or view is typically composed of one or more columns.

The wizard breaks down a table, or view, into columns. The nodes seen in the tree on the left show a database table and its associated columns..

Each node in the tree has a tab associated with it, which can be used to view, and alter the information displayed.

Any changes you make are only made to the project file. No changes are ever made to the database.


Table View Tab

When a table node is selected in the tree, a table view tab appears in the right pane of the wizard. Below is an example table view tab.

The vast majority of users will not need to change any fields on this tab.. 

We have come across one JDBC database driver which reports database objects with one name, but expects another name to be used in SQL.

The call name is used to name the table when part of the SQL is generated. For example, with the information displayed in the image above, the wizard would generate part of a select as follows:

select CustomerID, ContactName from Customers


Column View Tab

The column view tab shows the information the wizard has gathered about a column. There should not be any need to change information on this tab, as this can affect the Java classes generated.

As explained in the User Interface section, any discrepancies between the project file and the database are highlighted in red. This can come in useful when trying to identify what has been changed in a database, during, or after, a project's development.

The scale and precision are not used at present, future versions of the JDatabase wizard may make use of this.

The precision is the total number of digits for numbers and characters for strings.

The scale is only useful for decimal numbers. It specifies how many decimal digits the number can have.


Copyright © 2002 J3 Limited, all rights reserved.