The Elements of A Database
The Elements of A Database
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:
NOTE.
Table:
A table is the primary unit of physical storage for data in
a database. When a user accesses the database, a table
is usually referenced for the desired data. Multiple tables
might comprise a database, therefore a relationship
might exist between tables. Because tables store data, a
table requires physical storage on the host computer for
the database.
Columns:
A column, or field, is a specific category of information
that exists in a table. A column is to a table what an
attribute is to an entity. In other words, when a business
model is converted into a database model, entities
become tables and attributes become columns. A column
represents one related part of a table and is the smallest
logical structure of storage in a database. Each column in
a table is assigned a data type. The assigned data type
Rows :
A row of data is the collection of all the columns in a table
associated with a single occurrence. Simply speaking, a
row of data is a single record in a table. For example, if
there are 25,000 book titles with which a bookstore deals,
there will be 25,000 records, or rows of data, in the book
titles table once the table is populated. The number of
rows within the table will obviously change as books'
titles are added and removed. See Figure 4 for an
illustration of a row of data in a table.
Data Types :
A data type determines the type of data that can be
stored in a database column.
Although many data types are available, three of the
most commonly used data types are
Alphanumeric
Numeric
Date and time
Keys:
The integrity of the information stored in a database is
controlled by keys. A key is a column value in a table that
is used to either uniquely identify a row of data in a table,
or establish a relationship with another table. A key is
normally correlated with one column in table, although it
might be associated with multiple columns. There are two
types of keys: primary and foreign.
Primary Keys