About the CD

The CD-ROM contains several sets of sample schemas and SQL examples 
from the book. It also contains some useful shareware and trial software that 
you may want to try.


Sample Schemas

The three schemas used in the book for examples are:

1)	AMY. This schema contains typical relational database tables, indexes, 
	primary keys, and foreign keys. I use the AMY schema tables in many 
	chapters of the book. Mermaid seaweed collections, bread recipes, farms, 
	omnipotent rulers, and more are in these tables.

2)	AMYOBJ. This schema has a set of CREATE statements that incrementally 
	build a set of object types and object tables. AMYOBJ is featured in 
	Chapter 11, where you build the schema piece by piece. You are creating 
	a set of object tables to save your secret bread recipes and data about 
	your customers.

3)	BAKERY. The Perfect Bakery is your home business where you use object 
	tables that include a varray, a nested table, and other interesting object 
	types to save information about recipes, ingredients, and your precious 
	clientele. This schema is featured in Chapter 4. It is very similar to the 
	AMYOBJ schema, but is completed by running a single SQL script 
	instead of being built up from several scripts.
	All the schemas are built with SQL scripts contained in the Make directory 
	of the CD-ROM. Here are instructions for building each schema.


Build the AMY schema

To create the AMY user and install all the tables and data into the schema, 
follow these steps:

1.	Start up SQLPlus Worksheet.
	If you are running on NT or Windows 95 or Windows 98, select Start-->
	Programs-->Oracle HOME2-->DBA Management Tools-->SQLPlus Worksheet. 
	A login window appears.

	On UNIX, type this command at the operating system prompt:

	oemapp worksheet

2.	Log in as a valid Oracle DBA.
	The default user name and password of the Oracle8i DBA is SYSTEM and 
	MANAGER. Leave the Connect box empty if you are running your own 
	personal copy of Oracle8i. Otherwise, fill in the name of the Oracle8i 
	instance on your network. Leave the Connect As box defaulted to 
	Normal. The SQLPlus Worksheet window appears.

3.	Open the AMY.sql SQL script.
	The script is in the Make directory on the CD-ROM. Place the CD-ROM in your 
	CD-ROM drive. To open the file in SQLPlus Worksheet, click File-->Open
	in the menu. A window opens in which you can locate your CD-
	ROM drive and then open the Make directory and select the file named 
	AMY.sql. Click Open, and you will see the script in the upper window of 
	SQLPlus Worksheet.

4.	Adjust the CONNECT command if needed.
	A few lines into the script is the following line:
	CONNECT AMY/AMY123;

	This line only works if you run Oracle8i on your own computer. If you are 
	running on a networked database, modify the line to include your 
	network node name for the Oracle8i database. For example, if my 
	network node was named "sharpies," the command would be
	CONNECT AMY/AMY123@sharpies;

5.	Run the script.
	Click the Execute button (the lightning bolt). The script runs in the lower 
	window of SQLPlus Worksheet and sends feedback frequently:

	Statement completed.

6.	Exit SQLPlus Worksheet by clicking the X in the top right corner.
	Done! You now have lots of sample data to play with.


Create the AMYOBJ schema

You create this schema and all its objects step by step if you follow the 
instructions in Chapter 11. If you want to create the schema yourself without 
going through Chapter 11, follow these steps:

1.	Start up SQLPlus Worksheet.
	If you are running on NT or Windows 95 or Windows 98, select Start-->Programs-->
	Oracle HOME2-->DBA Management Tools-->SQLPlus Worksheet. 

	A login window appears.

	On UNIX, type this command at the operating system prompt:

	oemapp worksheet

2.	Log in as a valid Oracle DBA.
	The default user name and password of the Oracle8i DBA is SYSTEM and 
	MANAGER. Leave the Connect box empty if you are running your own 
	personal copy of Oracle8i. Otherwise, fill in the name of the Oracle8i 
	instance on your network. Leave the Connect As box defaulted to 
	Normal. The SQLPlus Worksheet window appears.

