Package edu.caltech.nanodb.relations
This package contains the basic data-types for representing relations in NanoDB.
Relations can be many different things - tables, views, external tables, or
results of subqueries in a particular SQL query, for example. All of the common
classes are in this package.
Type Information
One of the major aspects of this package is the collection of classes that represent type information in the database. The classes are as follows:-
Data-types are defined by the
SQLDataType
enumeration, which contains both the enumerated types and predefined type-ID byte-values. -
Column-types are defined by the
ColumnType
class, which contains the SQL data-type for the column (using theSQLDataType
enum), and any additional information about the column's type that might need to be specified. For example, aCHAR(100)
column has a base-type ofSQLDataType.CHAR
, but it must also specify its length as 100 characters. This additional information is also included in theColumnType
class.
-
Interface Summary Interface Description Tuple This interface provides the operations that can be performed with a tuple. -
Class Summary Class Description ColumnInfo Basic information about a table column, including its name and SQL type.ColumnRefs This class represents a set of columns in a schema by specifying the indexes of the columns in the set.ColumnType The type of a single column in a relation.DatabaseConstraintEnforcer This class enforces all database constraints on the database schema, including NOT NULL constraints, primary key/unique constraints, and foreign key constraints.ForeignKeyColumnRefs This class represents a foreign key constraint between two tables in the database.IndexColumnRefs This class records that there is an index built on a particular set of columns.KeyColumnRefs This class represents a primary key or other unique key, specifying the indexes of the columns in the key.Schema A schema is an ordered collection of column names and associated types.Schema.IndexedColumnInfo This helper class is used for the internal hashed column structure, so that we can do fast lookups based on table names and column names.TableInfo This class represents a single table in the database, including the table's name, and the tuple file that holds the table's data.TableUtils Created by donnie on 7/16/17.TupleUtils -
Enum Summary Enum Description ForeignKeyValueChangeOption An enumeration specifying the options allowed for ON DELETE and ON UPDATE actions for foreign keys.JoinType An enumeration specifying the different types of join operation.SQLDataType An enumeration of the SQL data-types that are supported by NanoDB.TableConstraintType An enumeration specifying the constraint types allowed on tables. -
Exception Summary Exception Description ConstraintViolationException This exception is used to signal when a database constraint is violated.SchemaNameException This exception is thrown when there are any schema name issues, such as duplicate column names, duplicate table names, ambiguous or invalid names, and so forth.