Database table
copy linkA table contains a set of objects of the same type stored in the database or managed in memory. It is represented with the following icons:
![]() |
Database table |
![]() |
Imported database table |
![]() |
IMDB table (managed in memory) |
![]() |
IMDB table with a single row |
Video course: Creating a table object
Properties
Name: represents the logical name of the table, as it will be identified within the Instant Developer project. The name should be indicative of the table's contents and should be in plural form (e.g. Users, Bills, Orders, etc.), since it reflects the common name of the objects that the table contains.
Description: contains a meaningful description of the table's contents. The text entered will be used to compose the database documentation and user manual, so it is important to provide a good explanation of the table's purpose and the type of objects it contains to facilitate its proper use.
Caption: the name that will be used within the application's user interface to refer to objects contained in the table. It is normally left blank, in which case the Name property will be used.
Element: the name of an individual object contained in the table, i.e. the singular form of the table name. For example, if the table contains user data, it might have the name Users and the element User. It is important enter a concise name, consisting of one or two words, since it will be used to compose the full name of the fields when they are referenced from an external context. In the above example, the Name field is automatically called User Name by In.de.
No. of rows: represents the estimated number of rows in the table, at least as an order of magnitude. In.de uses this to estimate the size of the database, to suggest the use of indexes, and to decide the type of lookup (see below). In the case of in-memory tables, if the number of rows is equal to one, the table fields can be referenced directly rather than through queries.
Icon: the image used to represent an object contained in this table. It is best to select an icon that is 16x16 pixels and in GIF format. When the icon is set in the table object, it does not need to be set in the forms, menus, or panels that reference it.
Lookup type: specifies which lookup methods should be used when building a panel that has a relationship to this table. The possible values are:
- Automatic choice: if the number of rows is greater than 100, a lookup window will be used. If it is between 30 and 100, a combo-lookup will be created. If it is less than 30, an auto-lookup will be provided.
- Combo lookup: both the field containing the code and its decoding extracted from this table will be shown on screen. The code can be typed directly or selected by using a combo box.
- Auto lookup: a combo box will be shown on screen with the descriptions extracted from this table.
- Lookup window: similar to Combo lookup, but the user can select the data through a popup search form instead of a combo box.
- No lookup: no additional lookup mechanism is used, and a smart lookup is applied to the field.
Table substitution: setting this flag tells the system, before executing a query regarding this table, to fire the OnTableSubstitution event, which can be used to change the table name in the query text.
Exclude from database graphic: when this flag is set, the table will not be shown in graphics representing the relationships in the database. It can be useful when the table has relationships with many other tables in the database, and their representation is not significant.
Code: represents the physical name of the table within the database. If the Automatic property is set to true, Instant Developer will select an appropriate physical name, and you will not have to worry about keeping it unique. This property cannot be changed for imported tables, because it is the actual name of the table in the database.
Automatic: specifies that the table code is automatically calculated and made unique based on its logical name.
Schema: in the case of imported tables, represents the schema to which the table belongs if different from that referred to by the database connection properties. It is best to leave this property blank unless you must explicitly reference tables belonging to different schemata.
Sequence name: if the table contains a counter field and the database is Oracle, DB2, or Postgres, In.de generates a sequence object to manage it. The name of the sequence can be generated by In.de or specified in this property.
Context menu
Add field: adds a new field to the table. This property is disabled for imported tables, because the schema is already set by the current structure of the database.
Add trigger: Adds a trigger object to the table. Instant Developer can generate triggers in the database if it is of the Oracle or SQL Server type.
Add index: adds an index to the table. This property is disabled for imported tables, because the schema is already set by the current structure of the database. If the index key overlaps that of a foreign key, it is best to create the index from the properties form of the foreign key itself.
Add check: adds a check constraint to the table to guarantee the logical integrity of its data. This property is disabled for imported tables, because the schema is already set by the current structure of the database.
Wizards/Show data: opens the wizard to display the data actually contained in the table and to execute queries on it.
Add folder: adds a folder inside the table, which will have no impact on the database schema, but can be used to better organize the objects in the table.
Add task: creates a new task object linked to the table. It serves as a reminder for future changes or to manage group work.
Find derived objects: searches for all objects in the project derived from the table, such as forms, documents, classes, panels, queries, in-memory tables, etc., including at multiple levels.
Find where used (object): searches for all points in the project where this table is directly referenced in any way.
Find where used (content): searches for all points in the project where this table or one of the objects it contains is directly referenced in any way.
Take ownership: if the table is imported, In.de cannot manage the schema. This menu command can be used to take ownership, allowing Instant Developer to manage this table when the database schema is reconstructed or modified.
Release ownership: releases ownership of the table. After this command is used, In.de will no longer modify the table schema in the database when it is reconstructed or modified.
Unlink from: for in-memory tables derived from database tables, breaks the link and interrupts synchronization between the two objects. After using this command, you can change the structure of the in-memory table independently from the database table.
A table can be dragged and dropped onto a/an...
Table: moves the table to another folder or rearranges the tables in the existing one. Tables can also be moved from one database to another, but this can have a major application impact.
Adds a foreign-key corresponding to the dragged table to the table accepting the drop. This is disabled if the target table is imported.
creates a copy of the table and positions it next to the target table.
Database: moves the table to the target database. This can have a major application impact.
creates a copy of the table inside the target database. If the table refers to other tables, but equivalent tables cannot be found in the target database, then the referenced tables are also copied.
Application: creates an in-memory table with the same structure as the dragged table. It is very convenient for creating in-memory objects with the same schema as database objects.
creates a form for searching and editing the data of the dragged table.
creates a lookup form for searching and selecting the data of the dragged table.
creates an object of the Document type derived from the dragged table.
Video course: Object-oriented model - Introduction
Form: creates an in-memory table with the same structure as the dragged table in the form accepting the drop.
adds a panel to the form for displaying or editing the form's data. The form must have an empty frame to contain the panel. The table can also be dragged directly onto the frame in the form editor.
Class:
if the class is of the document type, links the document to the dragged table, synchronizing the properties and preparing the storage/loading mechanisms.
Tabbed View:
adds a panel to the tabbed view for displaying or editing the table's records.
Panel: if the table is contained in the database, dragging it onto a panel will add a lookup query to the table. The operation may fail if In.de cannot find a link between the data contained in the panel and the fields of the dragged table.
Master panel field: adds a value source query to the target field for performing field value lookups through a combo box.
Static panel field: inserts a subpanel in the static field for displaying or editing the data in the dragged table. The table can also be dragged directly onto the field in the form editor.
Tree:
adds an item to the tree that shows the records in this table (database tables only).
Tree item: adds a sub-item to the tree to show the records in this table that are related to the preceding item in the hierarchy (database tables only).
Procedure / function / event: to create a data structure that is local to the procedure and suitable for containing a record in the table.
Query:
adds the dragged table to the query, attempting to link it with the others already present.
also adds all fields present in the table as columns returned by the query.
In-query table: replaces the selected table in the query with the one dragged. The query definition changes, and some columns or conditions may no longer be valid.
Report: adds the table to the report and creates the boxes for displaying the contents in the book. Pressing the
and
keys obtains the list or detail layout, with or without headers.
Folder: if the folder is in the same database as the table, then the table will simply be moved inside the folder. Otherwise, it is like dragging the table onto the object containing the folder. For example, if the target folder is inside an application, it is like dragging the table onto the application.
If the folder is in the same database as the table, then the table will simply be moved to the position before the target folder, at the same tree level.
If the folder is in the same database as the table, then a copy of the table is created in the folder.
Changed on: 15/12/2022 / From version: 8.5.3800