Samples Directory

Ice Hockey Data

Some sample SQL data can be found in your NuoDB installation in samples/quickstart/sql.

It contains North American Ice Hockey statistics going back over a hundred years, but you don’t need to know anything about Ice Hockey to find it useful! Many of the examples elsewhere in this online help use this data.

To load, use the NuoDB SQL command-line tool nuosql (it’s in the NuoDB bin directory). It displays all the SQL it is running to the console, but you can ignore it.

Schema for Ice Hockey data
Figure 1. Schema for Ice Hockey data
# Assumes samples/quickstart/sql is your current directory
nuosql <db> --user <username> --password <pwd> --schema hockey --file create-db.sql
nuosql <db> --user <username> --password <pwd> --schema hockey --file Players.sql
nuosql <db> --user <username> --password <pwd> --schema hockey --file Scoring.sql
nuosql <db> --user <username> --password <pwd> --schema hockey --file Teams.sql
<db> is of the form <database-name>@<server> where <server> is the IP address or DNS name of the database host where an Admin Process is running. If the database is running (or mapped) locally on Windows, the database must be <database-name>@localhost. On Linux localhost is optional.

In some cases it may be the IP address or DNS name of a load-balancer or ingress that gives access to NuoDB (for example when running NuoDB on Kubernetes). Your NuoDB system administrator should be able to help you with this.

The other quick start examples in this section include loading and using the quick start sample data.

Code Examples

The samples directory also contains small example programs showing how to use some of our drivers (C, C++ and Java).