Database Management
Database Management
Databases
A database is a collection of data organized in a manner that allows access, retrieval, and use of
that data. Computers process data in a database into information. A database at a school, for
example, contains data about students, e.g., student data, class data, etc.
With database software, often called a database management system (DBMS), users create a
computerized database; add, modify, and delete data in the database; sort and retrieve data
from the database; and create forms and reports from the data in the database.
Data Integrity
Data integrity identifies the quality of the data. An erroneous student address in a
student database is an example of incorrect data. When a database contains this type
of error, it loses integrity. Data integrity is very important because computers and
people use information to make decisions and take actions.
Garbage in, garbage out (GIGO) is a computing phrase that points out the
accuracy of a computer’s output depends on the accuracy of the input. If you enter
incorrect data into a computer (garbage in), the computer will produce incorrect
information (garbage out).
The Hierarchy of Data
Data is organized in layers. In the computer profession, data is classified in a hierarchy.
Each higher level of data consists of one or more items from the lower level. For
example, a student has an address, and an address consists of letters and numbers.
Depending on the application and the user, different terms describe the various levels
of the hierarchy.
Each field in a record contains many characteristics, one of which is the field size.
Fields
A field is a combination of one or more related characters or bytes and is the smallest unit
of data a user accesses. A field name uniquely identifies each field. When searching for data
in a database, you often specify the field name. Field names for the data in the Instructor
file are Instructor ID, First Name, Last Name, Extension, Office, and Web Address.
A database uses a variety of characteristics, such as field size and data type, to define each
field. The field size defines the maximum number of characters a field can contain. For
example, the Instructor ID field contains 6 characters and thus has a field size of 6.
Adding Records
Users add new records to a file when they obtain new data. If a new student is admitted to the
school, an admissions department clerk adds a new record to the Student file.
Modifying Records
Generally, users modify a record in a file for two reasons:
(1) to correct inaccurate data or
(2) To update old data with new data.
Deleting Records
When a record no longer is needed, a user deletes it from a file. Assume a student named Benjamin
Tu is moving out of the country. The process required to delete a record from a file includes the
following steps:
1. The admissions department clerk displays the Student Maintenance Form.
2. The clerk displays Benjamin Tu’s student record on the screen.
3. The clerk confirms the correct student record is displayed.
Then, the clerk clicks the Delete button to delete the record from the Student file.
Validating Data
Validation is the process of comparing data with a set of rules or values to find out if the
data is correct. Many programs perform a validity check that analyzes data, either as you
enter it or after you enter it, to help ensure that it is correct. For instance, when an
admissions department clerk adds or modifies data in a student record, the DBMS tests
the entered data.
File Processing versus Databases
Almost all application programs use the file processing approach, the database approach, or a
combination of both approaches to store and manage data. The following pages discuss these
two approaches.
Data Redundancy — Each department or area in an organization has its own files in a file
processing system. Thus, the same fields are stored in multiple files. If a file processing system
is used at a school, for example, the Student file and the Student Schedule file both might
store the same students’ names and addresses.
Isolated Data — Often it is difficult to access data stored in separate files in different
departments. Sharing data from multiple, separate files is a complicated procedure and usually
requires the experience of a computer programmer.
Database Management Systems
As previously discussed, a database management system (DBMS), or database program, is
software that allows you to create, access, and manage a database. DBMSs are available for
many sizes and types of computers.
File Retrieval and Maintenance
A DBMS provides several tools that allow users and programs to retrieve and maintain data in the
database. To retrieve or select data in a database, you query it. A query is a request for specific
data from the database. Users can instruct the DBMS to display, print, or store the results of a
query. The capability of querying a database is one of the more powerful database features.
A DBMS offers several methods to retrieve and maintain its data. The four more commonly used
are query languages, query by example, forms, and report generators.
Backup and Recovery
Occasionally a database is damaged or destroyed because of hardware failure, a problem with the
software, human error, or a catastrophe such as fire or flood. A DBMS provides a variety of
techniques to restore the database to a usable form in case it is damaged or destroyed.
A backup, or copy, of the entire database should be made on a regular basis. Some DBMSs have
their own built-in backup utilities. Others require users to purchase a separate backup utility, or
use one included with the operating system.
More complex DBMSs maintain a log, which is a listing of activities that change the contents of the
database.
A DBMS that creates a log usually provides a recovery utility. A recovery utility uses the logs
and/or backups to restore a database when it becomes damaged or destroyed.
Continuous backup is a backup plan in which all data is backed up whenever a change is made.
This backup technique can cost more than other backup strategies but is growing in popularity
because of its benefits.
Relational, Object-Oriented, and Multidimensional Databases
Every database and DBMS is based on a specific data model. A data model consists of rules and
standards that define how the database organizes data. Three popular data models in use today
are relational, object-oriented, and multidimensional.
Relational Databases
A relational database is a database that stores data in tables that consist of rows and columns.
Each row has a primary key and each column has a unique name. A relational database uses terms
different from a file processing system.
A developer of a relational database refers to a file as a relation, a record as a tuple, and a field as
an attribute. A user of a relational database, by contrast, refers to a file as a table, a record as a
row, and a field as a column.
Object-Oriented Databases
An object-oriented database (OODB) stores data in objects. An object is an item that contains
data, as well as the actions that read or process the data. Object-oriented databases have several
advantages compared with relational databases: they can store more types of data, access this
data faster, and allow programmers to reuse objects.
Multidimensional Databases
A multidimensional database stores data in dimensions. Whereas a relational database is a two-
dimensional table, a multidimensional database can store more than two dimensions of data.
These multiple dimensions allow users to access and analyze any view of the database data.
Database Administration
Managing a company’s database requires a great deal of coordination. The role of coordinating the
use of the database belongs to the database analysts and administrators. To carry out their
responsibilities, these IT (information technology) professionals follow database design guidelines and
need cooperation from all database users.