The Cars application has numerous SQL files that are not used when the application is running. They are used only for creating, populating, and viewing database tables from NetBeans. These files are listed by table.
Note that all of the statements in these SQL file are terminated by
semicolons.
This is required for SQL statements that are
sent directly to the database.
It is not allowed for statements accessed
through JDBC.
Some of the files also contain multiple statements.
This is not allowed for statements accessed
through JDBC.
There are two SQL files used for creating and populating the
person
table.
The person-select.sql
file can be used to view the
resulting table.
In addition the are SQL files demonstrating the UPDATE and DELETE SQL
statements.
There are two SQL files used for creating and populating the
manufacturer
table.
In addition the is a SQL file with a SELECT SQL statement to view
the resulting table.
There are two SQL files used for creating and populating the
manufacturer
table.
In addition the is a SQL file with a SELECT SQL statement to view
the resulting table.
The model-view.sql
file provides a better view of the table
showing manufacturer names instead of manufacturer ids.
There are two SQL files used for creating and populating the
car
table.
In addition the is a SQL file with a SELECT SQL statement to view
the resulting table.
The car-view.sql
file provides a better view of the table
showing model names instead of model ids and showing manufacturer
names instead of manufacturer ids.
There are two SQL files used for creating and populating the
ownership
table.
In addition the is a SQL file with a SELECT SQL statement to view
the resulting table.
The car-view.sql
file provides a better view of the table
showing person names instead of person ids, showing model names instead
of model ids, and person names instead of person ids.
The manufacture name could also have been displayed by including the
manufacturer table in the table list, the manufacturer.name column in
the column list, and an extra WHERE condition.