Data Definition Language (DDL)

Data Definition Language (DDL) commands are used to define, alter, and manage the underlying structure (schema) of your database.

While DML is used to manipulate the data inside the database, DDL is used to build the containers that hold the data. This includes creating tables, setting up indexes for performance, defining views, and registering custom functions.

Tables

Tables are the primary storage objects in a relational database.

  • CREATE TABLE: Defines a new table, its columns, data types, and constraints.
  • CREATE TABLE AS SELECT: Creates a new table and populates it dynamically using the results of a query.
  • ALTER TABLE: Modifies the structure of an existing table (e.g., adding, dropping, or renaming columns).
  • DROP TABLE: Permanently deletes a table and all the data it contains.

Indexes

Indexes are background data structures that dramatically speed up data retrieval operations.

Views

Views are virtual tables representing the result of a stored query. They do not store data themselves.

Sequences

Sequences are specialized database objects used to generate unique, strictly increasing or decreasing numbers, typically used for primary keys.

Functions

Because Oxibase embeds business logic directly into the database, you can define custom functions.

  • CREATE FUNCTION: Registers a User-Defined Function (UDF) written in a language like JavaScript or Python to be used within your SQL queries.

Table of contents


Copyright © 2025-2026 Oxibase Contributors. Gabriel Maeztu.