SQL Foundations  «Prev 

Elements of Databases

Databases are really simple to understand if you think about them like spreadsheets. The directory containing your spreadsheets is the database, while the individual spreadsheet files represent the tables in the database.
From there, it is easy to equate rows and columns to those found in an Excel spreadsheet. Do not read more into the terms than is really intended; it is just a way to identify which portions of the information you are referring to.

Data Management

Efficient data management typically requires the use of a computer database. A database is a shared, integrated computer structure that stores a collection of:
  1. End-user data, that is, raw facts of interest to the end user.
  2. Metadata, or data about data, through which the end-user data are integrated and managed.
The metadata provides a description of the data characteristics and the set of relationships that links the data found within the database. For example, the metadata component stores information such as the name of each data element, the type of values (numeric, dates, text) stored on each data element, whether or not the data element can be left empty, and so on. The metadata provide information that complements and expands the value and use of the data. In short, metadata[1] present a more complete picture of the data in the database. Given the characteristics of metadata, you might hear a database described as a "collection of self-describing data.

Database Schema

A schema is quite simply a group of related objects in a database. Within a schema, objects that are related have relationships to one another, as discussed earlier. There is one owner of a schema, who has access to manipulate the structure of any object in the schema. A schema does not represent a person, although the schema is associated with a user account that resides in the database.
The three models associated with a schema are as follows:
  1. The conceptual model, also called the logical model, is the basic database model, which deals with organizational structures that are used to define database structures such as tables and constraints.
  2. The internal model, also called the physical model, deals with the physical storage of the database, as well as access to the data, such as through data storage in tables and the use of indexes to expedite data access. The internal model separates the physical requirements of the hardware and the operating system from the data model.
  3. The external model, or application interface, deals with methods through which users may access the schema, such as through the use of a data input form. The external model allows relationships to be created between the user application and the data model. Figure 1 depicts a schema in a relational database.

[1]metadata: a set of data that describes and gives information about other data.