Oracle Application Express (APEX)

36
Oracle Application Express (APEX) Project Implementation for COSC 5050 Distributed Database Applications Lab2

description

Oracle Application Express (APEX). Project Implementation for COSC 5050 Distributed Database Applications Lab2. Using Application Builder. Oracle SQL and PL/SQL script Navigating the Application Builder Install and run the demonstration applications Navigating between pages - PowerPoint PPT Presentation

Transcript of Oracle Application Express (APEX)

Oracle Application Express (APEX)

Oracle Application Express (APEX)Project Implementation for COSC 5050 Distributed Database ApplicationsLab2Using Application BuilderOracle SQL and PL/SQL scriptNavigating the Application BuilderInstall and run the demonstration applicationsNavigating between pagesGUI componentsReports and formsCreate applicationOracle SQLDDL with create and dropCreate table, primary key and foreign keyCreate sequenceCreate viewDrop objectsDML with Insert, update, deleteTransaction management with commit and rollbackMaintain your database with script filesFor create, data, and dropCreate TablesCreate tableColumn namesData typeConstraints

Create Views

Create SequencesCreate sequenceFor generating primary keyStart withIncrement by CREATESEQUENCEMEMBER_SEQINCREMENTBY1STARTWITH1;CREATESEQUENCEPHONE_SEQINCREMENTBY1STARTWITH1;

Drop ObjectsThe DROP command is used to remove any database object from the databaseDROP TABLE MEMBER;DROP SEQUENCE MEMBER_SEQ;DROP VIEW MEMBER_LIST;Data ManipulationDML data manipulation languageINSERTUPDATEDELETETransaction managementCOMMITROLLBACK

Function and Stored Procedure

TriggerTriggerA named PL/SQL block stored in a database and executed implicitly when a triggering event occurs

What Is Application Builder?Application Builder is an environment to build applicationsAssemble an HTML interface (or application) on top of database objects such as tables and views Through wizards or direct inputEach application is a collection of pages linked together using tabs, buttons, or hypertext links11Demonstration ApplicationTwo demonstration applicationsTo learn more about the different types of functionality

Using Application BuilderAccessing application builderApplication builder homeView icons/detailsApplication home

Application PropertiesConfiguring the application propertiesGeneral definitionSecurity settingsGlobalization attributes

PageA page is the basic building block of an applicationPages also contain user interface elements such as tabs, lists, buttons, items, and regionsTo see the definition of each page belonging to your application, you use the Page Definition pagePage rendering Page processingShared componentsPage and Page Definition

Page DefinitionPage Rendering Controls and logic that are executed when a page is renderedPage rendering is the process of generating a page from the databasePage ProcessingLogic controls (such as computations and processes) that are evaluated and executed when the page is processedShared ComponentsComponents used by the current page that can also be referenced by other pages within your applicationCreate ApplicationBuild an application with departments and employeesTables DEPT and EMP from demo applicationInside Application builderCreate Application Type: Database From Scratch

Create ApplicationApplication name: AnyCo Corp

Create ApplicationAdd following pagesHome (blank)Department (report from table DEPT)Subordinate to home pageImplementation: ClassicRename the page name and column headings accordingly

Create ApplicationTabs options: One level tabsShared components: NoAttributesAuthentication scheme: Application ExpressDate format: MM/DD/YYYYUser interface theme: Theme 1 (or anyone)Confirm: Create

Run ApplicationRun applicationLogin with APEX user name and passwordDepartment report

Add PagesAdding an employee report and an entry formInside the application home Create Page Form Form on a Table with ReportTable name: EMPDefine report pagePage name: EmployeeRegion title: EmployeeBreadcrumb: BreadcrumbBreadcrumb entry name: EmployeeSelect parent entry: HomeDefine Report Page

Define Report PageTab optionsUse an existing tab set and create a new tab within the existing tab setTab set: TS1 (Home)New tab label: Employee

Define Report PageSelect columns and select an edit link image

Define Form PageDefine form pagePage name: Create/Edit EmployeeRegion title: Create/Edit EmployeeBreadcrumb entry name: Create/Edit EmployeePrimary key type: Select primary key column(s)Primary key column: EMPNODefine Form Page

Define Form PageDefine the source for the primary key columnsExisting trigger

For tables of our project, use Existing trigger as the source for the primary key column.29Define Form PageSelect the columns to include in the form pageIdentify the process options (insert, update, delete)

Define Form PageConfirmation and finish

Run Report and Form

Add Page NavigationAdd page navigation for employee reportApplication home pageShared components Lists Navigation Create List EntrySequence: 20List Entry Label: EmployeeTarget: Page: 3 (the employee report page)

Add Page NavigationAdd tab for departmentApplication home pageShared components Tabs Manage tabsAdd new standard tabTab label: DepartmentTab current page: 2 (the department report page)Sequence: 15Edit standard tab: HomeRemove tab also current for pagesAdd Page Navigation

ReadingsOracle Application Express SQL Workshop and Utilities GuideManaging Database Objects with Object BrowserUsing SQL ScriptsUsing SQL Commands2 Day + Application Express Development GuideGetting Started with Oracle Application ExpressBuilding Your Application