Design Requirements
Minimal Design Requirements
You can use the Database Designer's Create New Database Design command (described in the Database Administrator's Guide) to generate a minimal, K=0 design for your schema. If you wish to start from scratch, these are the minimal projection requirements for a functioning database with no
K-Safety (K=0).
K represents the maximum number of nodes in a database that can fail and recover with no loss of data. In Vertica V2.1, the value of K can be zero (0) or one (1). The value of K can be one (1) only when the
Physical Schema design meets certain requirements. The designs generated by the Database Designer are K-Safe.
A physical schema consists of a set of projections used to store data on disk. The projections in the physical schema are based on the objects in the Logical Schema.
- You must define at least one
superprojection for each table in the
logical schema.A logical schema consists of a set of tables and referential integrity constraints in a Vertica database. The objects in the logical schema are visible to SQL users. The logical schema does not include projections, which make up the physical schema.
A superprojection is a projection that contains every column of a table in the Logical Schema. A table can have multiple superprojections with different sort orders.
- You must replicate (define an exact copy of) each dimension table superprojection on each
node.A node is a host configured to run an
instance of Vertica. It is a member of a database
cluster (see Node Definition). For a database to have the ability to recover from the failure of a node requires at least three nodes. Vertica Systems, Inc. recommends that you use a minimum of four nodes.
A cluster generally refers a collection of hosts or a collection of nodes bound to a database. A cluster is not part of a database definition and thus does not have a name.
An instance of Vertica consists of the running Vertica process and disk storage (catalog and data) on a host. There can be only one instance of Vertica running on a host at any time.
K-Safe Design Requirements
Because of the complexity involved, Vertica does not define specific requirements for a K-Safe physical schema design. However, the
Database Designer provides a way to make a custom physical schema design K-Safe:
The Database Designer is a tool that analyzes a logical schema definition, sample queries, and sample data and generates a set of projections in the form of an SQL script to be executed after you create the tables but before you load any data. The script creates a minimal set of
superprojections to ensure K-Safety, and optionally pre-join projections. In most cases, the projections created by the Database Designer provide excellent query performance within physical constraints. You can, however, write a custom projection script should the Database Designer not meet your needs.
A superprojection is a projection that contains every column of a table in the Logical Schema. A table can have multiple superprojections with different sort orders.
- Use the Create New Database Design to generate a 0-safe design for your schema.
- Write custom projections.
- Use Modify Existing Database Design to make the design K-safe.
Alternatively, you can use the command line interface as described in the Writing Database Designer Scripts section of this document.