Professional Documents
Culture Documents
Download the .zip file from AUTOnline. Extract the file, and load project into NetBeans.
(2) Right-click the Databases > Java DB node and choose Properties.
If Java DB is registered, the Java DB Installation and Database Location fields will be
filled in. If Java DB is not registered, fill in the following two fields:
o Java DB Installation. Enter the path to the database server.
o Database Location. Enter the folder where you want the databases to be stored.
NOTE: please create a DB folder in the H drive or your USB drive. Through this
way, you can access the generated data in other computers.
(3) Click OK
The connection node icon should now appear whole ( ), which signifies that the
connection was successful.
(3) Expand the connection node, right-click its Tables subnode, and choose Execute
Command.
(4) Create the table (Book) showed in Table 1 by using the following SQL statement:
(5) Click the Run SQL button ( ) in the toolbar of the Source Editor to run the
script.
(6) Insert the 8 recodes in Table 1 by using the following SQL statement:
INSERT INTO BOOK VALUES (1, 'Slum Dog Millionaire', 'Fiction', 19.90),
(2, 'Run Mummy Run', 'Fiction', 28.00),
(3, 'The Land of Painted Caves', 'Fiction', 15.40),
(4, 'Cook with Jamie', 'Non-fiction', 55.20),
(5, 'Far Eastern Odyssey', 'Non-fiction', 24.90),
(6, 'Open', 'Non-fiction', 33.60),
(7, 'Big Java', 'Textbook', 55.00),
(8, 'Financial Accounting', 'Textbook', 24.80);
2
(7) Click the Run SQL button in the toolbar of the Source Editor to run the script.
Table 1: Book
You also need to include the driver (derbyclient.jar) of JaveDB into the project libraries. The
driver can be found in the folder where Java was installed.
Table 3: WeekSpecial
Title SpecialPrice