3.	Open the AMYOBJ_user.sql SQL script.
	The script is in the Make directory on the CD-ROM. Place the CD-ROM in your 
	CD-ROM drive. To open the file in SQLPlus Worksheet, click File-->Open in 
	the menu. A window opens in which you can locate your CD-ROM drive and then 
	open the Make directory and select the file named AMYOBJ_user.sql. Click Open, 
	and the script appears in the upper window of SQLPlus Worksheet.

4.	Run the script.
	Click the Execute button (the lightning bolt). The script runs in the lower 
	window of SQLPlus Worksheet and sends feedback:

	Statement completed.

5.	Connect to the AMYOBJ user.
	Type the following line into the top window of SQLPlus Worksheet:
	CONNECT AMYOBJ/AMYOBJ;
	This line only works if you run Oracle8i on your own computer. If you are 
	running on a networked database, modify the line to include your 
	network node name for the Oracle8i database. For example, if my 
	network node was named "sharpies," the command would be
	CONNECT AMYOBJ/AMYOBJ@sharpies;

6.	Run these scripts in order.

	Make sure the CD-ROM is in your CD-ROM drive.
	For each of the scripts listed here, click the Worksheet-->Run script selection 
	from the menu. Then locate the script file name in the Make directory of 
	the CD-ROM. This selection automatically reads and executes the SQL 
	script in the each file. The file names are:

	a)	AMYOBJ_object_types.sql
	b)	AMYOBJ_table_type.sql
	c)	AMYOBJ_array_type.sql
	d)	AMYOBJ_object_tables.sql
	e)	AMYOBJ_hybrid_table.sql

	Each script runs in the lower window of SQLPlus Worksheet and sends 
	feedback frequently:

	Statement completed.

7.	Exit SQLPlus Worksheet by clicking the X in the top right corner.
	Done! You have witnessed the creation of object types and object tables.


Create the BAKERY schema

This schema is very similar to the AMYOBJ schema in the previous section, 
except that it also loads data into the final object tables, varray, nested table, 
and hybrid table. Follow these steps to create everything in the BAKERY 
schema.

1.	Start up SQLPlus Worksheet.
	If you are running on NT or Windows 95 or Windows 98, select Start-->Programs
	-->Oracle HOME2-->DBA Management Tools-->SQLPlus Worksheet. 

	A login window appears.

	On UNIX, type this command at the operating system prompt:
	oemapp worksheet

2.	Log in as a valid Oracle DBA.
	The default user name and password of the Oracle8i DBA is SYSTEM and 
	MANAGER. Leave the Connect box empty if you are running your own 
	personal copy of Oracle8i. Otherwise, fill in the name of the Oracle8i 
	instance on your network. Leave the Connect As box set to the default of 
	Normal. The SQLPlus Worksheet window appears.

3.	Open the BAKERY.sql SQL script.
	The script is in the Make directory on the CD-ROM. Place the CD-ROM in your 
	CD-ROM drive. To open the file in SQLPlus Worksheet, click File-->Open in 
	the menu. A window opens in which you can locate your CD-ROM drive and then 
	open the Make directory and select the file named BAKERY.sql. Click Open, 
	and the script appears in the upper window of SQLPlus Worksheet.

4.	Adjust the CONNECT command if needed.
	A few lines into the script is the following line:
	CONNECT BAKERY/BAKERY;

	This line only works if you run Oracle8i on your own computer. If you are 
	running on a networked database, modify the line to include your 
	network node name for the Oracle8i database. For example, if my 
	network node was named "sharpies," the command would be
	CONNECT BAKERY/BAKERY@sharpies;

5.	Run the script.

	Click the Execute button (the lightning bolt). The script runs in the lower 
	window of SQLPlus Worksheet and sends feedback frequently:
	Statement completed.

6.	Exit SQLPlus Worksheet by clicking the X in the top right corner.
	Now you can play with a complete set of object tables!


