Upload
welcometofacebook
View
67
Download
3
Embed Size (px)
Citation preview
ISOM3260 Database Design and Administration
Lab 6: Oracle Forms Developer IV –search engine and insert multiple records
Agenda
Oracle Project
Analysis, Design Implementation, Maintenance
Oracle Forms Developer SQL Tools
Oracle Reports Developer and integration
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
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
Why do we need validation triggers?
There are some instancesentered by users that are not valid!!!!
5
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
Review the codes of Validation Triggers
7
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)
Illustration 1: Create a canvas with multiple datablocks (1)
Illustration 1: Create a canvas with multiple datablocks (2)
• Basic Steps– Create a blank canvas– Create a manual datablock for capturing search keyword
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
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
Forms Styles (2)
Form Style
Tabular Style
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)
Code Review (II)
• Insert multiple student records– Insert multiple records using Simple Loop
Reference for:Make Purchase
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
• 5. Make Purchase