project implementation for cosc 5050 distributed database applications lab2

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

Upload: cassandra-hart

Post on 11-Jan-2016

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Oracle Application Express (APEX)

Project Implementation for COSC 5050 Distributed Database

ApplicationsLab2

Page 2: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Using Application BuilderOracle SQL and PL/SQL scriptNavigating the Application BuilderInstall and run the demonstration

applicationsNavigating between pagesGUI componentsReports and forms

Create application

Page 3: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Oracle SQLDDL with create and drop

Create table, primary key and foreign keyCreate sequenceCreate viewDrop objects

DML with Insert, update, deleteTransaction management with commit and

rollbackMaintain your database with script files

For create, data, and drop

Page 4: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Create TablesCreate tableColumn namesData typeConstraints

Page 5: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Create Views

Page 6: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Create SequencesCreate sequence

For generating primary keyStart withIncrement by

CREATE SEQUENCE MEMBER_SEQ INCREMENT BY 1 START WITH 1;CREATE SEQUENCE PHONE_SEQ INCREMENT BY 1 START WITH 1;

Page 7: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Drop ObjectsThe DROP command is used to remove any

database object from the databaseDROP TABLE MEMBER;DROP SEQUENCE MEMBER_SEQ;DROP VIEW MEMBER_LIST;

Page 8: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Data ManipulationDML – data manipulation language

INSERTUPDATEDELETE

Transaction managementCOMMITROLLBACK

Page 9: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Function and Stored Procedure

Page 10: Project Implementation for COSC 5050 Distributed Database Applications Lab2

TriggerTrigger

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

Page 11: Project Implementation for COSC 5050 Distributed Database Applications Lab2

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 links

Page 12: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Demonstration ApplicationTwo demonstration applications

To learn more about the different types of functionality

Page 13: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Using Application BuilderAccessing application builderApplication builder home

View icons/detailsApplication home

Page 14: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Application PropertiesConfiguring the application properties

General definitionSecurity settingsGlobalization attributes

Page 15: Project Implementation for COSC 5050 Distributed Database Applications Lab2

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 components

Page 16: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Page and Page Definition

Page 17: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Page DefinitionPage Rendering

Controls and logic that are executed when a page is rendered

Page rendering is the process of generating a page from the database

Page ProcessingLogic controls (such as computations and processes)

that are evaluated and executed when the page is processed

Shared ComponentsComponents used by the current page that can also

be referenced by other pages within your application

Page 18: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Create ApplicationBuild an application with departments and

employeesTables DEPT and EMP from demo application

Inside Application builderCreate Application Type: Database From

Scratch

Page 19: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Create ApplicationApplication name: AnyCo Corp

Page 20: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Create ApplicationAdd following pages

Home (blank)Department (report from table DEPT)

Subordinate to home page Implementation: Classic Rename the page name and column headings

accordingly

Page 21: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Create ApplicationTabs options: One level tabsShared components: NoAttributes

Authentication scheme: Application ExpressDate format: MM/DD/YYYY

User interface theme: Theme 1 (or anyone)Confirm: Create

Page 22: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Run ApplicationRun application

Login with APEX user name and passwordDepartment report

Page 23: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Add PagesAdding an employee report and an entry formInside the application home Create Page

Form Form on a Table with ReportTable name: EMP

Define report pagePage name: EmployeeRegion title: EmployeeBreadcrumb: BreadcrumbBreadcrumb entry name: EmployeeSelect parent entry: Home

Page 24: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Define Report Page

Page 25: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Define Report PageTab options

Use an existing tab set and create a new tab within the existing tab set

Tab set: TS1 (Home)New tab label: Employee

Page 26: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Define Report PageSelect columns and select an edit link image

Page 27: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Define Form PageDefine form page

Page name: Create/Edit EmployeeRegion title: Create/Edit EmployeeBreadcrumb entry name: Create/Edit EmployeePrimary key type: Select primary key column(s)Primary key column: EMPNO

Page 28: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Define Form Page

Page 29: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Define Form PageDefine the source for the primary key

columnsExisting trigger

Page 30: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Define Form PageSelect the columns to include in the form

pageIdentify the process options (insert, update,

delete)

Page 31: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Define Form PageConfirmation and finish

Page 32: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Run Report and Form

Page 33: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Add Page NavigationAdd page navigation for employee reportApplication home page

Shared components Lists Navigation Create List Entry Sequence: 20 List Entry Label: Employee Target: Page: 3 (the employee report page)

Page 34: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Add Page NavigationAdd tab for departmentApplication home page

Shared components Tabs Manage tabsAdd new standard tab

Tab label: Department Tab current page: 2 (the department report page) Sequence: 15

Edit standard tab: Home Remove tab also current for pages

Page 35: Project Implementation for COSC 5050 Distributed Database Applications Lab2

Add Page Navigation

Page 36: Project Implementation for COSC 5050 Distributed Database Applications Lab2

ReadingsOracle Application Express SQL Workshop and

Utilities GuideManaging Database Objects with Object

BrowserUsing SQL ScriptsUsing SQL Commands

2 Day + Application Express Development GuideGetting Started with Oracle Application ExpressBuilding Your Application