Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Introducing Eclipse DTP for Ingres An Introduction GIUA Juni 2007 J. Peel Ingres Corp 1 Overview • Open Source Development Tool • Eclipse, DTP and Ingres • Database Browsing and Editing • Examples 2 Ingres • Business Open Source DBMS • Developer IDE? • Promote Ingres Uptake • Promote Community Involvement 3 Eclipse • Advanced Development Framework • Plug-ins provide functionality • Java • Java IDE • CDT: C/C++ IDE • DTP: Data Tools Platform 4 Eclipse DTP • Access to SQL Data Sources • Eclipse “Look and Feel” • Browse • Edit • View 5 Eclipse Plug-In Architecture Eclipse Framework EMF DTP Workspace GEF Ingres Ingres DTP • Connectivity • Schema Browsing • Ingres SQL Syntax • Ingres DB Entities 6 Ingres Eclipse Functionality • Browse Database Objects • Tables • Stored Procedures • Triggers (Rules) • Ad Hoc SQL 7 Ingres Plug-in Overview 8 Tables Example 9 Stored Procedures Example 10 Example: Database Schema Create Audit: Table Procedure Rule 11 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 12 Create Table routes_added Example 13 Create Stored Procedure Example 14 Create Audit Rule Example 15 Test New Rule Example 16 Checking Rule Example Continued 17 Example: BEFORE Rule Create BEFORE Rule 18 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 19 Saving before procedure 20 Before Rule Example 21 Test BEFORE Trigger Example 22 Example: Develop an application Simple Application 23 Developing A Simple Application • Connect to database • Insert a new Country • Retrieve all Countries • Disconnect 24 Create Java Project 25 Add JDBC Driver • Libraries Tab • Add full path to iijdbc.jar 26 Create Class • File New Class • Package • com.ingres.one • Name • CountryList • Check • public static void main 27 Running Ingres Application 36 Example: Import a Project Import the source from the IFF project 37 Importing Project Source Overview 38 Launching The Application • Select the project com.ingres.demoapp • Context Menu: • Run As… Eclipse Application 39 Launching the Application: Example 40 Running The Application Example 41 Ingres Functionality Demonstrated • Simple SELECT • CountryDAO: getCountries() • Dynamic SELECT • AirportDAO: getRegionsByCountry() • Stored Procedure • AirportDAO: getAirportsByRegion() 42 Calling An Ingres Stored Procedure 43 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 44 Questions? • Answers! 45 Introducing Eclipse DTP for Ingres An Introduction GIUA Juni 2007 J. Peel Ingres Corp 46