MELJUN CORTES MANUAL DataBase System CSCI12

Embed Size (px)

Citation preview

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    1/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    PRELIM PERIOD

    Lecture no. 1: DATABASE SYSTEMS

    1.1 Introduction to Database Systems

    Database DB!- An integrated collection of related data

    By relateddata we mean tat te data represents logically coerent facts abo!t some

    aspects of te real world tat are re"!ired by an application

    Uni"erse o# discourse or mini$%or&d- #e part of te real world tat a database is

    designed to model witin a comp!ter

    By integratedwe mean tat te data for m!ltiple applications is stored togeter

    and manip!lated in a uniform wayon a secondary storage s!c as a magnetic or an optical

    dis$% #e primary goal of integration is to s!pport information saring across m!ltiple

    applications%

    a Database System consists of &' an application specific database, 2' te (B)S tat

    maintains tat database, and *' te application software tat manip!lates te database

    College of Computer Studies Prepared by: ELJUN P.CORTES1

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    2/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    Database Systems and Database Mana'ement Systems

    A Database Mana'ement System DBMS) is a collection of programs tat controls a

    database% Specifically, it pro+ides !s wit an interface to create, maintain, and manip!late

    m!ltiple databases

    (B)S is a general-p!rpose software system tat we can !se not only to create and

    maintain m!ltiple databases b!t also to implement database systems for different applications as

    well%

    As opposed to a (B)S, wic is general-p!rpose, a database system is de+eloped to

    s!pport te operations of a specific organiation or a specific set of applications%

    T(E DATABASE APPROA)(ES

    .ays of /andling (atabases'

    &% Manua& * man!al manip!lation of data

    E+.)an!al card catalog

    2% )om,uteri-ed electronic data andling

    Traditiona& i&e Processin' System TPS!

    Database Mana'ement System DBMS!

    DBMS "s TPS

    TPS $ application programs directlyfilenames and data definitions are embedded in

    eac program%'

    -data are integrated in a single, sared data file, all application programs tat

    sare te data file m!st be aware of all te data in te file, incl!ding tose data

    items tat tey do not ma$e !se of or need to $now

    - #e problem gets worse wen a new field is added to a data file

    Disad"anta'es o# TPS

    &% 1ncontrolled ed!ndancy

    2% 3nconsistent (ata

    *% 3nfle4ibility

    5% 6imited (ata Saring

    College of Computer Studies Prepared by: ELJUN P.CORTES2

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    3/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    % Poor nforcement of Standards

    9% 6ow Programmer Prod!cti+ity

    7% 4cessi+e Program )aintenance

    DBMS $ stores te str!ct!re of te data as part of te description of te database in te

    system catalog, separately from te application programs

    )/aracteristics o# DBMS

    Data Abstraction

    (B)Ss allow data to be str!ct!red in ways tat ma$e it more !nderstandable and

    meaningf!l to te applications tan te ways data are pysically stored on dis$s% #ey pro+ide

    !sers wit ig-le+el, concept!al

    re+arwwwappscon+ersiontmpscratc;9&ect-oriented (B)Ss, to gi+e two e4amples=wile tey

    ide storage details tat are not of interest to most database !sers%

    program-data independence - te pysical organiation of data can be canged wito!t

    affecting te application programs

    program-operation independence- te implementation of abstract operations can be

    canged wito!t affecting te code of te application programs, - as long as teir calling interface

    stays te same

    Data abstractionand, in partic!lar, data inde,endenceis wat facilitates data saring

    and integration% #is is te main ad+antage of (B)S against #raditional ?ile processing wose

    application programs depend on te low-le+el str!ct!re of te data or storage organiation, eac

    program stores its data in a separate data file

    Re&iabi&ity

    (B)Ss pro+ide ig reliability by &' enforcing integrity constraints and 2' ens!ring data

    consistencydespite ardware or software fail!res%

    College of Computer Studies Prepared by: ELJUN P.CORTES3

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    4/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    Inte'rity constraints reflect te meaning or, te semantics' of te data and of te

    application e4% (ata type'

    Constraints conditions, restrictions

    Data consistencytat is, interr!pted !pdate operations do not corr!pt te database wit

    +al!es tat +iolate te integrity constraints and no data in te database is lost%

    After a fail!re, a (B)S a!tomatically reco+ers, restoring te database to te

    consistent state in wic it e4isted >!st prior to te interr!ption% #is consistent state is

    constr!cted as follows% (!ring reco+ery, a (B)S ro&&s bac0all interr!pted transactions,

    obliterating teir !pdates from te database, and re-e4ec!tes s!ccessf!lly terminated

    transactions as necessary, restoring teir !pdates in te database

    E##iciency

    (B)Ss s!pport bot efficient space !tiliation and efficient access to data% By ma$ing !se of te

    data description in te catalog, (B)Ss are able to minimie data red!ndancy, wic in t!rn sa+es

    botspace,by storing eac data item only once, andprocessing time,by eliminating te need of

    m!ltiple !pdates to $eep te replicas consistent and !p-to-date%

    (B)Ss enance te performance of "!eries by means of optimiations and te !se of access

    metods to data based on teir +al!es% @ptimiations simplify te "!eries so tat tey can e4ec!te

    faster,

    and access metods allow direct access to locations were rele+ant data are stored, in a way

    similar to te access pro+ided by te inde4 in te bac$ of a boo$%

    (B)Ss decrease response time of transactions by allowing m!ltiple !sers to access te

    database conc!rrently

    1. Re&ationa& Databases

    Re&ationa& Database Sc/ema

    A relational database schema is a set of table scemas and a set of integrity constraints%

    3ntegrity constraints can be sorted into two $inds:

    str!ct!ral model-specific' integrity constraints tat are imposed by te model as

    disc!ssed below, and

    semantic application-specific' integrity constraints imposed by te application, s!c as

    te constraint, for e4ample, tat te balance of a sa+ings acco!nt cannot be negati+e%

    College of Computer Studies Prepared by: ELJUN P.CORTES4

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    5/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    2eys $ eys are col!mns wose +al!es are s!fficient to !ni"!ely identify a row

    TYPES O 2EYS

    &% Primary ey !ni"!ely identifies a record

    2% Secondary ey !sed to access a gro!p of records wit common attrib!tes

    *% Alternate ey candidate to be Primary ey

    5% omposite ey composed of two or more col!mns to access a !ni"!e record

    % ?oreign ey - a non- key attributeordinary col!mn ' in one table, b!t a primary $ey

    in anoter%

    - establises associationrelationsips' among tables witin one database

    in a relational database scema'

    DDL Data De#inition Lan'ua'e!

    #e command to create a table in SC6 is te A# #AB6 command% SC6

    s!pports all te basic data types fo!nd in most programming lang!ages: integer, float,

    caracter, and caracter string% SC6 commands are not case sensiti+e%

    A# #AB6 ))B

    )emDo integer5',

    (ri+er6ic integer,

    ?name car&0',

    )3 car,

    6name car&',

    PoneD!mber car&5',

    P3)AY Y )emDo',

    1D3C1 (ri+er6ic'

    'E

    #e primary $ey is specified !sing te P3)AY Y directi+e, alternate $eys !sing te

    UNIQUEdirecti+e

    College of Computer Studies Prepared by: ELJUN P.CORTES5

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    6/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    DML Data Mani,u&ation Lana'ua'e!

    3,date O,erations

    elational ()6 allows !s to insertand deleterows in a table as well as to update te

    +al!es of one or more col!mns in a row%

    3n SC6, only one row can be inserted at a time, by specifying te +al!es of eac col!mn,

    as in te following e4ample:

    3DS# 3D#@ ))B

    VALUES (101, 6876588, 'Susan', W, 'Jones', '4123768888'!"

    #is statement inserts a new row for S!san .% Fones in te ))B table% 3n SC6,

    strings are enclosed witin single "!otes%

    Delete and updatecan be applied to m!ltiple rows tat satisfy a selection condition% 3n SC6, a

    selection condition in a deletion is specified by a ./ cla!se% 3n te simplest case, a row is

    selected by specifying te +al!e of its primary $ey% ?or e4ample, te statement

    (6# ?@) ))B

    ./ )emDo G &02E

    deletes te row wit member n!mber &02 from te ))B table% #e following statement

    canges te middle initial of te member &0& in te ))B table%

    1P(A# )ember

    S# )3 G S

    ./ )emDo G &0&E

    An !pdate operation s!cceeds if it does not +iolate any integrity constraints% ?or e4ample,

    an insert operation will not s!cceed if it attempts to insert a row wose $eys, primary and

    alternate, conflict wit e4isting $eys% #at is, if te row were to be inserted, te property tat $eys

    so!ld be !ni"!e wo!ld be +iolated% @n te oter and, deleting a row ne+er +iolates a $ey

    constraint, !nless te deleted row is referenced by a foreign $ey% 3n tat case, deleting a row

    migt +iolate a referential integrity constraint

    College of Computer Studies Prepared by: ELJUN P.CORTES6

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    7/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    TOOLS OR 43ERIES

    1! 4BE 4uery By E+am,&e!

    C!ery By 4ample CB' is anoter +is!al "!ery lang!age de+eloped by 3B) HIloof,

    &

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    8/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    Se&ection in 4BE

    CB2: etrie+e all members wose first name is Fon%

    ))B N)emDoN (ri+er6icN ?nameN )3N 6nameN AddressN PoneD!mberN

    P% Fon

    By placing P% !nder te table name, tis will retrie+e and display te data in all te

    col!mns%

    CB*: etrie+e te name and member n!mber of all te members wose member

    n!mber is greater tan &00%

    ))B N)emDo N (ri+er6icN ?nameN )3N 6nameN AddressN PoneD!mberN

    O&00 P% P%

    omparison wit constant +al!e in te abo+e e4ample te constant +al!e is &00' is

    placed in te appropriate col!mn% #e res!lting table will a+e te following col!mns:

    es!ltN )emDo N ?name N 6name N

    3n CB, a dis>!nction @' is e4pressed by !sing different e4amples in different rows of

    te s$eleton%

    CB5: etrie+e te name and member n!mber of all te members wose first name is Fon or

    S!san%

    ))B N)emDoN (ri+er6icN ?nameN )3N 6nameN AddressN PoneD!mberN

    P% P%Fon P%

    P% P%S!san P%

    A con>!nction AD(', on te oter and, is e4pressed in te same row%

    CB: etrie+e te name and member n!mber of all te members wose first name is S!san and

    wose member n!mber is greater tan &00%

    College of Computer Studies Prepared by: ELJUN P.CORTES8

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    9/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    ))B N)emDo N (ri+er6icN ?nameN )3N 6nameN AddressN PoneD!mberN

    P%O&00 P%S!san P%

    3f te con>!nction is a condition in+ol+ing a single col!mn, te condition can be specified

    !sing te AD( operator, as in SC6% ?or e4ample, if te )emDo so!ld be greater tan &00 and

    less tan &0, tis is specified !nder te )emDo col!mn as: ;4 O &00 ' AD( ;4 &0 '

    6oin in 4BE

    Foins can be e4pressed by !sing common e4ample +ariables in m!ltiple tables in te

    col!mns to be >oined%

    CB9: 6ist te member n!mber and last name of all te members wo c!rrently a+e a borrowed

    boo$%

    ))B N)emDo N (ri+er6icN ?nameN )3N 6nameN AddressN PoneD!mberN

    P%;>oin P%

    B@@NBoo$;idNallD!mberNditionNBorrower)emDoNBorrow(!e(ateN

    ;>oin

    #o e4press m!ltiple >oins yo! can !se m!ltiple e4ample +ariables at te same time%

    SEAT7OR2:

    &%.at is a elational (atabaseQ

    2%n!merate te different types of eys and gi+e an e4ample

    C13I R &

    Lecture no. : )om,&ete S4L

    .1 S4L

    Str!ct!red C!ery 6ang!age

    SC6 is te de-facto standard "!ery lang!age for relational (B)S%

    College of Computer Studies Prepared by: ELJUN P.CORTES#

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    10/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    - is a compreensi+e lang!age pro+iding statements for bot data definition and data

    manip!lation%

    SC6 ((6 (ata (efinition 6ang!age'

    - Pro+ides basic commands for defining te concept!al scema of a database%

    SC6 Pro+ides * D!meric data types:

    &%' 4act D!mber #ese are integers or wole n!mbers wic maybe positi+e or

    negati+e or ero%

    SC6 S!pport 2 integer types:

    &%' 3nteger 3D#'

    2%' S)A663D#

    2%' Appro4imate n!mber tese are n!mbers tat cannot be represented e4actly, s!c as

    real n!mbers and fractional types%

    *%' ?ormatted D!mber teses are n!mbers stored in decimal notation%

    ?ormatted n!mbers can be defined !sing te ff:

    &%' (ecimal i>'

    2%' ( i>'

    *%' D!meric i>'

    .ere: 3 G is te precision on te total n!mber of digits e4cl!ding decimal point%

    F G is te scale, on te n!mber of fractional digits%

    (efa!lt scale is ero 0'

    Synta+ in creatin' a database name in S4L 4uery ana&y-er

    &%' A# (A#ABAS (A#ABAS DA)O

    1S (A#ABAS DA)O

    2%' A# (A#ABAS DA)O

    @D

    DA) G (A#A ?36 DA) ?36DA) G 6@A#3@D @?%)(?OT'

    *%' A# #AB6 #B6D)O

    ?6(D)O (A#A#YPO6DU#/O' P3)AY Y,

    College of Computer Studies Prepared by: ELJUN P.CORTES10

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    11/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    ?6(D)O (A#A#YPO6DU#/O' D166D@# D166O

    'E

    5%' 3DS# H3D#@J tableO Hcol!mn;list'J

    VA61S data;+al!es'

    %' S6# W ?@) #AB6DA)O

    SPE)II) RELATIO8AL OPERATIO8S

    &%' Pro>ection @peration X'

    - Selects te attrib!tes or an attrib!te list from a table r, wile discarding te +est%

    2%' Selection @peration '

    -

    Selects some rows in attrib!te r tat satisfy a selection condition alias predicate'%

    *%' Foin @peration

    - ombines two tables in one, tere by allowing !s to obtain more information%

    SEAT7OR2:

    &%' .at is SC6 and itZs capabilitiesQ

    2%' reate a (atabase, 3nsert +al!es and +iew te data inserted%

    43I9

    PRELIM E;AMI8ATIO8

    MIDTERM PERIOD

    Lecture no. 1: DATABASE DESI

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    12/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    - tis personnel will increase or may increase prod!cti+ity

    so!ld not minimie s$ills '

    . 8eed to e+,&icit bac0 * u,

    - pro+ide bac$ !p copies of data beca!se :

    a% it is elpf!l in restoring damaged data files

    b% pro+ides +alidity cec$s on cr!cial data

    =. Inter#erence %it/ s/ared data

    - conc!rrent access to sared data +ia se+eral application program

    problems

    a% wen 2 conc!rrent !sers bot want to cange te same or related data

    inacc!rate res!lts can occ!r if access to data is not properly

    syncronied%

    b% .en data are !sed e4cl!si+ely for !pdating, different !sers can obtain

    control of different segments of te database to loc$ !p any !se of

    te data%

    Or'ani-ationa& )on#&ict

    - a sared database re"!ires a consens!s of data definition

    a% conflicts on ow to define data lengt and coding rigts to !pdate

    sared data and associated iss!es%

    TYPES O DATABASE

    1. O,erationa& Database

    - contains b!siness transaction and istory of daily b!siness

    acti+ities

    - !sed to s!pport te on going daily acti+ities of te organiation

    - !se on te #ransaction Processing System 4% !stomers

    orders, p!rcases, acco!nting, sipments and payments

    College of Computer Studies Prepared by: ELJUN P.CORTES12

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    13/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    . Mana'eria& Database

    - !sed by middle managers for planning control, s!mmaries of

    operational database

    - s!mmary of operation

    - !se on )anagement 3nformation System

    =. Strate'ic Database

    - !sed by senior managers to de+elop corporate strategies and see$

    competiti+e ad+antage

    - contains information on competitors to economic factors as well

    as corporate information

    - !sed on (ecision S!pport System

    IRO8ME8T

    College of Computer Studies Prepared by: ELJUN P.CORTES13

    (A#A A()3D3S#A#@S SYS#) (V6@PS D( 1SS

    Application!ser interfaceAS tools

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    14/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    1. )ASE Too&s

    - omp!ter Aided Software ngineering AS ' tools

    - A!tomated tools !sed to design databases and application program

    . Re,ository

    - centralied $nowledge base containing all data definitions, screen

    and report formats and definitions of oter organiations and

    system components containing definitions of data format

    =. DBMS - commercial software system !sed to pro+ide access to te

    database and repository

    ?. Database

    - an integrated collection of data, organied to meet te information

    needs of m!ltiple !sers in an organiation

    - contains occ!rrences of data +al!e itself

    @. A,,&ication Pro'rams

    - comp!ter programs are !sed to create and maintain te database

    and pro+ide information to !sers

    . 3ser Inter#ace

    - lang!ages, men! and oter facilities interacted by te !sers front

    and s!pport

    - !se of men! dri+en system, mo!se and +oice recognition system

    to promote end !ser comp!ting !ser wo are not e4perts, can

    define teir own report, displays and application

    College of Computer Studies Prepared by: ELJUN P.CORTES14

    epository(B)S

    (atabase

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    15/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    . Data Administrators

    - persons wo are responsible for designing databases and for

    de+eloping policies regarding databases sec!rity and integrity

    - tey !se AS tools to impro+e te prod!cti+ity of databases

    planning and design%

    C. System De"e&o,ers

    - persons s!c as system analysts and programmers wo design

    new application programs%

    - #ey !se AS tools for system re"!irement, analysis and

    program design%

    . End 3sers

    - persons tro!g te organiation wo adds, edits, delete and

    recei+e information

    - encoders

    Lecture no. : E8TITY * RELATIO8S(IP MODELS

    2%& Entity * Re&ations/i, mode&s

    E8TITY * RELATIO8S(IP MODELS

    elationsip between two or more entities%

    )ATE

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    16/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    S#1( R )P6@Y R

    4ample of data items tat as - meaningf!l association

    S#1( R S#1(D)

    #ypes of Association

    1. One $ association - means tat at any point in time, a gi+en +al!e of A

    as one and only one +al!e of A, ten te +al!e of B is implicitly $nown% 3mplicitly

    $nown means tat it can be !nderstood to!g not plainly e4pressed% .e represent a

    one association wit a single eaded arrow%

    A B

    4%

    )P6@Y A((SS

    2% )any association - means tat at any point, a gi+en +al!e of A as one or

    many +al!es of B associated wit it% .e represent a many association wit a do!ble

    eaded arrow%

    4% A B

    S#1( R S1BF#S

    M3LTI>AL3ED ATTRIB3TE - occ!rs potentially m!ltiple times for eac item

    of A

    *% onditional Association - wit tis, for a gi+en +al!e of data item A tere

    are two possibilities: eiter tere is no +al!e of data item B or tere is one or

    many ' +al!e s' of data item B% A conditional association is represented by a

    ero recorded on te arrow near te conditional item%

    A B

    4% onditional item

    College of Computer Studies Prepared by: ELJUN P.CORTES16

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    17/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    B( PA#3D#

    A(3DA63#Y - term !sed by te analysts tat is represented by te arrow

    eads and eros on te arrows wic can be to!gt of as a+ing minim!m and

    ma4im!m +al!es%

    Re"erse Association

    3f tere is an association from data item A to data item B, tere is also

    a re+erse association from B to A%

    Ty,es o# Re"erse Association

    &% @ne to one association

    )eans tat at any point in time, eac +al!e of data item A is associated

    wit ero or e4actly one of data item B% on+ersely, eac +al!e of B is associated wit

    one +al!e of A%

    A B

    4%

    S#1( R S#1(D)

    2% @ne to many association

    )eans tat at any point in time, eac +al!e of data item A is

    associated wit ero, one or many +al!es of data item B% /owe+er, eac +al!e

    of B is associated wit e4actly one +al!e of A% #e mapping from B to A issaid to be many - to one, since tere may be many +al!es of B associated wit

    one +al!e of A%

    A B

    4%

    S#1( R MA)

    *% )any - to many association

    )eans tat at any point in time, eac +al!e of data item A is

    associated wit ero, or one or many +al!es of data item B% Also eac +al!e of

    B is associated wit ero, or one or many +al!es of A%

    A B

    4%

    S#1( R @1S

    College of Computer Studies Prepared by: ELJUN P.CORTES17

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    18/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    33% ASS@3A#3@D B#.D @(S

    Sows te relationsip between records%

    rowZs ?oot - !sed to disting!is one and many associations between entities

    and records%

    rowZs ?oot Dotation - !sed to represent te association between records%

    #ypes of Association

    &% @ne Association - no crowZs foot one - to one '

    /1SBAD( S#1(D#

    4%

    .3? UA(

    2% )any Association - represented by a crowZs foot

    )P6@Y S#1(D#

    4%

    BD?33AY @1S

    DATA MODELS

    epresentation of te data abo!t entities, e+ents, acti+ities and teir associations witin

    te organiations%

    )ATE

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    19/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    properties and str!ct!res and andling ob>ect of different types images, +oice print, as

    well as te4t and data ' are incl!ded in te S() and oter semantically ric data models%

    II. RELATIO8AL DATA MODEL

    #e relational data model !ses te concept of a relation to represent wat we a+e

    pre+io!sly called a file tat is a relation represents an entity class% A relation is +iewed

    as a two dimensional table%

    #e coice of many database b!ilders and !sers is te relational data model% 3t is

    different from oter models not only from te arcitect!re b!t also in te following ways

    :

    1. Im,&ementation Inde,endence - it logically represents all relationsips implicitly

    and ence, one does not $now wat associations are or not pysically represented by an

    efficient metod% elational sares tis property wit (%

    . Termino&o'y - it !ses its own terminology, most of wic as e"!i+alent terms in

    oter data models%

    =. Lo'ica& 2ey Pointers - it !ses primary and secondary $eys in records to represent

    te association between 2 records, wereas ( !ses arc between entity bo4es%

    ?. 8orma&i-ation T/eory - properties of database tat ma$e it free of certain

    maintenance problems a+e been de+eloped witin te conte4t of te relational data

    model alto!g tis properties can also be designed into an ( or a networ$ data

    model '%

    College of Computer Studies Prepared by: ELJUN P.CORTES1#

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    20/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    @. (i'/ Le"e& Pro'rammin' Lan'ua'es - P% 6% a+e been de+eloped specifically to

    access database defined +ia te relational data modelE tese lang!ages permit data to be

    manip!lated as gro!ps of files tan proced!rally one record at a time%

    III. (IERAR)(I)AL DATA MODEL

    @rganiations are !s!ally +iewed as a ierarcy oppositions and a!tority% omp!ter

    programs can be +iewed as ierarcy of control and operating mod!lesE and +ario!s

    ta4onomies of animals and plants +iew elements in a ierarcical sets of relationsip%

    #e ierarcical data model represents data as a set of nested one to many relationsips,

    te ierarcical data model is !sed e4cl!si+ely wit ierarcical database management

    systemsE since s!c systems are in general, being pased o!t%

    I>. 8ET7OR2 DATA MODEL

    #e networ$ data model permits as m!c or as little str!ct!re as is desired% .e can

    e+en create a ierarcy a special of a networ$ ' if tat is wat is needed% As te

    ierarcical data model, if a certain relationsip is not e4plicitly incl!ded in te database

    definition, ten it cannot be !sed by a (B)S in processing a database%

    >. E8TITY RELATIO8S(IP DATA MODEL ER * DIAects

    called entities and relationsips among entities ob>ects% 3t is a grapical notation tat

    !ses special symbols to indicate relationsip among entities intended primarily for te

    database design process%

    Basic Symbo&s

    ntity

    elationsip

    (ata 3tem

    Stands for is aT

    Primary ey

    lass - s!b - class

    College of Computer Studies Prepared by: ELJUN P.CORTES20

    3SA

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    21/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    De'ree

    #e n!mber of entities tat participate in a relationsip%

    Most Ty,ica& De'rees #or Re&ations/i,

    1. 3nary Re&ations/i, - relationsip between instances of te

    entity class%

    4%

    . Binary Re&ations/i, - relationsip between instances of

    two entity classes%

    4%

    =. Ternary Re&ations/i, - relationsip among instances of tree

    entity classes%

    4%

    College of Computer Studies Prepared by: ELJUN P.CORTES21

    )P6@Y

    PS@D

    PAD# /36(

    1S#@) @(

    P@(1# VD(@

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    22/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    SEAT7OR2:

    &%' Ui+e two e4amples !sing 1nary, Binary and #ernary elationsips

    43I9 =

    8orma&i-in' a Database

    8orma&i-ation

    - is a process of red!cing red!ndancies of data in a database%

    - is a tecni"!e tat is !sed wen designing and redesigning a database%

    - is a process or set of g!idelines !sed to optimally design a database to red!ce red!ndant data%

    T/e Ra% Database

    A database tat is not normalied may incl!de data tat is contained in one or more different

    tables for no apparent reason% #is co!ld be bad for sec!rity reasons, dis$ space !sage, speed of

    "!eries, efficiency of database !pdates, and, maybe most importantly, data integrity% A database

    before normaliation is one tat as not been bro$en down logically into smaller, more

    manageable tables%

    @)PADY;(A#ABAS

    mp;id c!st;id

    6ast;name c!st;name

    ?irst;name c!st;address

    )iddle;name c!st;city

    Address c!st;state

    ity c!st;ip

    State c!st;pone

    Iip c!st;fa4

    Pone ord;n!m

    Pager "ty

    College of Computer Studies Prepared by: ELJUN P.CORTES22

    .A/@1S

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    23/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    Position ord;date

    (ate;ire prod;id

    Lo'ica& Database Desi'n

    Any database so!ld be designed wit te end !ser in mind% 6ogical database design, also

    referred to as te logical model, is te process of arranging data into logical, organied gro!ps of

    ob>ects tat can easily be maintained% #e logical design of a database so!ld red!ce data

    repetition or go so far as to completely eliminate it% After all, wy store te same data twiceQ

    Daming con+entions !sed in a database so!ld also be standard and logical%

    7/at are t/e End 3serFs 8eedsG

    #e needs of te end !ser so!ld be one of te top considerations wen designing a database%

    emember tat te end !ser is te person wo !ltimately !ses te database% #ere so!ld be ease

    of !se tro!g te !serZs front-end tool a client program tat allows a !ser access to a database',

    b!t tis, along wit optimal performance, cannot be acie+ed if te !serZs needs are not ta$en into

    consideration%

    Some !ser-related design considerations incl!de te following:

    .at data so!ld be stored in te databaseQ

    /ow will te !ser access te databaseQ

    .at pri+ileges does te !ser re"!ireQ

    /ow so!ld te data be gro!ped in te databaseQ

    .at data is te most commonly accessedQ

    /ow is all data related in te databaseQ

    .at meas!res so!ld be ta$en to ens!re acc!rate dataQ

    College of Computer Studies Prepared by: ELJUN P.CORTES23

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    24/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    Data redundancy

    (ata so!ld not be red!ndant, wic means tat te d!plication of data so!ld be $ept to a

    minim!m for se+eral reasons% ?or e4ample, it is !nnecessary to store an employeeZs ome

    address in more tan one table% .it d!plicate data, !nnecessary space is !sed% onf!sion is

    always a treat wen, for instance, an address for an employee in one table does not matc te

    address of te same employee in anoter table%

    .ic table is correctQ (o yo! a+e doc!mentation to +erify te employeeZs c!rrent addressQ As

    if data management were not diffic!lt eno!g, red!ndancy of data co!ld pro+e to be a disaster%

    T/e 8orma& orms

    Dormal form is a way of meas!ring te le+els or dept, to wic a database as been

    normalied% A databaseZs le+el of normaliation is determined by te normal form%

    #e following are te tree most common normal forms in te normaliation process :

    #e first normal form

    #e second normal form

    #e tird normal form

    @f te tree normal forms, eac s!bse"!ent normal form depends on normaliation steps

    ta$en in te pre+io!s normal form% ?or e4ample, to normalie a database !sing te

    second normal form, te database m!st first be in te first normal form%

    T/e irst 8orma& orm

    #e ob>ecti+e of te first normal form is to di+ide te base data into logical !nits called

    tables% .en eac table as been designed, a primary $ey is assigned to most or all

    tables%

    @)PADY ; (A#ABAS

    )P6@Y ; #B6 1S#@) ; #B6emp;id emp;id c!st;id c!st;id

    last;name last;name c!st;name c!st;name

    first;name first;name c!st;address c!st;address

    middle;name middle;name c!st;city c!st;city

    address address c!st;state c!st;state

    College of Computer Studies Prepared by: ELJUN P.CORTES24

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    25/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    city city c!st;ip c!st;ip

    state state c!st;pone c!st;pone

    ip ip c!st;fa4 c!st;fa4

    pone pone ord;n!m ord;n!m

    pager pager "ty "typosition position ord;date ord;date

    position;desc postion;desc

    date;ire date;ire prod;id

    pay;rate pay;rate prod;desc P@(1#S;#B6

    bon!s bon!s cost prod;id

    date;last;raise date;last;raise prod;desc

    cost

    Yo! can see tat to acie+e te first normal form, data ad to be bro$en into logical

    !nits of related information, eac a+ing a primary $ey and ens!ring tat tere are no

    repeated gro!ps in any of te tables% 3nstead of te large table, tere are now smaller,

    more manageable tables: )P6@Y;#B6, 1S#@);#B6 and P@(1#S;#B6%

    #e primary $eys are normally te first col!mns listed in a table, in tis case: )P;3(

    and P@(;3(%

    T/e Second 8orma& orm

    #e ob>ecti+e of te second normal form is to ta$e data tat is only partly dependent on

    te primary $ey and enter tat data into anoter table%

    )P6@Y;#B6 )P6@Y;#B6emp;id emp;id

    last;name last;name

    first;name first;name

    middle;name middle;nameaddress address

    city city

    state state )P6@Y;PAY;#B6

    ip ip emp;id

    pone pone position

    pager pager position;desc

    position

    position;desc date;ire

    date;ire pay;rate

    pay;rate bon!s

    bon!s date;last;raise

    date;last;raise

    College of Computer Studies Prepared by: ELJUN P.CORTES25

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    26/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    1S#@);#B6

    1S#@);#B6 c!st;idc!st;id c!st;name

    c!st;name c!st;address

    c!st;address c!st;city

    c!st;city c!st;state

    c!st;state c!st;ip

    c!st;ip c!st;pone

    c!st;pone c!st;fa4

    c!st;fa4

    @(S;#B6

    ord;n!m

    prod;id ord;n!m

    "ty prod;idord;date "ty ord;date

    ?3S# D@)A6 ?@) S@D( D@)A6 ?@)

    According to te fig!re, te second normal form is deri+ed from te first normal form

    by f!rter brea$ing two tables down into more specific !nits%

    )P6@Y;#B6 split into two tables called )P6@Y-#B6 and

    )P6@Y;PAY;#B6% Personal employee information is dependent on te primary $ey

    )P;3( ', so tat te information remained in te )P6@Y;#B6 )P;3(,

    6AS#;DA), ?3S#;DA), )3((6;DA), A((SS, 3#Y, S#A#, I3P,

    P/@D and PAU% @n te oter and, te information tat is only partly dependent

    on te )P;3( eac indi+id!al employee ' is !sed to pop!late )P6@Y;PAY;#B6

    )P;3(, P@S3#3@D, P@S3#3@D;(S, (A#;/3, PAY;A# and

    (A#;6AS#;A3S '% Dotice tat bot tables contain te col!mn )P;3(% #is is te

    primary $ey of eac table and is !sed to matc corresponding data between te two

    tables%

    1S#@);#B6 split into two tables called 1S#@);#B6 and @(S;#B6%

    .at too$ place is similar to wat occ!rred in te )P6@Y;#B6% ol!mns tat

    were partly dependent on te primary $ey were directed to anoter table% #e order

    information for a c!stomer is dependent on eac 1S#;3(, b!t does not directly depend

    on te general c!stomer information in te original table%

    College of Computer Studies Prepared by: ELJUN P.CORTES26

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    27/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    T/e T/ird 8orma& orm

    #e tird normal formZs ob>ecti+e is to remo+e data in a table tat is not dependent on

    te primary $ey%

    Anoter table was created to display te !se of te tird normal form%

    )P6@Y;PAY;#B6 is split into two tables, one table containing te act!al employee

    pay information and te oter containing te position descriptions, wic really do not

    need to reside in )P6@Y-PAY;#B6% #e P@S3#3@D;(S col!mn is totally

    independent of te primary $ey, )P;3(%

    )P6@Y;PAY;#B6

    emp;id

    position

    position;desc

    date;ire

    pay;rate

    bon!s

    date;last;raise

    )P6@Y;PAY;#B6

    emp;id P@S3#3@DS;#B6

    position position

    date;ire position-desc

    pay;rate

    bon!s

    date;last;raise

    Bene#its o# 8orma&i-ation

    Dormaliation pro+ides n!mero!s benefits to a database% Some of te ma>or benefits

    incl!de te following :

    - Ureater o+erall database organiation

    - ed!ction of red!ndant data

    - (ata consistency witin te database design

    College of Computer Studies Prepared by: ELJUN P.CORTES27

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    28/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    - A m!c more fle4ible database design

    - A better andle on database sec!rity

    %

    Dra%bac0s o# 8orma&i-ation

    Alto!g most s!ccessf!l databases are normalied to some degree, tere is one

    s!bstantial drawbac$ of a normalied database: red!ced database performance% #e

    acceptance of red!ced performance re"!ires te $nowledge tat wen a "!ery or

    transaction re"!est is sent to te database, tere are factors in+ol+ed, s!c as P1 !sage,

    memory !sage and inp!to!tp!t 3@'% #o ma$e a long story sort, a normalied database

    re"!ires m!c more P1, memory and 3@ to process transactions and database "!eries

    tan does a de-normalied database% A normalied database m!st locate te re"!ested

    tables and ten >oin te data from te tables to eiter get te re"!ested information or to

    process te desired data% A more in-dept disc!ssion concerning database performance

    occ!rs in /o!r &8, )anaging (atabase 1sers%

    43I9 ?

    MIDTERM E;AMI8ATIO8

    I8ALS PERIOD

    College of Computer Studies Prepared by: ELJUN P.CORTES28

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    29/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    Lecture no. 1: TRA8SA)TIO8 MA8A

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    30/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    (atabase and System atalog

    i'ure 1

    T/e DBMS Transaction Subsystem

    1. )oncurrency )ontro&

    )oncurrency )ontro& * te processof managing sim!ltaneo!s operations on tedatabase wito!t a+ing tem interfere wit one anoter%

    Ma5or ob5ecti"e in de"e&o,in' a database

    3s to enable many !sers to access sared data conc!rrentlyT

    T/ree e+am,&es o# ,otentia& ,rob&ems caused by concurrency:

    &%' T/e Lost 3,date Prob&em an apparently s!ccessf!lly completed !pdate

    operations by one !ser can be o+erridden by anoter !ser%

    2%' T/e 3ncommitted De,endency Prob&em occ!rs wen one transaction is

    allowed to see te intermediate res!lts of anoter transaction before it ascommitted%

    *%' T/e Inconsistent Ana&ysis Prob&em occ!rs wen a transaction !pdates some of

    tem !sing te e4ec!tion of te first%

    1.= Database Reco"ery

    Database Reco"ery te process of restoring te database to a correct state in te e+entof a fail!re%

    our di##erent ty,es o# media %it/ an increasin' de'ree #or re&iabi&ity:

    &%' Main Memory is +olatile storage tat !s!ally does not s!r+i+e system crases%

    2%' Ma'netic Dis0s pro+ide online non-+olatile storage% ompared wit main

    memory, dis$s are more reliable and m!c ceaper, b!t slower by tree to fo!r

    order of magnit!de%

    College of Computer Studies Prepared by: ELJUN P.CORTES30

    Access )anager

    Systems )anager

    ?ile )anager

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    31/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    *%' Ma'netic Ta,e is an offline non-+olatile storage medi!m, wic is far morereliable tan dis$ and fairly ine4pensi+e, b!t slower, pro+iding only se"!ential

    access%

    5%' O,tica& Dis0s is more reliable tan tape, generally ceaper, faster, pro+idingrandom access%

    Additiona& acts:

    - Main memoryis also calledPrimary Storage%- Dis0s and ta,eare $nown as Secondary Storage%

    - Stab&e stora'erepresents information tat as been replicated in se+eral

    non-+olatile storage media !s!ally dis$' wit independent fail!re modes%

    Amon' t/e causes o# #ai&ure are:

    &%' System cras/es d!e to ardware or software errors, res!lting in loss of main

    memory%

    2%' Media #ai&ures s!c as ead crases or !nreadable media, res!lting in te lossof parts of secondary storage%

    *%' A,,&ication so#t%are errors s!c as logical errors in te program tat isaccessing te database, wic ca!se one or more transaction to fail%

    5%' 8atura& ,/ysica& disasters s!c as fire, floods, eart"!a$es, or power fail!res%

    %' Sabota'e or can be called as intentional corr!ption or destr!ction of data,

    ardware or software facilities%

    T%o Princi,a& E##ects t/at %e need to consider:

    &%' #e loss of main memory, incl!ding te database b!ffers%

    2%' #e loss of te dis$ copy of te database%

    A DBMS s/ou&d ,ro"ide t/e #o&&o%in' #aci&ities to assist %it/ reco"ery:

    A bac$!p mecanism, wic ma$es periodic bac$!p copies of te database%

    6ogging facilities, wic $eep trac$ of te c!rrent state of transactions anddatabase canges%

    A cec$point facility, wic enables !pdates to te database tat are in progress

    to be made permanent%

    College of Computer Studies Prepared by: ELJUN P.CORTES31

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    32/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    A reco+ery manager, wic allows te system to restore te database to a

    consistent state following a fail!re%

    Lo' i&e

    #o $eep trac$ of database transactions, te (B)S maintains a special file called a log

    or >o!rnal' tat contains information abo!t all !pdates to te database%

    T/e &o' may contain t/e #o&&o%in' data:

    &%' Transaction Records, containing:

    #ransaction identifier%

    #ype of log record%

    3dentifier of data item affected by te database action%

    .! )/ec0,oint records

    )/ec0,oint * te point of syncroniation between te database and tetransaction log file% All b!ffers are force-written to secondary storage%

    )/ec0,oint are sc/edu&ed at ,redetermined inter"a&s and in"o&"e t/e #o&&o%in'

    o,erations:

    .riting all log records in main memory to secondary storage%

    .riting te modified bloc$s in te database b!ffers to secondary storage%

    .riting a cec$point record to te log file% #is record contains te identifiers ofall transactions tat are acti+e at te time of te cec$point%

    Reco"ery Tec/niHues

    &%' Reco"ery tec/niHues usin' de#erred u,date

    .en a transaction starts, write a transaction startrecord to te log%

    .en any write operation is performed, write a log record containing all te data

    specified pre+io!sly e4cl!ding te before-image of te !pdate'% (o not act!allywrite te !pdate to te database b!ffers or te database itself%

    College of Computer Studies Prepared by: ELJUN P.CORTES32

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    33/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    .en a transaction is abo!t to commit, write a transaction commit log record,

    write all te log records for te transaction to dis$ and ten commit tetransaction% 1se te log records to perform te act!al !pdates to te database%

    3f a transaction aborts, ignore te log records for te transaction and do notperform te writes%

    Any transaction wit transaction startand transaction commitlog records so!ld

    be redone%

    ?or any transactions wit transaction startand transaction abortlog records, we

    do noting, since no act!al writing was done to te database, so tese transactions

    do not a+e to be !ndone%

    2%' Reco"ery tec/niHues usin' immediate u,date

    .en a transaction starts, write a transaction startrecord to te log%

    .en a write operation is performed, write a record containing te necessary

    data to te log file%

    @nce te log record is written, write te !pdate to te database b!ffers%

    #e !pdates to te database itself are written wen te b!ffers are ne4t fl!sed

    to secondary storage%

    .en a transaction commits, write a transaction committo te log%

    Lecture no. : IMPRO>I8< 43ERY PERORMA8)E

    .1 (as/ i&es

    (as/ #unction * calc!lates te address of te page in wic te record is to be stored

    based on one or more of te fields in te record%

    (as/ #ie&d is also called as base field%

    (as/ 0ey if te field is also a $ey field of te file%

    )o&&ision wen te same address is generated for two or more records%

    College of Computer Studies Prepared by: ELJUN P.CORTES33

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    34/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    T/ere are se"era& tec/niHues t/at can be used to mana'e co&&isions:

    &%' @pen addressing

    2%' 1ncained o+erflow*%' ained o+erflow

    5%' )!ltiple asing

    . Inde+es

    Inde+es * a data str!ct!re tat allows te (B)S to locate partic!lar records in a file

    more "!ic$ly, and tereby speed response to !ser "!eries%

    Data #i&e te file containing te logical records%

    Inde+ #i&e te file containing te inde4 records%

    Primary inde+ if te data file is se"!entially ordered, and te inde4ing

    field is a $ey field of te file, it is g!aranteed to a+e a !ni"!e +al!e in

    eac record%

    )&usterin' inde+ if te inde4ing is not a $ey field of te file, so tat

    tere can be more tan one record corresponding to a +al!e of te

    inde4ing field%

    Secondary inde+ an inde4 tat is defined on a non-ordering field of te

    data file%

    Inde+ed seHuentia& #i&e a sorted data file wit a primary inde4%

    An 3nde4ed se"!ential file is a more +ersatile str!ct!re, wic normally as:

    A primary storage area%

    A separate inde4 or inde4es%

    An o+erflow area%

    SEAT7OR2:

    &%' (efine #ransaction

    2%' Ui+e oter (atabase reco+ery tecni"!es

    43I9 @

    Lecture no. =: DATA 7ARE(O3SI8ect-oriented, integrated, time-+ariant, and non-+olatile

    College of Computer Studies Prepared by: ELJUN P.CORTES34

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    35/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    collection of data in s!pport of managementZs decision-ma$ing process%

    Bene#its o# Data 7are/ousin'

    Potential ig ret!rns on in+estment ompetiti+e ad+antage

    3ncreased prod!cti+ity of corporate decision-ma$ers

    Prob&ems o# Data 7are/ousin'

    1nderestimation of reso!rces for data loading

    /idden problems wit so!rce systems

    e"!ired data not capt!red

    3ncreased end-!ser demands

    (ata omogeniation /ig demand for reso!rces

    (ata ownersip

    /ig maintenance

    6ong d!ration pro>ects

    omple4ity of integration

    T/e Ma5or com,onents o# a Data 7are/ouse

    1. O,erationa& Data

    T/e source o# data #or t/e data %are/ouse is su,,&ied #rom:

    )ainframe operational eld in first generation ierarcical and networ$

    databases%

    (epartmental data eld in propriety file systems s!c as VSA), )S, and

    relational (B)S s!c as 3nformi4, @racle%

    Pri+ate data eld on wor$stations and pri+ate ser+ers%

    4ternal systems s!c as te 3nternet, commercially a+ailable databases, or

    databases associated wit an organiationZs s!pplier or c!stomers%

    2% Load Mana'er also called tefront-endcomponent' performs all te

    operations associated wit te e4traction and loading of data into te wareo!se%

    *% 7are/ouse Mana'er performs all te operations associated wit te

    management of te data in te wareo!se%

    5% 4uery Mana'er - also called te back-endcomponent' performs all te

    operations associated wit te management wit te management of !ser "!eries%

    % End$user access too&s is to pro+ide information to b!siness !sers for strategicdecision ma$ing%

    )an be cate'ori-ed into #i"e main 'rou,s:

    College of Computer Studies Prepared by: ELJUN P.CORTES35

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    36/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    eporting and "!ery tools%

    Application de+elopment tools%

    4ec!ti+e information system 3S' tools%

    @nline analytical processing @6AP' tools%

    (ata mining tools%

    *%2 On&ine Ana&ytica& Processin' OLAP! te dynamic syntesis, analysis, andconsolidation of large +ol!mes of m!lti-dimensional data%

    Ru&es #or OLAP Systems

    )!lti-dimensional concept!al +iew

    #ransparency

    Accessibility

    onsistent reporting performance lient-ser+er arcitect!re

    Ueneric dimensionality

    (ynamic sparse matri4 andling

    )!lti-!ser s!pport

    1nrestricted cross-dimensional operations

    3nt!iti+e data manip!lation

    ?le4ible reporting

    1nlimited dimensions and aggregations

    )ate'ories o# OLAP Too&s

    1. Mu&ti$dimensiona& OPLAP MOLAP or MD-OPLAP! !se specialieddata str!ct!res and )!lti-dimensional (atabase )anagement

    )((B)Ss' to organie, na+igate, and analye data%

    . Re&ationa& OPLAP ROLAP! is te fastest-growing style of @6AP

    tecnology% @6AP s!pports (B)S prod!cts tro!g te !se of a

    meta-data layer, t!s a+oiding te re"!irement to create a static m!lti-

    dimensional data str!ct!re%

    =. Mana'ed 4uery En"ironment (MQE

    ) tey pro+ide limited analysis

    capability, eiter directly against (B)S prod!cts, or by !sing anintermediate )@6AP ser+er%

    =.= Data Minin'

    Data Minin' te process of e4tracting +alid, pre+io!sly !n$nown, compreensible, and

    actionable information from large databases !sing it to ma$e cr!cial b!siness decisions%

    our Main O,erations Associated %it/ Data Minin' Tec/niHues:

    &% Predicti+e modeling *% 6in$ analysis

    2% (atabase segmentation 5% (e+iation detection

    College of Computer Studies Prepared by: ELJUN P.CORTES36

  • 8/13/2019 MELJUN CORTES MANUAL DataBase System CSCI12

    37/37

    CSCI12 Instructional Manual

    2nd trimester, SY 2007-2008Prepared by: ELJUN P. CORTES

    43I9

    I8AL E;AMI8ATIO8