transcript
- Slide 1
- Project Implementation for COSC 5050 Distributed Database
Applications Lab6
- Slide 2
- Advanced Topics Work with table lookups on composite primary
key View and trigger Report and form User friendly pages
Validations Navigate between pages Publish the application and
create test users Export and import the application
- Slide 3
- Composite Primary Key Tables Tables such as MEMBER_TALENT
MEMBER_PROJECT Work with composite primary key tables Create a view
Create an INSTEAD OF trigger to be used by application
- Slide 4
- Creating View Create a view that contains ROWID A rowid
identifies a row in a table A rowid is a pseudo column that
uniquely identifies a row within a table, but not within a database
CREATE VIEW VW_MEMBER_TALENT_COM (ID, MEMBER_ID, TALENT_ID) AS
SELECT ROWID ID, MEMBER_ID, TALENT_ID FROM MEMBER_TALENT;
- Slide 5
- Creating INSTEAD OF Trigger An updatable view is one you can
use to insert, update, or delete base table rows You can create a
view to be inherently updatable, or you can create an INSTEAD OF
trigger on any view to make it updatable Create an INSTEAD OF
trigger on the view Test the view and the trigger Make sure the
view and the trigger works Run sample testing script in SQL Command
area
- Slide 6
- Creating Report and Form Create a report and a form for the
view Create page Form Form on a table with report Table/view name:
VW_MEMBER_TALENT_COM
- Slide 7
- Defining the Report Define report page Page name: MEMBER TALENT
Region title: MEMBER TALENT Breadcrumb: Breadcrumb Breadcrumb entry
name: MEMBER TALENT Breadcrumb parent entry: Home
- Slide 8
- Defining the Report
- Slide 9
- Define report page Tab options: Use an existing tab set and
create a new tab within the existing tab set Tab set: TS1 New tab
label: MEMBER TALENT Select columns: MEMBER_ID and TALENT_ID Edit
link image: default
- Slide 10
- Defining the Report
- Slide 11
- Defining the Form Define form page Page name: MEMBER TALENT
ENTRY Region title: MEMBER TALENT ENTRY Breadcrumb entry name:
MEMBER TALENT ENTRY Primary key type: Select primary key column(s)
Primary key column: ID Source for the primary key: Existing trigger
Select columns: both columns Process options: Insert, Update,
Delete
- Slide 12
- Defining the Form
- Slide 13
- Slide 14
- Confirm and Finish
- Slide 15
- Report and form pages are working List, edit, create, update,
delete Running Report and Form
- Slide 16
- Making Pages User Friendly Instead of showing ids, member name
and talent description should be displayed Report page Modify
report region source
- Slide 17
- Making Pages User Friendly To show desired columns in an active
report Use Action Select columns
- Slide 18
- Making Pages User Friendly Form page Change labels to Member
and Talent Change both to select list (LOV) MEMBER_ID and
TALENT_ID
- Slide 19
- Making Pages User Friendly
- Slide 20
- Adding Validations Maintain entity integrity Provide user
friendly error message on the form page Validation script SELECT *
FROM MEMBER_TALENT WHERE MEMBER_ID = &P??_MEMBER_ID. AND
TALENT_ID = &P??_TALENT_ID. Use your page number Notice the
ending period for substitution variables
- Slide 21
- Adding Validations Edit the form page, page processing create
validation Validation level: Page Validation name: Insert
validation Error display location: Inline in Notification
Validation type: SQL NOT Exists Validation code: {the validation
script} Error message: The member already has the selected talent.
When button pressed: Create Create a similar validation for
update
- Slide 22
- Adding Validations
- Slide 23
- Slide 24
- Page Navigation Navigation controls are shared components
Create navigation control at the application level on the shared
components page Tabs Navigation bar entries Breadcrumbs Lists
- Slide 25
- Creating Tabs Tabs are grouped in collections called a tab set
Each tab must be part of a tab set Two different types of tabs
Standard tabs For only one level of tabs with each tab associated
with a particular page Parent tabs Parent tab set acts as a
container for a group of standard tabs Define more contextual list
of tabs
- Slide 26
- Creating Tabs To manage tabs Shared components Navigation Tabs
Manage tabs Add new parent tab The first parent tab replaces the
pseudo parent tab
- Slide 27
- Creating Tabs Move a standard tab between parent tabs Edit the
tab and switch Standard Tab Set
- Slide 28
- Creating Tabs Add more standard tabs under parent tab In order
to show tabs, make sure set to the appropriate Page Template and
Standard Tab Set for each page Right click title of the page Edit
Display attributes
- Slide 29
- Creating Tabs
- Slide 30
- Navigation Bar Entries Navigation bar entries offer an easy way
to move users between pages A navigation entry enables application
to display a link for quick access on pages To access navigation
bar entries Shared components Navigation Navigation bar entries
Create From scratch Navigation to URL Entry label: Help Page: {a
help page} and check [Printer friendly] (optional) Create
- Slide 31
- Publish Application Publish the application with URL
http://icarusweb.webster.edu/pls/apex/f?p={app_id} Manage APEX
users APEX home Administration Manage users and groups Create a
test user Username: Email address: User is a developer: No
Password:
- Slide 32
- Application home Export/Import Application Export and
Import
- Slide 33
- Readings Application Express Users Guide Adding Navigation
Deploying an Application