What is data - Firebird

Collectively, objects defined within a database are known as its metadata or, more traditionally, its schema. The process of creating and modifying metadata is referred to as data definition. The term “data definition” is often also applied to the description of a single object and its attributes.

This section covers the concepts, terminology, and language of data definition in detail.

Data Definition Language

The underlying structures of a database—its tables, views, and indexes—are created using a subset of the Firebird SQL language known as Data Definition Language (DDL). A DDL statement begins with one of the keywords CREATE, ALTER, RECREATE, orDROP, causing a single object to be created, modified, reconstructed, or destroyed, respectively. The database and, thereafter, its objects, rules, and relationships interlock to form the structure of a relational database.

The System Tables

Firebird stores metadata in a set of tables that it creates right inside the database—the system tables. All system tables have identifiers beginning with “RDB$”. For example, the table that stores the definitions and other information about all of the table structures in your database is called RDB$RELATIONS. A related table, RDB$RELATION _FIELDS, stores information and definitions for the columns of each table.

This “database within a database” is highly normalized. DDL statements are designed to perform operations on the metadata tables safely and in full cognizance of the cascading effects.

It is possible to alter the data in the system tables by performing regular SQL operations on them. Some admin tools, such as isql and gfix, do internally change data in the system tables. However, as a sophisticated database management system, Firebird was not designed with raw end-user manipulation of the system tables in mind.

SELECT queries on the system tables are fine and can be very useful for listing out things like character sets, dependencies, and so on.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Firebird Topics