Sample SQL Scripts

	Many of the chapters contain short SQL statements as examples. You can 
	run these yourself if you have installed the AMY and the BAKERY 
	schemas, as I describe in the "Sample Schemas" section earlier in this 
	appendix. The CD-ROM contains example SQL statements for some of the 
	chapters. I have included the SQL statements that are kind of long to type 
	out. Table B-1 lists all the scripts in the CD-ROM and where to find them.

Table B-1: Sample SQL Statements

Chapter	Directory	File				Description
   4	Chapter04	bakeryselectnestedtable.sql	Query a nested table
   4	Chapter04	bakerydeletenestedtable.SQL	Delete one row from 
							a nested table
   4	Chapter04	bakeryupdatenestedtable.sql	Update a nested table
   4	Chapter04	bakeryselectvarray.sql		Create a varray
  15	Chapter15	javarecipecostfunction.sql	Create Java stored 
							procedure
  17	Chapter17	mode.sql			SQL query with optimizer 
							hint
  17	Chapter17	table_stats.sql			Gather statistics for 
							one table
  18	Chapter18	create_plan_table.sql		Create table for explain 
							plan command
  18	Chapter18   explain_query_w_mixed_datatypes.sql	Sample of explain plan; 
							query uses mixture of 
							datatypes
  18	Chapter18	explain_query_with_function.sql	Sample of explain plan; 
							query has a function
  18	Chapter18	explain_query_with_nulls.sql	Sample of explain plan; 
							query has nulls
  18	Chapter18	query_with_nulls.sql		Query where indexed data 
							contains nulls


Additional Software

The CD-ROM contains some bonus software that I selected from the 
hundreds of sample and trial programs available on the Web. Try some of 
these out!

SQL tools from Quest Software

1)	TOAD: Despite its lowly name, TOAD is the editing tool of choice for many 
	Oracle developers. TOAD stands for Tool for Oracle Application 
	Developers. It may be a prince in disguise. This is a 30-day trial copy.

	To find out more about TOAD, check out their web site: 
	http://www.quests.com/toad/toad_info.html

2)	SQLNavigator: Here’s a good-looking development tool for writing SQL 
	and PL/SQL. It has built-in syntax help, color-coded keywords, a new 
	reporting tool, and sample code to use. This is a trial version.

	To find out more about SQLNavigator, check out their web site: 
	http://www.quests.com.

3)	SQLab Xpert: This tool is especially for the DBA in you. Use it to help you 
	tune SQL statements like a pro.

	To find out more about SQLab Xpert, check out Quest’s web site at 
	http://www.quests.com.

There is an install routine in the QUEST folder that gives you a choice of programs.
Double-Click on SETUP.BAT to start this routine. In this little interface, there are
also a link to check on product updates with Quest, and a link directly to their home
page.


Web Design tools from Allaire Corporation

1)	HomeSite 4.0: This evaluation version of the award-winning Web page 
	designer is yours to try. I, for one, am always looking for a better HTML 
	editor. Try this one on me.

	To find out more about HomeSite, check out their site at 
	http://www.allaire.com/Products/HomeSite/.

2)	ColdFusion Studio 4.0 for Windows: If you want to see other options in the 
	database-to-Web genre, try this evaluation copy. The Studio is the design 
	suite for ColdFusion. You need the application server to serve your 
	creation to the Web. ColdFusion has been around for quite a while and is 
	very popular. It costs a lot less than many of its competitors.

	To find out more about ColdFusion Studio, check out their web site 
	at http://commerce.allaire.com/.


Miscellaneous tools from 4Developers LLC

1)	Registry Crawler 2.0: Released in May 1999, this is a cool search tool that 
	looks through your Windows registry to help you find all the hidden 
	variables that the registry stores about your programs. It even has a new 
	feature for bookmarking locations in the registry for easy, direct access 
	from your desktop. This tool is shareware.

	To find out more about Registry Crawler, check out their web site at 
	http://www.4developers.com/news/index.htm#.

I have a Web site of my own, and I’ve created a section for questions and 
answers especially for Oracle8i For Dummies. Drop in and visit at
http://www.maui.net/~mcculc/o8ifordum/Welcome.html
You can email me at mcculc@maui.net
Aloha!
