Skip to Main Content
Building Java Enterprise Applications
book

Building Java Enterprise Applications

by Brett McLaughlin
March 2002
Intermediate to advanced content levelIntermediate to advanced
320 pages
8h 58m
English
O'Reilly Media, Inc.
Content preview from Building Java Enterprise Applications

Creating Types

Chapter 7 detailed using SQL to populate the various “type” tables (USER_TYPES and ACCOUNT_TYPES). As explained in the text, this was necessary because only local interfaces were available for the relevant entity beans. This section provides the SQL scripts for that task on various databases.

Cloudscape

The SQL script shown in Example A-26 creates the user and account type data on Cloudscape databases.

Example A-26. SQL Script for Creating Type Data on Cloudscape Databases

-- Create User Types
INSERT INTO USER_TYPES VALUES (1, 'Client');
INSERT INTO USER_TYPES VALUES (2, 'Employee');

-- Create Account Types
INSERT INTO ACCOUNT_TYPES VALUES (1, 'Everyday');
INSERT INTO ACCOUNT_TYPES VALUES (2, 'Investment');
INSERT INTO ACCOUNT_TYPES VALUES (3, 'Investment Plus');
INSERT INTO ACCOUNT_TYPES VALUES (4, 'Money Market');
INSERT INTO ACCOUNT_TYPES VALUES (5, 'Savings');

InstantDB

Example A-27 is an SQL script that creates types on InstantDB databases.

Example A-27. SQL Script for Creating Type Data on InstantDB Databases

; Load InstantDB JDBC drivers d org.enhydra.instantdb.jdbc.idbDriver; o jdbc:idb=forethought.prp; ; Create User Types e INSERT INTO USER_TYPES VALUES (1, 'Client'); e INSERT INTO USER_TYPES VALUES (2, 'Employee'); ; Create Account Types e INSERT INTO ACCOUNT_TYPES VALUES (1, 'Everyday'); e INSERT INTO ACCOUNT_TYPES VALUES (2, 'Investment'); e INSERT INTO ACCOUNT_TYPES VALUES (3, 'Investment Plus'); e INSERT INTO ACCOUNT_TYPES VALUES (4, 'Money Market'); ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Enterprise Web Programming with Java

Enterprise Web Programming with Java

O'Reilly Media, Inc.
Modernizing Enterprise Java

Modernizing Enterprise Java

Markus Eisele, Natale Vinto

Publisher Resources

ISBN: 0596001231Supplemental ContentCatalog PageErrata