A form simply allows you to work visually with the data in the database. It is a representation of the data in the database tables, a collection of objects that yields a graphic interface to the data.
Every form, no matter how simple, contains the following pieces: ▪ At least one block ▪ At least one item ▪ At least one canvas ▪ At least one window
Most Oracle Forms 10g have multiples of each of these objects, but the basics are the same, no matter how simple or complex the form.
In addition to the basic objects in a form, the toolkit supports a wide variety of widgets and interface items to build the user experience: buttons, toolbars, check boxes, radio buttons, even Java-bean controls. PL/SQL code behind these objects (and in the database) controls validation and behavior in the form.
Data Blocks
Blocks are the form elements that connect the displayed items on the screen to the database.The block itself is never seen when a form is running; only the items that it contains are displayed on the canvas.
[pic]
Figure 3-1: A graphical description of database tables and Oracle Forms 10g canvases
Blocks can be based on single database tables, multiple tables (via a view), and even the returned values from a PL/SQL package. Blocks can also be created that are not connected to (not bound) to the database at all. These are commonly called Control Blocks or non-base table blocks (NBTs). Control Blocks can be used to hold working variables, reference values, or any other data that is used or displayed within the Form.
When a block is associated with tables in the database, Oracle Forms 10g handles the standard DML functions automatically. Select, Insert, Update, and Delete are supported for these blocks without having to write additional code. When the block is based on a view, limited ability to perform DML is supported (based on the rules for updatable views). When the block is based