2.3 Database Management Systems

Embed Size (px)

Citation preview

  • 8/17/2019 2.3 Database Management Systems

    1/16

    MBA

    INFORMATION SYSTEMS

    DATABASE MANAGEMENT SYSTEMS

    Assignment

    Enrolment number: MBISMCT13!11"

    Sel# De$l%r%tion

    I declare that the assignment submitted by me is not a verbatim/photo static

    copy from the website/books/journals/manuscripts.

    Signature of the student

    Signature of the faculty concerned

    &'1 Mention t(e )ros %n* $ons o# rel%tion%l mo*el' Bring out t(e

    re%sons+ ,(- rel%tion%l mo*el be$%me more )o)ul%r'

    Ans,er:

  • 8/17/2019 2.3 Database Management Systems

    2/16

    MBA

    I!"#MA$I" S%S$&MS

    DATABASE MANAGEMENTSYSTEMS

    &nrolment number'MBISMCT13!11"

    T(e rel%tion%l mo*el  for database management is a database model

    based on (rst)order predicate logic* (rst formulated and proposed in +,-, by

    &dgar !. odd. In the relational model of a database* all data is represented

    in terms of tuples* grouped into relations.

    T(e )ur)ose o# t(e rel%tion%l mo*el is to provide a declarative method

    for specifying data and ueries. 0sers directly state what information the

    database contains and what information they want from it* and let the

    database management system software take care of describing data

    structures for storing the data and retrieval procedures for answeringueries.

    May 12+3 4age ! of 1.

  • 8/17/2019 2.3 Database Management Systems

    3/16

    MBA

    I!"#MA$I" S%S$&MS

    DATABASE MANAGEMENTSYSTEMS

    &nrolment number'MBISMCT13!11"

    S%m)le Rel%tion%l Mo*el

    A rel%tion%l *%t%b%se  is a collection of data items organi5ed as a set of 

    formally described tables from which data can be accessed easily. A

    relational database is created using the relational model. $he software used

    in a relational database is called a relational database management system

    6#7BMS8. A relational database is the predominant choice in storing data*over other models like the hierarchical database model or the network

    model.

    S%m)le Rel%tion%l *%t%b%se stru$ture

    May 12+3 4age 3 of 1.

  • 8/17/2019 2.3 Database Management Systems

    4/16

    MBA

    I!"#MA$I" S%S$&MS

    DATABASE MANAGEMENTSYSTEMS

    &nrolment number'MBISMCT13!11"

    C(%r%$teristi$s o# Rel%tion%l D%t%b%se:

    7ata in the relational database must be represented in tables* with

    values in columns within rows.

    7ata within a column must be accessible by specifying the table name*

    the column name* and the value of the primary key of the row.

     $he 7BMS must support missing and inapplicable information in a

    systematic way* distinct from regular values and independent of data

    type.

     $he 7BMS must support an active on)line catalogue.

     $he 7BMS must support at least one language that can be used

    independently and from within programs* and supports data de(nition

    operations* data manipulation* constraints* and transaction

    management.

    9iews must be updatable by the system.

     $he 7BMS must support insert* update* and delete operations on sets.

     $he 7BMS must support logical data independence.

     $he 7BMS must support physical data independence.

    Integrity constraints must be stored within the catalogue* separate

    from the application.

    May 12+3 4age / of 1.

  • 8/17/2019 2.3 Database Management Systems

    5/16

    MBA

    I!"#MA$I" S%S$&MS

    DATABASE MANAGEMENTSYSTEMS

    &nrolment number'MBISMCT13!11"

     $he 7BMS must support distribution independence. $he e:isting

    application should run when the e:isting data is redistributed or when

    the 7BMS is redistributed.

    If the 7BMS provides a low level interface 6row at a time8* that

    interface cannot bypass the integrity constraints.

    C(%r%$teristi$s o# rel%tion%l mo*el:

     $he one)to)many 6+'M8 relationship is not easily implemented in therelational model by putting the foreign key of the ;+; side in the table

    of the ;many; side as a primary key

    t contain any character or symbol intended for

    mathematical manipulation

    In a relational model* if A determines B* * and 7* we can>t write A ? B*

    * 7.

    May 12+3 4age 0 of 1.

  • 8/17/2019 2.3 Database Management Systems

    6/16

    MBA

    I!"#MA$I" S%S$&MS

    DATABASE MANAGEMENTSYSTEMS

    &nrolment number'MBISMCT13!11"

     $he idea of determination is not uniue to the database environment.

    A foreign key need not e:ist in both tables that have a relationship.

    Because the relational model uses attribute values to establish

    relationships among tables* many database users wrongly assume that

    the term relation refers to such relationships.

     $he 7I9I7& operation uses one single)column table 6e.g.* column ;a;8

    as the divisor and one two)column table 6e.g.* columns ;a; and ;b;8 as

    the dividend.

    As rare as +'+ relationships should be* certain conditions absolutely

    reuire their use.

    A left outer join on tables 0S$"M and A@&$ yields all of the rows

    in the 0S$"M table* including those that do not have a matching

    value in the A@&$ table.

    urrent relational database software generally provides only a system

    catalog 6and not a data dictionary8.

    7epending on the sophistication of the application development

    software* nulls can create problems when functions such as "0$*

    A9A@&* and S0M are used.

     $he order of the rows and columns is not important to the 7BMS.

    In a natural join* the column on which the join was made doesn>t occur

    twice in the new table.

    If the attribute 6B8 is functionally dependent on a composite key 6A8 but

    not on any subset of that composite key* the attribute 6B8 is fully

    functionally dependent on 6A8.

    A data dictionary is sometimes described as ;the database designers

    database; because it records the design decisions about tables and

    their structures.

    May 12+3 4age . of 1.

  • 8/17/2019 2.3 Database Management Systems

    7/16

    MBA

    I!"#MA$I" S%S$&MS

    DATABASE MANAGEMENTSYSTEMS

    &nrolment number'MBISMCT13!11"

    #eferential and entity integrity are not the two names for the same

    thing.

     $he practical signi(cance of taking the logical view of a database is

    that it serves as a reminder of the simple (le concept of data storage.

     $ables must have the same attribute characteristics 6the columns and

    domains must be compatible8 to be used in a 0I".

    "nly a single attribute can de(ne functional dependence.

     $here is a good reason to use null values in a database.

     $he S&&$ operator won>t yield a vertical subset of a table.

    A data dictionary contains metadataCdata about data.

    &ach table in a relational database must have a primary key.

    ROS o# RDBMS:

    !le:ible and well)established.

    Sound theoretical foundation and use over many years has resulted in

    stable* standardi5ed products available.

    Standard data access language through SD.

    osts and risks associated with large development e=orts and with

    large databases are well understood.

     $he fundamental structure* i.e.* a table* is easily understood and the

    design and normali5ation process is well de(ned.

    7ata entry* updates and deletions will be eEcient.

    May 12+3 4age  of 1.

  • 8/17/2019 2.3 Database Management Systems

    8/16

    MBA

    I!"#MA$I" S%S$&MS

    DATABASE MANAGEMENTSYSTEMS

    &nrolment number'MBISMCT13!11"

    7ata retrieval* summari5ation and reporting will also be eEcient.

    Since the database follows a well)formulated model* it behaves

    predictably.

    Since much of the information is stored in the database rather than in

    the application* the database is somewhat self)documenting.

    hanges to the database schema are easy to make.

    CONS o# RDBMS:

    4erformance problems associated with re)assembling simple data

    structures into their more complicated real)world representations.

    ack of support for comple: base types* e.g.* drawings.

    SD is limited when accessing comple: data.

    Fnowledge of the database structure is reuired to create ad hoc

    ueries.

    ocking mechanisms de(ned by #7BMSs do not allow design

    transactions to be supported* e.g.* the ;check in; and ;check out; type

    of feature that would allow an engineer to modify a drawing over thecourse of several working days.

    2(- rel%tion%l mo*el be$%me more )o)ul%r

    May 12+3 4age 4 of 1.

  • 8/17/2019 2.3 Database Management Systems

    9/16

    MBA

    I!"#MA$I" S%S$&MS

    DATABASE MANAGEMENTSYSTEMS

    &nrolment number'MBISMCT13!11"

     $he reasons why relational database model became more popular than other

    database models can be summarised as below.

    4ortability' #elational model uses SD which is well standardi5ed and is

    largely the same across di=erent database vendors

    &ase of data access in #elational model' SD allows to build very

    sophisticated ueries understood by any 7B professional who knows

    SD

    #elational model was based on strong mathematical background.

    Basic structure of the relation is simple* easy to understand and

    implement.

    #elational model is the easiest to store and retrieve data* primarily

    because SD has been designed around it.

     

    Its standard* the products are matured* debugged* full)featured*

    theres a choice of vendors* theres support* theres a trained

    workforce.

    &'/5Re*un*%n$- o# *%t% is m%n- times bene6$i%l5 7usti#- t(e

    st%tement' Also *es$ribe t(e situ%tion ,(en re*un*%n$- ,ill mess

    u) t(e $urrent *%t% b%se st%tus %n* %t t(%t inst%n$e o# time ,(%t

    %$tions -ou ,ill )re#er to t%8e'

    Ans,er:

    7ata redundancy is a term used about databases and means simply that

    some data (elds appear more than once in the database. 7ata redundancy is

    wasteful and ineEcient for several reasons and database designers attempt

    May 12+3 4age " of 1.

  • 8/17/2019 2.3 Database Management Systems

    10/16

    MBA

    I!"#MA$I" S%S$&MS

    DATABASE MANAGEMENTSYSTEMS

    &nrolment number'MBISMCT13!11"

    to eliminate it as far as possible by using a techniue called data

    normali5ation.

    7ata can appear multiple times in a database for a variety of reasons*

    depending on the type of organi5ation of business that the database is

    designed to serve. !or e:ample* an online business may have the same

    customer>s name appearing several times if that customer has bought

    several di=erent products at di=erent times.

     $his redundancy gives rise to problems for the I$ department responsible for

    maintaining the database because they must update that customer>s details

    in numerous di=erent locations. It also means that much storage capacity is

    wasted* storing the same data multiple times. s name are not updated then the database will

    contain inconsistent data and no one will know which set of data is the

    correct one.

     $he solution to this problem was (rst developed in +,G2 by &dgar odd* theinventor of the relational database. 4ut simply* a relational database in one

    in which important data* such as customers> names in stored only once in a

    single (le* but each customer>s (eld is de(ned by its relationship to other

    (les ) such as individual product sales.

     $he process of designing a database so that it is not subject to duplication or

    redundancy of data with its attendant problems of data corruption and

    inconsistency is referred to as normali5ation.

    ormali5ation reuires that the database designer stick to rules established

    by the database community to ensure that data is organi5ed eEciently.

     $hese rules are called normal form rules. $here are a number of normal

    May 12+3 4age 19 of 1.

  • 8/17/2019 2.3 Database Management Systems

    11/16

    MBA

    I!"#MA$I" S%S$&MS

    DATABASE MANAGEMENTSYSTEMS

    &nrolment number'MBISMCT13!11"

    forms each more rigorous than the previous and each containing the rules of 

    the previous form. urrently there are (ve levels of normal form.

    Re*un*%n$- o# *%t% is m%n- times bene6$i%l:

     $he redundancy of data in a database is primarily referred to in a negative

    sense* as it pertains to the unnecessary duplication of data in a database.

    However* there are certain times when redundant data is reuired* or

    desirable ) based upon speci(c and uniue conditions.

    Re%sons %n* t-)es o# $ert%in necessary  *u)li$%te *%t%:

    &nsure ;static; data for reuired situations 6government)compliantaccounting* banking* and (nancial record)keeping systems* apella

    assignment attachments* etc.8

    Information that is ;locked; into historical records of uotations* orders*

    invoices* and receipts after initial lookups via character keys.

    lient memory constraints

    Improve the ease and speed of access to data* with the risk that changes

    may cause conicting valuesE%m)le:

    t have redundant data8* it will take a long time for the uery to gete:ecuted as the number of (elds increased. Hence* redundancy of data isbene(cial* that is uery processing time will be minimal.

    Situ%tion ,(en re*un*%n$- ,ill mess u) t(e $urrent *%t%b%se

    st%tus:

    Any good MS Access 7atabase 7eveloper or onsultant would know that

    database redundancy is a big problem for any database* large or small.

    May 12+3 4age 11 of 1.

  • 8/17/2019 2.3 Database Management Systems

    12/16

    MBA

    I!"#MA$I" S%S$&MS

    DATABASE MANAGEMENTSYSTEMS

    &nrolment number'MBISMCT13!11"

    Arguably the worst part of data redundancy is the fact that the database are

    unnecessarily larger this might not seem like such a problem these days with

    our 1$B H77* but it was a huge problem not too long ago when space was an

    important commodity. But hand in hand with larger (le si5es is slower speeds

    and that is still a concern for people these days* particularly clients who

    wouldn>t be too happy knowing that a poor database developer or consultant

    allowed a easily (:able problem that a=ects pro(ts get past them.

    hange reuires reconciling data in multiple locations or (elds in the

    database

  • 8/17/2019 2.3 Database Management Systems

    13/16

    MBA

    I!"#MA$I" S%S$&MS

    DATABASE MANAGEMENTSYSTEMS

    &nrolment number'MBISMCT13!11"

    #edundant data is great if it is a backup and directly linked to the source* but

    the evil element of redundant data surfaces when an organi5ation has

    duplicate data in two or more unlinked (les or applications.

     $he occurrence of data redundancy can lead to the following problems'

    ;%< Re*un*%nt stor%ge' Some information is stored repeatedly.

    ;b< =)*%te %nom%lies' If one copy of such repeated data is updated* an

    inconsistency is created unless all copies are similarly updated.

    ;$< Insertion %nom%lies' It may not be possible to store some information

    unless some other information is stored as well.

    ;*< Deletion %nom%lies' It may not be possible to delete some information

    without losing some other information as well.

     

    E%m)le:

  • 8/17/2019 2.3 Database Management Systems

    14/16

    MBA

    I!"#MA$I" S%S$&MS

    DATABASE MANAGEMENTSYSTEMS

    &nrolment number'MBISMCT13!11"

    are interconnectivity. I.e. computers must be able to interact across a

    network of some sort* and the serving and receiving of data from a

    centrali5ed database. &:cept in isolated cases* interconnectivity is not much

    of a problem for organi5ations. However* everyone has di=erent needs for

    the information* and its diEcult to envision pulling all this disparate data

    together* so choosing from the many centrali5ed database software options

    becomes the challenge.

     $he key for associations* of course* is to keep one centrali5ed database that

    reduces the amount of redundant data as much as possible ) ideally downto none. $he goal is to develop a centrali5ed database that can do most of 

    the things for most of the people and functions* with the e:ibility to

    change and grow with your organi5ation.

    re#erre* A$tions to re*u$e re*un*%n$-:

    A series of steps are taken to reduce data redundancy and the chances of 

    data becoming inconsistent are followed to obtain a database design that

    allows for eEcient access and storage of data in a relational database.

    Identify all the places where the duplicate data is kept.

    Select a project leader ) perhaps someone from the department

    keeping the most data. $he leader analy5es all the known di=erent

    data repositories in the organi5ation to see what is uniue about the

    ways that data is accessed. A systems analyst or process engineer is

    usually a helpful mediator during this stage. Special attention should

    be paid to information that will be used in the form of output. $he

    ease and e:ibility of getting information out of your centrali5ed

    database is probably the most important feature of the software

    solution that you decide on.  $here is a budget allocated for the project

    May 12+3 4age 1/ of 1.

  • 8/17/2019 2.3 Database Management Systems

    15/16

    MBA

    I!"#MA$I" S%S$&MS

    DATABASE MANAGEMENTSYSTEMS

    &nrolment number'MBISMCT13!11"

    4rioriti5e the critical project tasks based on ;must have; and ;nice)to)

    have; features

    7evelop master/ centrali5ed database and allow the individual

    department to e:tract that data for their special project or needs 7evelop an automated interface where ever applicable with batch

    control 7evelop a web page along with an interface to update the database

    either through batch control or real time.

     $he normali5ation theory of a relational database is said to be in normal form

    if it satis(es certain constraints. odds original work de(ned three such

    forms but there are now (ve generally accepted steps of normali5ation.

    !irst ormal !orm eliminates repeating groups by putting each value of 

    a multi)valued attribute into a new row. Second ormal !orm eliminates functional dependencies on a partial

    key by putting the (elds in a separate table from those that are

    dependent on the whole key.  $hird ormal !orm eliminates functional dependencies on non)key

    (elds by putting them in a separate table. At this stage* all non)key

    (elds are dependent on the key* the whole key and nothing but the

    key. !ourth ormal !orm separates independent multi)valued facts stored in

    one table into separate tables. !ifth ormal !orm breaks out data redundancy that is not covered by

    any of the previous normal forms.

    May 12+3 4age 10 of 1.

  • 8/17/2019 2.3 Database Management Systems

    16/16

    MBA

    I!"#MA$I" S%S$&MS

    DATABASE MANAGEMENTSYSTEMS

    &nrolment number'MBISMCT13!11"

    Con$lusion:

     $hus it can be concluded that* re*un*%n$- o# *%t% is m%n- times

    bene6$i%l;* But many a times it will mess up the current database status

    and hence action of data normali5ation is reuired in order to avoid any data

    anomaly. 

    May 12+3 4age 1. of 1.