1 Introducing Eclipse DTP for Ingres An Introduction GIUA Juni 2007 J. Peel Ingres Corp.
-
Upload
aron-flynn -
Category
Documents
-
view
216 -
download
2
Transcript of 1 Introducing Eclipse DTP for Ingres An Introduction GIUA Juni 2007 J. Peel Ingres Corp.
1
Introducing Eclipse DTP for
Ingres
An IntroductionGIUA Juni 2007
J. Peel Ingres Corp
2
Overview
• Open Source Development Tool
• Eclipse, DTP and Ingres
• Database Browsing and Editing
• Examples
3
Ingres
• Business Open Source DBMS
• Developer IDE?
• Promote Ingres Uptake
• Promote Community Involvement
4
Eclipse
• Advanced Development Framework
• Plug-ins provide functionality
• Java
• Java IDE
• CDT: C/C++ IDE
• DTP: Data Tools Platform
5
Eclipse DTP
• Access to SQL Data Sources
• Eclipse “Look and Feel”
• Browse
• Edit
• View
6
Eclipse Plug-In Architecture
Ingres DTP
• Connectivity
• Schema Browsing
• Ingres SQL Syntax
• Ingres DB Entities
Eclipse Framework
Workspace
EMF
GEF
DTP Ingres
7
Ingres Eclipse Functionality
• Browse Database Objects• Tables• Stored Procedures• Triggers (Rules)
• Ad Hoc SQL
8
Ingres Plug-in Overview
9
Tables Example
10
Stored Procedures Example
11
Example: Database Schema
Create Audit:
Table
Procedure
Rule
12
Database Schema Development
• Audit New Routes Added
• New Schema Components:
Audit Table: route_new
Stored Procedure:
route_add_dbp
Trigger on Table:
route_add_rul
13
Create Table routes_added Example
14
Create Stored Procedure Example
15
Create Audit Rule Example
16
Test New Rule Example
17
Checking Rule Example Continued
18
Example: BEFORE Rule
Create BEFORE Rule
19
Before Rule
• New in 2006r2
• Triggers before Ingres updates the base table
• Prevent unwanted updates
• For Example• Where no flight slots available
• Procedure and BEFORE Rule
20
Saving before procedure
21
Before Rule Example
22
Test BEFORE Trigger Example
23
Example: Develop an application
Simple Application
24
Developing A Simple Application
• Connect to database
• Insert a new Country
• Retrieve all Countries
• Disconnect
25
Create Java Project
26
Add JDBC Driver
• Libraries Tab
• Add full path to iijdbc.jar
27
Create Class
• File New Class
• Package• com.ingres.one
• Name• CountryList
• Check• public static void main
36
Running Ingres Application
37
Example: Import a Project
Import the source from the IFF project
38
Importing Project Source Overview
39
Launching The Application
• Select the project com.ingres.demoapp
• Context Menu:
• Run As… Eclipse Application
40
Launching the Application: Example
41
Running The Application Example
42
Ingres Functionality Demonstrated
• Simple SELECT• CountryDAO: getCountries()
• Dynamic SELECT• AirportDAO: getRegionsByCountry()
• Stored Procedure• AirportDAO: getAirportsByRegion()
43
Calling An Ingres Stored Procedure
44
Summary Eclipse and Ingres DTP plug-in
• Browse Database
• Ad hoc SQL
• Work with: Tables, Procedures, Triggers
• Examples• Develop Schema• BEFORE TRIGGER• Simple Application• Import IFF Demo
45
Questions?
• Answers!
46
Introducing Eclipse DTP for
Ingres
An IntroductionGIUA Juni 2007
J. Peel Ingres Corp
Danke
sch
ön!