Database schema is expressed by a set of definitions and these definitions are expressed by DDL (Data Definition Language). DDL is also used to specify additional properties of data.
Data Storage and Definition Language :
It is a special type of DDL. The set of statements used for, storage structure and access methods used by database system, are specified using this language.
The data values stored in the database must satisfy certain consistency constraints. The DDL provides facilities to specify such constraints. The database system checks these constraints every time the database is updated.
Domain Constraints :
A domain of possible values must be associated with every attribute (e.g. integer, character etc.). Domain Constraints are the most elementary form of integrity constraint. They are tested easily by the system whenever a new data is entered into the database.
Referential Integrity :
There are cases where we wish to ensure that a value that appears in one relation for a given set of attribute also appear in a certain set of attributes in another relation, it is called referential integrity.
Database modification can cause violations of referential integrity. When a referential integrity constraint is violated, the normal procedure is the reject the action that caused the violation.
An assertion is any condition that the database must always satisfy. Domain constraints and referential integrity constraints are special form of assertions. When an assertion is created the system tests it for validity. If the assertion is valid, then any future modification to the database is allowed only if it does not cause that assertion to be violated.
Using Authorization we can differentiate among the users that how they can access the database. The most common authorizations are :
- read authorization : it allows reading, but not modification of data
- insert authorization : it allows insertion of new data, but modification of existing data is not allowed
- update authorization : it allows modification but not deletion of data
- delete authorization : it allows deletion of data
We may assign the user all, none or a combination of these types of authorization.
Data Dictionary :
The DDL, just like any other programming language, gets some instructions(statements) as input and generates some output. The output of DDL is placed in the data dictionary, which contains metadata (data about data). The data dictionary is considered to be a special type of table that can only be accessed and updated by the database system itself only. The database system consults the Data Dictionary before reading or modifying actual data.