Sunteți pe pagina 1din 19

Database Management System

Database
(1) A collection of information organized in such a way that a computer program can quickly
select desired pieces of data. You can think of a database as an electronic filing system.
Traditional databases are organized by fields records and files. A field is a single piece of
information! a record is one complete set of fields! and a file is a collection of records. "or
e#ample a telephone book is analogous to a file. $t contains a list of records each of which
consists of three fields% name address and telephone number.
An alternati&e concept in database design is known as Hypertext. $n a 'yperte#t database
any ob(ect whether it be a piece of te#t a picture or a film can be linked to any other ob(ect.
'yperte#t databases are particularly useful for organizing large amounts of disparate
information but they are not designed for numerical analysis.
To access information from a database you need a database management system (DBMS).
This is a collection of programs that enables you to enter organize and select data in a
database.
()) $ncreasingly the term database is used as shorthand for database management system
Database Management System
A collection of programs that enables you to store modify and e#tract information from a
database. There are many different types of *+,-s ranging from small systems that run on
personal computers to huge systems that run on mainframes. The following are e#amples of
database applications%
. computerized library systems
automated teller machines
. flight reser&ation systems
computerized parts in&entory systems
"rom a technical standpoint *+,-s can differ widely. The terms relational network flat,
and hierarchical all refer to the way a *+,- organizes information internally. The internal
organization can affect how quickly and fle#ibly you can e#tract information.
/equests for information from a database are made in the form of a qery which is a stylized
question. "or e#ample the query
-0102T A11 3'0/0 4A,0 5 6-,$T'6 A4* A70 8 9:
requests all records in which the 4A,0 field is -,$T' and the A70 field is greater than 9:.
The set of rules for constructing queries is known as a qery langage. *ifferent *+,-s
1
support different query languages although there is a semi;standardized query language
called S!" (strctred qery langage). -ophisticated languages for managing database
systems are called forth#generation langages or $%"s for short.
The information from a database can be presented in a &ariety of formats. ,ost *+,-s
include a report writer program that enables you to output data in the form of a report. ,any
*+,-s also include a graphics component that enables you to output information in the
form of graphs and charts.
RDBMS / Relational Database
-hort for relational database management system and pronounced as separate letters a type
of database management system (*+,-) that stores data in the form of related tables.
/elational databases are powerful because they require few assumptions about how data is
related or how it will be e#tracted from the database. As a result the same database can be
&iewed in many different ways.
An important feature of relational systems is that a single database can be spread across
se&eral tables. This differs from flat;file databases in which each database is self;contained
in a single table.
Almost all full;scale database systems are /*+,-<s. -mall database systems howe&er use
other designs that pro&ide less fle#ibility in posing queries.
(1) *istinct pieces of information usually formatted in a special way. All software is di&ided
into two general categories% data and programs. =rograms are collections of instructions for
manipulating data.
*ata can e#ist in a &ariety of forms ;; as numbers or te#t on pieces of paper as bits and bytes
stored in electronic memory or as facts stored in a person<s mind.
-trictly speaking data is the plural of datm a single piece of information. $n practice
howe&er people use data as both the singular and plural form of the word.
()) The term data is often used to distinguish binary machine;readable information from
te#tual human;readable information. "or e#ample some applications make a distinction
between data files (files that contain binary data) and text files (files that contain A-2$$ data).
(9) $n database management systems data files are the files that store the database
information whereas other files such as inde# files and data dictionaries store
administrati&e information known as metadata.
)
Flat-File Database
A relati&ely simple database system in which each database is contained in a single table. $n
contrast relational database systems can use multiple tables to store information and each
table can ha&e a different record format.
data
(1) *istinct pieces of information usually formatted in a special way. All software is di&ided
into two general categories% data and programs. =rograms are collections of instructions for
manipulating data.
*ata can e#ist in a &ariety of forms ;; as numbers or te#t on pieces of paper as bits and bytes
stored in electronic memory or as facts stored in a person<s mind.
-trictly speaking data is the plural of datm a single piece of information. $n practice
howe&er people use data as both the singular and plural form of the word.
()) The term data is often used to distinguish binary machine;readable information from
te#tual human;readable information. "or e#ample some applications make a distinction
between data files (files that contain binary data) and text files (files that contain A-2$$ data).
(9) $n database management systems data files are the files that store the database
information whereas other files such as inde# files and data dictionaries store
administrati&e information known as metadata.
Data Independence
The separation of data from the programs that use the data. 4early all modern applications
are based on the principle of data independence. $n fact the whole concept of a database
management system (*+,-) supports the notion of data independence since it represents a
system for managing data separately from the programs that use the data. $n contrast it is
possible to write applications in which the data being processed is actually represented in the
program<s source code. This data#dependent approach is &ery infle#ible because it makes it
difficult to modify the data and it also makes the data inaccessible to other programs.
Data Dictionary
$n database management systems a file that defines the basic organization of a database. A
data dictionary contains a list of all files in the database the number of records in each file
and the names and types of each field. ,ost database management systems keep the data
dictionary hidden from users to pre&ent them from accidentally destroying its contents. *ata
dictionaries do not contain any actual data from the database only bookkeeping information
for managing it. 3ithout a data dictionary howe&er a database management system cannot
access data from the database.
9
Data Mart
(Also spelled datamart) A database or collection of databases designed to help managers
make strategic decisions about their business. 3hereas a data warehouse combines databases
across an entire enterprise data marts are usually smaller and focus on a particular sub(ect or
department. -ome data marts called dependent data marts, are subsets of larger data
warehouses.
Attribute
1) A characteristic. $n a word processing application an underlined word would be said to
ha&e the nderline attribte& $n database systems a field can ha&e &arious attributes. "or
e#ample if it contains numeric data it has the nmeric attribte&
()) $n database management systems the term attribte is sometimes used as a synonym for
field.
(9) $n *>- systems e&ery file has a file attribte that indicate se&eral properties of the file.
"or e#ample they indicate whether the file is read;only whether it needs to be backed up
and whether it is &isible or hidden.
Definition: A single data item related to a database object. The database schema
associates one or more attributes with each database entity.
Also Known As: field, column
Example: In the following database table, the attributes are <name, ID, extension>
Name ID Extension
?im 1)@ ABA:
Caleri 1)D BD:9
+ob 1E) @)1@
Field
(1) A space allocated for a particular item of information. A ta# form for e#ample contains a
number of fields% one for your name one for your -ocial -ecurity number one for your
income and so on. $n database systems fields are the smallest units of information you can
access. $n spreadsheets fields are called cells.
@
,ost fields ha&e certain attributes associated with them. "or e#ample some fields are
numeric whereas others are te#tual some are long while others are short. $n addition e&ery
field has a name called the field name&
$n database management systems a field can be reqired, optional or calclated& A reqired
field is one in which you must enter data while an optional field is one you may lea&e blank.
A calculated field is one whose &alue is deri&ed from some formula in&ol&ing other fields.
You do not enter data into a calculated field! the system automatically determines the correct
&alue.
A collection of fields is called a record.
()) The phrase in the field refers to any geographical location other than the factory or office
where a product was created. -imilarly a field representati'e is an employee who represents
a company in distant locations
Record / Tuple / Row
(1) $n database management systems a complete set of information. /ecords are composed
of fields each of which contains one item of information. A set of records constitutes a file.
"or e#ample a personnel file might contain records that ha&e three fields% a name field an
address field and a phone number field.
$n relational database management systems records are called tples&
()) -ome programming languages allow you to define a special data structure called a record.
7enerally a record is a combination of other data ob(ects. "or e#ample a record might
contain three integers a floating;point number and a character string.
Definition: In a relational database, a row consists of one set of attributes (or one
tule! corresonding to one instance of the entity that a table schema describes.
:
Table / Relation
/efers to data arranged in rows and columns. A spreadsheet for e#ample is a table. $n
relational database management systems all information is stored in the form of tables.
Definition: A table in a relational database is a redefined format of rows and columns
that define an entity.
Also Known As: "elation
Key
$n database management systems a key is a field that you use to sort data. $t can also be
called a key field sort key index, or key word& "or e#ample if you sort records by age then
the age field is a key. ,ost database management systems allow you to ha&e more than one
key so that you can sort records in different ways. >ne of the keys is designated the primary
key, and must hold a unique &alue for each record. A key field that identifies records in a
different table is called a foreign key
Definition: A database #ey is a attribute utili$ed to sort and%or identify data in some
manner. &ach table has a rimary #ey which uni'uely identifies records. (oriegn #eys
are utili$ed to cross)reference data between relational tables.
rimary Key
Definition* The rimary #ey of a relational table uni'uely identifies each
record in the table. It can either be a normal attribute that is
guaranteed to be uni'ue (such as +ocial +ecurity ,umber in a table
with no more than one record er erson! or it can be generated by
the D-.+ (such as a globally uni'ue identifier, or /0ID, in .icrosoft
+12 +er3er!.
Foreign Key
Definition: A foreign key is a field in a relational table that matches the rimary #ey column
of another table. The foreign key can be used to cross;reference tables.
Candidate Key
Definition: A candidate #ey is a combination of attributes that can be uni'uely used to
identify a database record. &ach table may ha3e one or more candidate #eys. 4ne of
these candidate #eys is selected as the table rimary #ey.
Examples: There are a large number of candidate #eys in the samle table below.
+ome of these are <++,>, <5hone &xtension>, <,ame, ++,>, and <,ame, Age,
F
++,>. ,ote that <Age> is not a candidate #ey in this case because Amy and &li$abeth
share the same age.
Name Age SSN Phone Extension
Gama )1 1)9;@:;FADE 1)@)
0lango )9 EDA;F:;@9)1 E)D1
/a(i& )B 111;));9999 E91)
/athi )1 999;));1111 9)1@
-ethu )B EEE;EE;EEEE )91@
Aggregate Function
A function that performs a computation on a set of &alues rather than on a
single &alue. "or e#ample finding the a&erage or mean of a list of numbers is an aggregate
function.
All database management and spreadsheet systems support a set of aggregate functions that
can operate on a set of selected records or cells.
Cardinality
Definition: In set theory, cardinality refers to the number of members in the set. 6hen
secifically alied to database theory, the cardinality of a table refers to the number of
rows (or tules! contained in a table.
Examples: The table below has cardinality 7*
Name Age SSN Phone Extension
8ama 9: :9;)<7)=>?@ :9<9
+enthil :@ @?>)=7)<;9: @9?:
"aja 9: :::)99);;;; @;:9
8arthy 9A ;;;)99):::: ;9:<
Inde!
(1) $n database design a list of keys (or keywords) each of which identifies a unique record.
$ndices make it faster to find specific records and to sort records by the inde# field ;; that is
the field used to identify each record.
()) To create an inde# for a database or to find records using an inde#.
Sc"ema
A
=ronounce skee#ma, the structure of a database system described in a formal language
supported by the database management system (*+,-). $n a relational database the schema
defines the tables the fields in each table and the relationships between fields and tables.
-chemas are generally stored in a data dictionary. Although a schema is defined in te#t
database language the term is often used to refer to a graphical depiction of the database
structure.
#oin
$n relational databases a (oin operation matches records in two tables. The two tables must
be (oined by at least one common field. That is the (oin field is a member of both tables.
Typically a (oin operation is part of a -0102T query.
Merge
(1) To combine two files in such a way that the resulting file has the same organization as the
two indi&idual files. "or e#ample if two files contain a list of names in alphabetical order
merging the two files results in one large file with all the names still in alphabetical order.
4ote that merge is different from append. Append means to combine two files by adding one
of them to the end of the other.
()) $n word processing mail merge refers to generating form letters by combining one file
containing a list of names addresses and other information with a second file containing the
te#t of the letter.
Trigger / $ested Trigger
(1) $n a *+,- a trigger is a -H1 procedure that initiates an action (i.e. fires an action)
when an e&ent ($4-0/T *010T0 or I=*AT0) occurs. -ince triggers are e&ent;dri&en
specialized procedures they are stored in and managed by the *+,-. A trigger cannot be
called or e#ecuted! the *+,- automatically fires the trigger as a result of a data
D
modification to the associated table. Triggers are used to maintain the referential integrity of
data by changing the data in a systematic fashion.
0ach trigger is attached to a single specified table in the database.
Triggers can be &iewed as similar to stored procedures in that both consist of procedural
logic that is stored at the database le&el. -tored procedures howe&er are not e&ent;dri&e and
are not attached to a specific table as triggers are. -tored procedures are e#plicitly e#ecuted
by in&oking a 2A11 to the procedure while triggers are implicitly e#ecuted. $n addition
triggers can also e#ecute stored procedures.
A trigger can also contain $4-0/T I=*AT0 and *010T0 logic within itself so when the
trigger is fired because of data modification it can also cause another data modification
thereby firing another trigger. A trigger that contains data modification logic within itself is
called a nested trigger.
(2.) To initiate an action.
Stored rocedure
$n database management systems (*+,-s) an operation that is stored with the database
ser&er. Typically stored procedures are written in -H1. They<re especially important for
client;ser&er database systems because storing the procedure on the ser&er side means that it
is a&ailable to all clients. And when the procedure is modified all clients automatically get
the new &ersion.
DM%
-'ort for Data Maniplation Langage a set of statements used to store retrie&e modify
and erase data from a database. There are two types of *,1% procedural in which the user
specifies what data is needed and how to get it! and nonprocedural in which the user
specifies only what data is needed.
Re&erential Integrity
A feature pro&ided by relational database management systems (/*+,-<s) that pre&ents
users or applications from entering inconsistent data. ,ost /*+,-<s ha&e &arious referential
integrity rules that you can apply when you create a relationship between two tables.
"or e#ample suppose Table + has a foreign key that points to a field in Table A. /eferential
integrity would pre&ent you from adding a record to Table + that cannot be linked to Table
A. $n addition the referential integrity rules might also specify that whene&er you delete a
record from Table A any records in Table + that are linked to the deleted record will also be
deleted. This is called cascading delete& "inally the referential integrity rules could specify
E
that whene&er you modify the &alue of a linked field in Table A all records in Table + that
are linked to it will also be modified accordingly. This is called cascading pdate&
Normalization
hat is Normalization!
+asically it<s the process of efficiently organizing data in a database. There are two goals of
the normalization process% eliminate redundant data (for e#ample storing the same data in
more than one table) and ensure data dependencies make sense (only storing related data in a
table). +oth of these are worthy goals as they reduce the amount of space a database
consumes and ensure that data is logically stored.
The database community has de3eloed a series of guidelines for ensuring that
databases are normali$ed. These are referred to as normal forms and are numbered
from one (the lowest form of normali$ation, referred to as first normal form or :,(!
through fi3e (fifth normal form or 7,(!. In ractical alications, youBll often see :,(,
9,(, and ;,( along with the occasional <,(. (ifth normal form is 3ery rarely seen and
wonBt be discussed in this article.
-efore we begin our discussion of the normal forms, itBs imortant to oint out that they
are guidelines and guidelines only. 4ccasionally, it becomes necessary to stray from
them to meet ractical business re'uirements. Cowe3er, when 3ariations ta#e lace, itBs
extremely imortant to e3aluate any ossible ramifications they could ha3e on your
system and account for ossible inconsistencies. That said, letBs exlore the normal
forms.
"irst normal form #$N"% sets the 3ery basic rules for an organi$ed database*
&liminate dulicati3e columns from the same table.
Dreate searate tables for each grou of related data and identify each row with
a uni'ue column or set of columns (the rimary #ey!.
Second normal form #&N"% further addresses the concet of remo3ing
dulicati3e data*
"emo3e subsets of data that aly to multile rows of a table and lace them in
searate rows.
Dreate relationshis between these new tables and their redecessors through
the use of foreign #eys.
'hird normal form #(N"% goes one large ste further*
"emo3e columns that are not deendent uon the rimary #ey.
"inally) fo*rth normal form #+N"%) also #nown as -oyce)Dodd normal form
(-D,(! has one re'uirement*
1B
A relation is in -D,( if and only if e3ery determinant is a candidate #ey.
",-S' N.-/A0 ".-/ #$N"%
"ecall that :,( sets the 3ery basic rules for an organi$ed database*
&liminate dulicati3e columns from the same table.
Dreate searate tables for each grou of related data and identify each row with
a uni'ue column (the rimary #ey!.
6hat do these rules mean when contemlating the ractical design of a databaseE ItFs
actually 'uite simle.
The first rule dictates that we must not dulicate data within the same row of a table.
6ithin the database community, this concet is referred to as the atomicity of a table.
Tables that comly with this rule are said to be atomic. 2etFs exlore this rincile with
a classic examle G a table within a human resources database that stores the manager)
subordinate relationshi. (or the uroses of our examle, weFll imose the business
rule that each manager may ha3e one or more subordinates while each subordinate may
ha3e only one manager.
Intuiti3ely, when creating a list or sreadsheet to trac# this information, we would draw
u something li#e this*
/anager S*bordinate$ S*bordinate& S*bordinate( S*bordinate+
-ob Him .ary -eth
.ary .i#e Hason Darol .ar#
Him Alan
Cowe3er, recall the first rule imosed by :,(* eliminate dulicati3e columns from the
same table. Dlearly, the +ubordinate:)+ubordinate< columns are dulicati3e. Ta#e a
moment and onder the roblems raised by this scenario. Him only has one subordinate
G the +ubordinate9)+ubordinate< columns are simly wasted storage sace (a recious
database commodity!. (urthermore, .ary already has < subordinates G what haens if
she ta#es on another emloyeeE The whole table structure would re'uire modification.
At this oint, a second bright idea usually occurs to database no3ices* 6e donFt want to
ha3e more than one column and we want to allow for a flexible amount of data storage.
2etFs try something li#e this*
11
/anager S*bordinates
-ob Him, .ary, -eth
.ary .i#e, Hason, Darol, .ar#
Him Alan
This solution is closer, but it also falls short of the mar#. The subordinates column is still
dulicati3e and non)atomic. 6hat haens when we need to add or remo3e a
subordinateE 6e need to read and write the entire contents of the table. ThatFs not a
big deal in this situation, but what if one manager had one hundred emloyeesE Also, it
comlicates the rocess of selecting data from the database in future 'ueries.
CereFs a table that satisfies the first rule of :,(*
/anager S*bordinate
-ob Him
-ob .ary
-ob -eth
.ary .i#e
.ary Hason
.ary Darol
.ary .ar#
Him Alan
,ow, what about the second rule* identify each row with a uni'ue column or set of
columns (the rimary #ey!E Iou might ta#e a loo# at the table abo3e and suggest the
use of the subordinate column as a rimary #ey. In fact, the subordinate column is a
good candidate for a rimary #ey due to the fact that our business rules secified that
each subordinate may ha3e only one manager. Cowe3er, the data that weF3e chosen to
store in our table ma#es this a less than ideal solution. 6hat haens if we hire another
emloyee named HimE Cow do we store his manager)subordinate relationshi in the
databaseE
ItFs best to use a truly uni'ue identifier (li#e an emloyee ID or ++,! as a rimary #ey.
4ur final table would loo# li#e this*
/anager S*bordinate
1)
:?9 :<;
:?9 9A:
:?9 :9;
9A: :7=
9A: A<:
9A: :?>
9A: :@=
:<; 9A9
SEC.ND N.-/A0 ".-/ #&N"%
"ecall the general re'uirements of 9,(*
"emo3e subsets of data that aly to multile rows of a table and lace them in
searate rows.
Dreate relationshis between these new tables and their redecessors through
the use of foreign #eys.
These rules can be summari$ed in a simle statement* 9,( attemts to reduce the
amount of redundant data in a table by extracting it, lacing it in new table(s! and
creating relationshis between those tables.
2etBs loo# at an examle. Imagine an online store that maintains customer information
in a database. Their Dustomers table might loo# something li#e this*
CstNm FirstName !astName A""ress City State #IP
1 ?ohn *oe 1) ,ain -treet -ea 2liff 4Y 11:AE
) Alan ?ohnson D) 0&ergreen Tr -ea 2liff 4Y 11:AE
9 +eth Thompson 1E1) 40 1st -t ,iami "1 991:A
@ ?acob -mith 1@) $rish 3ay -outh +end $4 @FF9A
: -ue /yan @1) 40 1st -t ,iami "1 991:A
A brief loo# at this table re3eals a small amount of redundant data. 6eBre storing the
J+ea Dliff, ,I ::7>@J and J.iami, (2 ;;:7>J entries twice each. ,ow, that might not
seem li#e too much added storage in our simle examle, but imagine the wasted sace
if we had thousands of rows in our table. Additionally, if the KI5 code for +ea Dliff were
to change, weBd need to ma#e that change in many laces throughout the database.
19
In a 9,()comliant database structure, this redundant information is extracted and
stored in a searate table. 4ur new table (letBs call it KI5s! might loo# li#e this*
#IP City State
11:AE -ea 2liff 4Y
991:A ,iami "1
@FF9A -outh +end $4
If we want to be suer)efficient, we can e3en fill this table in ad3ance )) the ost office
ro3ides a directory of all 3alid KI5 codes and their city%state relationshis. +urely,
youB3e encountered a situation where this tye of database was utili$ed. +omeone
ta#ing an order might ha3e as#ed you for your KI5 code first and then #new the city and
state you were calling from. This tye of arrangement reduces oerator error and
increases efficiency.
,ow that weB3e remo3ed the dulicati3e data from the Dustomers table, weB3e satisfied
the first rule of second normal form. 6e still need to use a foreign #ey to tie the two
tables together. 6eBll use the KI5 code (the rimary #ey from the KI5s table! to create
that relationshi. CereBs our new Dustomers table*
CstNm FirstName !astName A""ress #IP
1 ?ohn *oe 1) ,ain -treet 11:AE
) Alan ?ohnson D) 0&ergreen Tr 11:AE
9 +eth Thompson 1E1) 40 1st -t 991:A
@ ?acob -mith 1@) $rish 3ay @FF9A
: -ue /yan @1) 40 1st -t 991:A
6eB3e now minimi$ed the amount of redundant information stored within the database
and our structure is in second normal formL
'1,-D N.-/A0 ".-/ #(N"%
we loo#ed at the basic re'uirements of ;,(. Cere they are again to refresh your
memory*
.eet the re'uirements of :,( and 9,(
"emo3e columns that are not fully deendent uon the rimary #ey.
Imagine that we ha3e a table of widget orders*
$r"er Nm%er
Cstomer
Nm%er
&nit Pri'e (antity )ota*
1 )@1 J1B ) J)B
1@
) D@) JE )B J1DB
9 E1E J1E 1 J1E
@ E1E J1) 1B J1)B
"emember, our first re'uirement is that the table must satisfy the re'uirements of :,(
and 9,(. Are there any dulicati3e columnsE ,o. Do we ha3e a rimary #eyE Ies, the
order number. Therefore, we satisfy the re'uirements of :,(. Are there any subsets of
data that aly to multile rowsE ,o, so we also satisfy the re'uirements of 9,(.
,ow, are all of the columns fully deendent uon the rimary #eyE The customer
number 3aries with the order number and it doesnBt aear to deend uon any of the
other fields. 6hat about the unit riceE This field could be deendent uon the
customer number in a situation where we charged each customer a set rice. Cowe3er,
loo#ing at the data abo3e, it aears we sometimes charge the same customer different
rices. Therefore, the unit rice is fully deendent uon the order number. The
'uantity of items also 3aries from order to order, so weBre 48 there.
6hat about the totalE It loo#s li#e we might be in trouble here. The total can be
deri3ed by multilying the unit rice by the 'uantity, therefore itBs not fully deendent
uon the rimary #ey. 6e must remo3e it from the table to comly with the third
normal form*
$r"er Nm%er Cstomer Nm%er &nit Pri'e (antity
1 )@1 J1B )
) D@) JE )B
9 E1E J1E 1
@ E1E J1) 1B
,ow our table is in ;,(. -ut, you might as#, what about the totalE This is a deri3ed
field and itBs best not to store it in the database at all. 6e can simly comute it Jon the
flyJ when erforming database 'ueries. (or examle, we might ha3e re3iously used
this 'uery to retrie3e order numbers and totals*
SELECT OrderNumber, Total
FROM WidgetOrders 6e can now use the following 'uery*
SELECT OrderNumber, UnitPrice * Quantity AS Total
FROM WidgetOrders to achie3e the same results without 3iolating normali$ation
rules.
".2-'1 N.-/A0 ".-/ #+N"%
1:
Definition: To be in (ourth ,ormal (orm, a relation must first be in -oyce)Dodd ,ormal
(orm. Additionally, a gi3en relation may not contain more than one multi3alued
attribute.
Examples: The following relation is ,4T in (ourth ,ormal (orm*
+anager Chi*" Em,*oyee
?im +eth Alice
,ary +ob ?ane
,ary 4I11 Adam
&ach manager can ha3e more than one child and each manager can suer3ise more
than one emloyee. Therefore, this relation is not in (ourth ,ormal (orm. The creation
of two searate relations for the .anager%Dhild and .anager%&mloyee relationshis
would ut this relation in (ourth ,ormal (orm.
3oyce4Codd Normal "orm #3CN"%
Definition: A relation is in +oyce;2odd 4ormal "orm (+24") if e&ery determinant is a
candidate #ey.
'odd(s Rules
Also called )odd*s "aw a set of 19 rules used to determine if a *+,- can be considered a
relational *+,- (/*+,-). $n 1ED: *r. 0. ". 2odd first published this list of rules that
became a standard way of e&aluating a relational system. The rules ha&e since been e#panded
by others and after publishing the original article 2odd stated that there are no systems that
will satisfy e&ery rule. "ollowing are 2oddKs original 19 rules%
>ften referred to as r*e - this rule states that all subsequent rules are based on the
notion that in order for a database to be considered relational it must use its relational
facilities e#clusi&ely to manage the database.
:. The ,nformation rule* All information in an "D-.+ is
reresented logically in just one way ) by 3alues in tables.
9. The 5*aranteed Access rule* &ach item of data in an
"D-.+ is guaranteed to be logically accessible by resorting to a
combination of table name, rimary #ey 3alue, and column name.
;. The Systematic 'reatment of N*ll 6al*es rule* ,ull
3alues (distinct from an emty character string or a string of blan#
characters and distinct from $ero or any other number! are
suorted in a fully relational D-.+ for reresenting missing
information and inalicable information in a systematic way,
indeendent of the data tye.
1F
<. The Dynamic .nline Catalog 3ased on the
-elational /odel rule* The database descrition is reresented
at the logical le3el in the same way as ordinary data, so that
authori$ed users can aly the same relational language to its
interrogation as they aly to the regular data.
7. The Comprehensi7e Data S*blang*age rule* A
relational system may suort se3eral languages and 3arious
modes of terminal use (for examle, the fill)in)blan#s mode!.
Cowe3er, there must be at least one language whose statements
are exressible, er some well)defined syntax, as character strings
and whose ability to suort all of the following is comrehensible*
data definition, 3iew definition, data maniulation (interacti3e and
by rogram!, integrity constraints, and transaction boundaries
(begin, commit, and rollbac#!.
=. The 6iew 2pdating rule* All 3iews of the data which are
theoretically udatable must be udatable in ractice by the D-.+.
>. The 1igh4le7el ,nsert) 2pdate) and Delete rule* The
caability of handling a base relation or a deri3ed relation as a
single oerand alies not only to the retrie3al of data but also to
the insertion, udate, and deletion of data.
?. The Physical Data ,ndependence rule* Alication
rograms and terminal acti3ities remain logically unimaired
whene3er any changes are made in either storage reresentations
or access methods.
@. The 0ogical Data ,ndependence rule* Alication
rograms and terminal acti3ities remain logically unimaired when
information reser3ing changes of any #ind that theoretically ermit
unimairment are made to the base tables.
:A. The ,ntegrity ,ndependence rule* Integrity constraints
must be definable in the "D-.+ sub)language and stored in the
system catalogue and not within indi3idual alication rograms.
::. The Distrib*tion ,ndependence rule* An "D-.+ has
distribution indeendence. Distribution indeendence imlies that
users should not ha3e to be aware of whether a database is
distributed.
:9. The Nons*b7ersion rule* If the database has any means of
handling a single record at a time, that low)le3el language must not
be able to sub3ert or a3oid the integrity rules which are exressed
in a higher)le3el language that handles multile records at a time.
1A
Data Migration
(1) The process of translating data from one format to another. *ata migration is necessary
when an organization decides to use a new computing systems or database management
system that is incompatible with the current system. Typically data migration is performed
by a set of customized programs or scripts that automatically transfer the data.
()) The process of mo&ing data from one storage de&ice to another. $n this conte#t data
migration is the same as 'ierarchical -torage ,anagement ('-,).
.ierar'hi'a* Storage +anagement (.S+).
-hort for Hierarchical Storage Management, a data storage system that automatically mo&es
data between high;cost and low;cost storage media. '-, systems e#ist because high;speed
storage de&ices such as hard disk dri&es are more e#pensi&e (per byte stored) than slower
de&ices such as optical discs and magnetic tape dri&es. 3hile it would be ideal to ha&e all
data a&ailable on high;speed de&ices all the time this is prohibiti&ely e#pensi&e for many
organizations. $nstead '-, systems store the bulk of the enterprise<s data on slower de&ices
and then copy data to faster disk dri&es when needed. $n effect '-, turns the fast disk
dri&es into caches for the slower mass storage de&ices. The '-, system monitors the way
data is used and makes best guesses as to which data can safely be mo&ed to slower de&ices
and which data should stay on the hard disks.
Data modeling
The analysis of data ob(ects and their relationships to other data ob(ects. *ata modeling is
often the first step in database design and ob(ect;oriented programming as the designers first
create a conceptual model of how data items relate to each other. *ata modeling in&ol&es a
progression from conceptual model to logical model to physical schema.
Domain
(1)A group of computers and de&ices on a network that are administered as a unit with
common rules and procedures. 3ithin the $nternet domains are defined by the +, address.
All de&ices sharing a common part of the $= address are said to be in the same domain.
(2) $n database technology domain refers to the description of an attribute<s allowed &alues.
The physical description is a set of &alues the attribute can ha&e and the semantic or logical
description is the meaning of the attribute.
Data Source Name) / DS$
-hort for Data Sorce Name. *ata -ource 4ame pro&ides connecti&ity to a database through
an >*+2 dri&er. The *-4 contains database name directory database dri&er Iser$*
1D
password and other information. >nce you create a *-4 for a particular database you can
use the *-4 in an application to call information from the database.
There are three types of *-4s%
(1) System DSN ;; can be used by anyone who has access to the machine. *-4 info is stored
in the registry.
()) &ser DSN ;; created for a specific user. Also stored in the registry.
(9) Fi*e DSN ;; *-4 info is stored in a te#t file with .*-4 e#tension.
*-4 is often used by Acti&e -er&er =ages (A-=) and Cisual +asic programs when a query to
a database is necessary to retrie&e information.
There is also what is known as a 6*-4;less connection.6 $nstead of using a *-4 to connect
to a database the de&eloper specifies the necessary information right in the application. 3ith
a *-4;less connection the de&eloper is free to use connection standards other than >*+2
such as >10 *+.
http://www.webopedia.com/Computer_Science/Databases/
1E

S-ar putea să vă placă și