17
ISOM3260 Database Design and Administration Lab 6: Oracle Forms Developer IV – search engine and insert multiple records

database-canvas with multiple datablocks(database)

Embed Size (px)

Citation preview

Page 1: database-canvas with multiple datablocks(database)

ISOM3260 Database Design and Administration

Lab 6: Oracle Forms Developer IV –search engine and insert multiple records

Page 2: database-canvas with multiple datablocks(database)

Agenda

Oracle Project

Analysis, Design Implementation, Maintenance

Oracle Forms Developer SQL Tools

Oracle Reports Developer and integration

Page 3: database-canvas with multiple datablocks(database)

Agenda

• Validation Triggers• Multiple Datablocks in one canvas (VERY IMPORTANT!)• Write a trigger to retrieve multiple records from the database• Write a trigger to insert multiple records from the database

Page 4: database-canvas with multiple datablocks(database)

VERY IMPORTANT!

• Check the objects you just created belong to the dummy datablock(drag the object back to the right place)

• Move the datablocks so that the datablock of the LOGIN page goes first

Page 5: database-canvas with multiple datablocks(database)

Why do we need validation triggers?

There are some instancesentered by users that are not valid!!!!

5

Page 6: database-canvas with multiple datablocks(database)

Validation Triggers in Forms Developer

• Validation triggers ensure users insert correct values in the system

• Example: – Student_ID should be in 8‐characters– Year should not exceed 5 and should not less than 0

6

Page 7: database-canvas with multiple datablocks(database)

Review the codes of Validation Triggers 

7

Page 8: database-canvas with multiple datablocks(database)

Multiple Datablocks in One Canvas

• An user interface involving data from more than one tables

• For example:– Search engine

• Search keyword (Manual datablock)• Results (Datablock that is created base on a table)

Page 9: database-canvas with multiple datablocks(database)

Illustration 1: Create a canvas with multiple datablocks (1)

Page 10: database-canvas with multiple datablocks(database)

Illustration 1: Create a canvas with multiple datablocks (2)

• Basic Steps– Create a blank canvas– Create a manual datablock for capturing search keyword

Page 11: database-canvas with multiple datablocks(database)

Illustration 1: Create a canvas with multiple datablocks (3)

• Basic Steps– Create a datablock from COURSE table using Datablock Wizard

– Put the datablock on the existing canvas usingLayout Wizard

Page 12: database-canvas with multiple datablocks(database)

Forms Styles (1)

• Datablock can be presented in 2 different styles

• 2 Form Styles – Form Style

• For showing one instance 

– Tabular Style• For showing multiple instances

Page 13: database-canvas with multiple datablocks(database)

Forms Styles (2)

Form Style

Tabular Style

Page 14: database-canvas with multiple datablocks(database)

Code Review (I)

• Search Engine– Search engine code – Retrieve multiple records using FOR Loop

• View Detail– Push button under Tabular style

Reference for: Search records, View order records, View shopping cart,  Logout (CLEAR_BLOCK command)

Page 15: database-canvas with multiple datablocks(database)

Code Review (II)

• Insert multiple student records– Insert multiple records using Simple Loop

Reference for:Make Purchase

Page 16: database-canvas with multiple datablocks(database)

Project Work1. Search Engine

– A trigger that retrieves multiple records from Product table, given a particular search keyword

2. View product detail– A trigger that retrieves product detail from Product table 

to the next page, given a Product ID

3. Add to shopping cart – A trigger that inserts Mem ID, Pro ID, Quantity into  

Shopping Cart Line table

4. Retrieve shopping cart– A trigger that retrieves multiple records from Shopping Cart Line table, given a particular Mem_ID

Page 17: database-canvas with multiple datablocks(database)

• 5. Make Purchase