Databases

advertisement
Databases
February 6 – February 10

Introduction:

Business intelligence (BI) is knowledge about your customers, your competitors, your
business partners, your competitive environment, and your own internal operations – that
gives you the ability – that gives you the ability to make effective, important, and often
strategic business decisions (p. 126).

An operational database stores valuable information that forms the basis for business
intelligence (p. 126).

Online transactional processing (OTLP) is the gathering of input information,
processing, and updating of information in an operational database. Online analytical
processing (OLAP) is the manipulation of information to support decision making (p.
126).

Relational Database Model:
o
The most popular database model is the relational database model. A relational database
model is one that consists of multiple tables that they are related (p. 128).
ORDER TABLE
Order
Number
10000
10001
10002
10003
10004
Order
Date
9/1/2004
9/1/2004
9/2/2004
9/3/2004
9/5/2004
Customer
Number
1234
3456
1234
4567
3456
Concrete
Type
1
1
5
2
3
Amount
(Tons)
8
3
6
4
6
CUTOMER TABLE
Customer
Number
1234
3456
4567
Customer
Name
Smelding Homes
Mark Akey
Triple A Homes
Customer
Phone
662-329-7164
662-312-4589
662-325-1560
CONCRETE TYPE TABLE
Concrete Type
1
2
3
Type Description
Home foundation and walkways
Commercial foundation
Premier speckled
Customer
Address
55 Smith Lane
2122 E. Biscayne
1333 Burr Ridge
4
5
Premier marble
Premier shell
o
A database table consists of rows, each of which is known as a record. A database
consists of columns, each of which is known as a field.
o
All databases, including relational databases, have their structures defined by a data
dictionary (p. 128).
o
A primary key is a field that uniquely describes each record. A primary key must be
unique in that it uniquely identifies a record. (p 130).

For example, your SSN would be the primary key in the MUW databases that
uniquely identify you.

Looking at the tables above, Order Number is the primary key for the ORDER
TABLE, Customer Number is the primary key for the CUSTOMER TABLE, and
Concrete Type is the primary key for the CONCRETE TYPE TABLE.
o
A foreign key is a primary key of one file that appears in another file. You can think of it
as a pointer. It “points” at the primary key of another table. (p. 130).

A foreign key does not have to be unique.

The name of a foreign key must match the name of a primary key of another
table exactly.

The values stored in a foreign key must match a value stored in the primary key
of another table exactly.

Customer Number is a foreign key in the ORDER TABLE (it “points” at the
Customer Number primary key in the CUSTOMER TABLE). Concrete Type is
also a foreign key in the ORDER TABLE (it “points” at the Concrete Type
primary key in the CONCRETE TYPE TABLE).
o
Here’s an example. Focus on the 10002 order in the ORDER TABLE. We know that
this order was sold to Smelding Homes (because the Customer Number 1234 points at
primary key in the CUSTOMER table). We also know that the order was for six tons of
Premier Shell concrete (because Concrete Type 5 points at a primary key in the
CONCRETE TYPE TABLE).
o
Integrity constraints are rules that help ensure the quality of information. It basically
prevents you from entering invalid data (p. 131).

An example of an integrity constraint would be that a SSN must have 9
characters separated by dashes (NNN-NN-NNNN). If an entry does not match
this format, it will be kicked out.

Another example might be that a telephone number have 10 characters, separated
by dashes (NNN-NNN-NNNN). If an entry does not match this format, it will be
kicked out.

Database Management System (DBMS):
o
A database management system (DBMS) helps you specify the logical organizations for a
database and also retrieve and information within a database (p. 132).
o
o
A DBMS contains five important software components known as subsystems (p. 132):

DBMS Engine

DBMS Definition Subsystem

Data manipulation subsystem

Application generation subsystem

Data administration system
A DBMS Engine is the brain and processes requests from other subsystems (p. 132).

The physical view of information is how information is physically arranged,
stored, and accessed on some type of storage device (p. 132).

The logical view of information, on the other hand, focuses on how you as a
knowledge worker need to arrange and access information to meet your business
needs (p. 132).
o
The data definition subsystem creates and maintains the data dictionary and defines the
structure of the files (p. 133).
o
The data manipulation subsystem allows you to add, change, and delete information in a
database and query it for valuable information (p. 134).

View – allows you to see the contents of a database file, make whatever changes
you want, perform simple sorting, and query it to find the location of specific
information (p. 135).

Report generator – allows you to quickly define formats and what information
you want to see in a report (p. 136).

o
Query-by-example – allows you to graphically set up a database query (p. 136).
The application generation subsystem contains facilities to help you develop transactionintensive applications (p. 138).
o
The data administration subsystem helps you manage the overall database environment
by providing facilities for backup and recovery, security management, etc. (p. 138).
Download