Manage Other Database Objects

Tables are the primary objects in a database schema, as they hold your data. But they are not the only database objects that NuoDB supports.


An Index object is used to speed up SQL query processing. An index can be used to efficiently find all row matching some column in your query and then walk through only that subset of the table to find exact matches. If you don’t have indexes on any column in a WHERE clause, the query must have to walk through the whole table and check every row to see if it matches, which may be a slow operation on big tables.


Sequence objects are special single row tables created with the CREATE SEQUENCE command (see CREATE SEQUENCE). NuoDB will also generate a sequence object when a table column is defined as auto-generated without specifying an existing sequence object. Sequences are used to generate unique identifiers for rows in a table. The sequence function, NEXT VALUE, can be used to advance the sequence and return a new value. Sequences will return unique values but do not necessarily return sequential values. Sequences are defined with a starting value that can be modified by the ALTER SEQUENCE command. A sequence can be dropped by the DROP SEQUENCE command. See ALTER SEQUENCE, DROP SEQUENCE.


Views can be defined that join and filter data from one or more tables. See the CREATE VIEW command.


Triggers are a specification that the database should automatically execute a particular function whenever a certain type of operation is performed on a table. See CREATE TRIGGER command for more details. Triggers can also be altered with the ALTER TRIGGER command and dropped with the DROP TRIGGER command. See ALTER TRIGGER, DROP TRIGGER.

Stored Procedures

Stored Procedures are supported in NuoDB and can be written in SQL or Java. See CREATE PROCEDURE. Procedures can also be altered with the ALTER PROCEDURE command and dropped with the DROP PROCEDURE command. See ALTER PROCEDURE, DROP PROCEDURE.