Introducing the VMart example database
Vertica ships with a sample multi-schema database called the VMart Example Database, which represents a database that might be used by a large supermarket (VMart) to access information about its products, customers, employees, and online and physical stores. Using this example, you can create, run, optimize, and test a multi-schema database.
The VMart database contains the following schema:
-
public
(automatically created in any newly created Vertica database) -
store
-
online_Sales
VMart database location and scripts
If you installed Vertica from the RPM package, the VMart schema is installed in the /opt/vertica/examples/VMart_Schema
directory. This folder contains the following script files that you can use to get started quickly. Use the scripts as templates for your own applications.
Script/file name | Description |
---|---|
vmart_count_data.sql |
SQL script that counts rows of all example database tables, which you can use to verify load. |
vmart_define_schema.sql |
SQL script that defines the logical schema for each table and referential integrity constraints. |
vmart_gen.cpp |
Data generator source code (C++). |
vmart_gen |
Data generator executable file. |
vmart_load_data.sql |
SQL script that loads the generated sample data to the corresponding tables using COPY. |
vmart_ queries.sql |
SQL script that contains concatenated sample queries for use as a training set for the Database Designer. |
vmart_query_##.sql |
SQL scripts that contain individual queries; for example, vmart_query_01 through vmart_query_09.sql |
vmart_schema_drop.sql |
SQL script that drops all example database tables. |
For more information about the schema, tables, and queries included with the VMart example database, see the Appendix.