5-1-dbms

Upload: sk-munaf

Post on 01-Jun-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/9/2019 5-1-dbms

    1/60

    DATA MODELS:-

    A model is an abstraction process .

    A data model also called database modelis a mechanism that provides this abstractionfor database application.

    It represents the organisation itself.

  • 8/9/2019 5-1-dbms

    2/60

    A data model is a collection of mathematically

    well-dened concepts that help an enterpriseto consider and express the static anddynamic properties of data intensiveapplications.

    It consists of the following

    1) Static properties for ex; obects!attrib"tes! relationships.

    #) $ynamic properties for ex; operations or

    r"les dening new database states.

  • 8/9/2019 5-1-dbms

    3/60

    $ata %odels can be broadly classied into thefollowing three categories&

    1) 'ecord based data models.

    #) (bect-based data models.

    ) *hysical data models.

  • 8/9/2019 5-1-dbms

    4/60

    Record Based Data Models:-

    +hey are "sed to specify the overall

    logical str"ct"res of the database.

    In this model the database consists of an"mber of xed-format records possibly of

    di,erent types.

  • 8/9/2019 5-1-dbms

    5/60

    +here are three record based data models

    1) ierarchical data model

    #) etwor/ data model

    ) 'elational data model

  • 8/9/2019 5-1-dbms

    6/60

    Object Based Data Models:-

    +hey are "sed to describe data and itsrelationships.

    It "ses concepts s"ch as entities! attrib"tesand relationships.

    It has 0exible data str"ct"ring capabilities.

    $ata integrity constraints can be explicitlyspecied.

  • 8/9/2019 5-1-dbms

    7/60

    +he following are the common types of(bect-based data models&-

    1) ntity-'elationship model.

    #) Semantic %odel.

    ) 2"nctional model.

    3) (bect-oriented model.

  • 8/9/2019 5-1-dbms

    8/60

    Physical Data Models:-

    +hey are "sed for a higher-leveldescription of storage str"ct"re and access

    mechanism.

    +hey describe how data is stored in thecomp"ter.

    It is possible to implement the database atsystem level "sing physical data models.

  • 8/9/2019 5-1-dbms

    9/60

    +he most common physical models are&-

    1) 4nifying model.

    #) 2rame memory model.

  • 8/9/2019 5-1-dbms

    10/60

    ierarchical $ata %odels&-

    +he model is represented by an "pside-down tree.

    +he following g"re shows the model

  • 8/9/2019 5-1-dbms

    11/60

    A

    5 6

    $

    7evel89 & 'oot *arent

    :node)

    7evel81& 'oot 6hildren

    :Segments)

    7evel8#& Segments:level-1 children)

  • 8/9/2019 5-1-dbms

    12/60

    A tree may be dened as a set of nodes s"ch

    that there is one designated node called theroot :node)! which is called as the parentnode.

    +he remaining nodes are partitioned intodisoint sets and are perceived as children ofthe parent.

    +he parent can have none! one or morechildren.

  • 8/9/2019 5-1-dbms

    13/60

    A hierarchical model can represent one-to-many relationship between two entitieswhere the two are respectively parent andchild.

    +he nodes of the tree represents recordtypes.

    +he traversal of the tree is done inpreorder! inorder! postorder.

  • 8/9/2019 5-1-dbms

    14/60

    +he following g"re shows a hierarchicaldata model of a 4I'SI+< tree typeconsisting of three levels and three recordtypes s"ch as $*A'+%+! 2A647+< A$

    6(4'S.

    +he tree contains information abo"t"niversity academic departments alongwith data on all fac"lties for eachdepartment and all co"rses ta"ght by eachfac"lty within a department.

  • 8/9/2019 5-1-dbms

    15/60

    4I'SI+ design is simple

    i.e.! between vario"s layers .

    #) $ata Sharing&-All data held in a common database

    sharing is practical.

    ) $ata Sec"rity&-*rovided and enforced by $5%S.

    rst model to provide sec"rity.

  • 8/9/2019 5-1-dbms

    20/60

    3) $ata Independence&-

    $5%S creates an environment inwhich data independence can bemaintained.

    S"bstantially decreases theprogramming e,ort and programmaintenance.

    @) $ata Integrity&-given a parentchild relationship ! italways promotes data integrity.

  • 8/9/2019 5-1-dbms

    21/60

    B) Cciency&- It is very eCcient when the database

    contains a large vol"me of data inone-to-many :1&m) relationships.Dhen the "sers reE"ire large n"mbers

    of transactions "sing data whose

    relationships are xed over time.

    F) Available expertise&-xperience programmers are

    available.

    G) +ried 5"siness applications&-tried-and-tr"e b"siness applications

    available within the mainframes.

  • 8/9/2019 5-1-dbms

    22/60

    $isadvantages of ierarchical $ata %odel&-

    1) Implementation 6omplexity#) In0exibility

    ) $atabase management problems3) lac/ of Str"ct"ral Independence@) Application programming 6omplexityB) Implementation limitation

    F) o standardsG) xtensive programming e,orts.

  • 8/9/2019 5-1-dbms

    23/60

    NET%OR& DATA MODEL:-

    +he $atabase +as/ Hro"p of the6onference on $ata System 7ang"ages:$5+H6($AS

  • 8/9/2019 5-1-dbms

    24/60

    It has a ownermember relationship.

    %& or 1&%

  • 8/9/2019 5-1-dbms

    25/60

    A

    5 6

    $ 2

    77-9 &

    (D'

    77-1 &(D'%%5

    '

    77-#&%%5'

  • 8/9/2019 5-1-dbms

    26/60

    SA7S-'*'S+A

    +I

    64S+(%'

    *'($46+I(I6 *A

  • 8/9/2019 5-1-dbms

    27/60

    Advantages of etwor/ $ata %odel&-

    1) Simplicity&simple and easy to design

    #) 2acilitating more relationships types&in handling one-to-one and many-to-

    many relationships! which helps inmodeling real life sit"ations.

    ) S"perior data access&3) $atabase Integrity&@) $ata independence&B) $atabase Standards&

  • 8/9/2019 5-1-dbms

    28/60

    $isadvantages of etwor/ $ata %odel&-

    1) System complexity&

    #) Absence of str"ct"ral independence&

    ) ot-a-"ser-friendly&

  • 8/9/2019 5-1-dbms

    29/60

    RELATIONAL DATA MODEL:-

    .2.6odd of I5% research rst introd"cedthe relational data model in 1JF9.

    +he relational data model is

    implemented "sing very sophisticated'elational $atabase %anagement System:'$5%S).

    It performs the same basic f"nctions ofthe hierarchical and networ/ $5%Ss pl"swith the other f"nctions that ma/e'elational $ata model easy to "nderstand

    and implement.

  • 8/9/2019 5-1-dbms

    30/60

    Ad'a(ta)es o* Relatio(al Data Model:-

    1) Simplicity

    #) Str"ct"ral Independence

    ) ase of design! implementation!maintenance and "ses.3) 2lexible and powerf"l E"ery

    capability.

  • 8/9/2019 5-1-dbms

    31/60

    Disad'a(ta)es o* Relatio(al DataModel:-

    1) ardware (verheads

    #) ase-to-$esign capability leading tobad design&

  • 8/9/2019 5-1-dbms

    32/60

    +I+< '7A+I(SI* :-') $A+A %($7&-

    It is a logical database model! which hasa logical representation of data for anenterprise of b"siness establishment.

    It is a collection of obects of similarstr"ct"res called an entity set.

    +he relationship between entity sets is

    represented on the basis of n"mber ofentities from entity set that can beassociated with the n"mber of entities ofanother entity set.

  • 8/9/2019 5-1-dbms

    33/60

    It has one-to-one :1&1)! one-to-many:1&m)! many-to-many:n&m)

    relationships .

    +he following shows b"ilding bloc/s orsymbols to represent -' diagram.

    ENTIT!SET

    ATTRIBUTES

  • 8/9/2019 5-1-dbms

    34/60

    '7A+I(SI*

    7IL 5+DA++'I54+ A$

    +I+< S+

    MANDATOR!ONE

  • 8/9/2019 5-1-dbms

    35/60

    %A$A+('