Skip to Content
Building Java Enterprise Applications
book

Building Java Enterprise Applications

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

Starting Over

With every creation comes at least one deletion. You’ll probably find that you need to clear out your database and re-create it from time to time. In an effort to make this easy for you, the scripts to perform this action are presented below. Just be careful; the data in your database will be completely wiped out by these SQL scripts, with no warning. The following scripts are database-specific analogs to Example 3-6 in the text.

Cloudscape

The SQL script shown in Example A-16 deletes all of the tables and constraints for Cloudscape databases.

Example A-16.  SQL Script for Deleting All Tables on Cloudscape Databases

-- Drop all tables
DROP TABLE INVESTMENTS;
DROP TABLE FUNDS;
DROP TABLE TRANSACTIONS;
DROP TABLE ACCOUNTS;
DROP TABLE ACCOUNT_TYPES;
DROP TABLE USERS;
DROP TABLE USER_TYPES;
DROP TABLE OFFICES;

InstantDB

Example A-17 is an SQL script that deletes the user and accounts storage on InstantDB databases.

Example A-17. SQL Script for Deleting All Tables on InstantDB Databases

; Load InstantDB JDBC drivers
d org.enhydra.instantdb.jdbc.idbDriver;
o jdbc:idb=forethought.prp;

; Drop all tables
e DROP TABLE INVESTMENTS;
e DROP TABLE FUNDS;
e DROP TABLE TRANSACTIONS;
e DROP TABLE ACCOUNTS;
e DROP TABLE ACCOUNT_TYPES;
e DROP TABLE USERS;
e DROP TABLE USER_TYPES;
e DROP TABLE OFFICES;

; Close up
c close;

MySQL

Example A-18 is an SQL script that deletes the Forethought data store on MySQL databases.

Example A-18. SQL Script for Deleting All Tables on MySQL Databases ...

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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Architecting Modern Java EE Applications

Architecting Modern Java EE Applications

Sebastian Daschner
Spring: Developing Java Applications for the Enterprise

Spring: Developing Java Applications for the Enterprise

Ravi Kant Soni, Amuthan Ganeshan, Rajesh RV

Publisher Resources

ISBN: 0596001231Catalog PageErrata