What is data base management system? Explain three level architecture with diagram?
A database management system (DBMS) is the s!tware that allws a cmputer t
per!rm database !unctins ! string" retrieving" adding" deleting and mdi!ying data# $elatinal database management systems ($DBMS) implement the relatinal mdel ! tables and relatinships# A database management system (DBMS) is a s!tware pac%age designed t de!ine" manipulate" retrieve and manage data in a database# A DBMS generally manipulates the data itsel!" the data !rmat" !ield names" recrd structure and !ile structure# &t als de!ines rules t validate and manipulate this data# A DBMS relieves users ! !raming prgrams !r data maintenance# 'urth(generatin )uery languages" such as S*+" are used alng with the DBMS pac%age t interact with a database# Three Level Architecture of DBMS An early prpsal !r a standard terminlgy and general architecture database a system was prduced in ,-., by the DB/0 (Data Base /as% 0rup) appinted by the 1n!erence n data Systems and +anguages# /he DB/0 recgni2ed the need !r a tw level apprach with a system view called the schema and user view called subschema# /he American 3atinal Standard &nstitute terminlgy and architecture in ,-.4#A3S&( S5A$1 recgni2ed the need !r a three level apprach with a system catalg# /he design ! a Database Management System highly depends n its architecture# &t can be centrali2ed r decentrali2ed r hierarchical# DBMS architecture can be seen as single tier r multi tier# n(tier architecture divides the whle system int related but independent n mdules" which can be independently mdi!ied" altered" changed r replaced# &n ,(tier architecture" DBMS is the nly entity where user directly sits n DBMS and uses it# Any changes dne here will directly be dne n DBMS itsel!# &t des nt prvide handy tls !r end users and pre!erably database designer and prgrammers use single tier architecture# &! the architecture ! DBMS is 6(tier then must have sme applicatin" which uses the DBMS# 5rgrammers use 6(tier architecture where they access DBMS by means ! applicatin# 7ere applicatin tier is entirely independent ! database in term ! peratin" design and prgramming# 3-tier architecture Mst widely used architecture is 8(tier architecture# 8(tier architecture separates it tier !rm each ther n basis ! users# &t is described as !llws9 :Image: 3-tier DBMS architecture; Database (Data) Tier: At this tier" nly database resides# Database alng with its )uery prcessing languages sits in layer(8 ! 8(tier architecture# &t als cntains all relatins and their cnstraints# Application (Middle) Tier: At this tier the applicatin server and prgram" which access database" resides# 'r a user this applicatin tier wr%s as abstracted view ! database# <sers are unaware ! any existence ! database beynd applicatin# 'r database(tier" applicatin tier is the user ! it# Database tier is nt aware ! any ther user beynd applicatin tier# /his tier wr%s as mediatr between the tw# User (resentation) Tier: An end user sits n this tier# 'rm a users aspect this tier is everything# 7e=she desn>t %nw abut any existence r !rm ! database beynd this layer# At this layer multiple views ! database can be prvided by the applicatin# All views are generated by applicatins" which resides in applicatin tier# Multiple tier database architecture is highly mdi!iable as almst all its cmpnents are independent and can be changed independently# There are follo!in" three levels or la#ers of DBMS architecture: ,# Extenal +evel 6# 1nceptual +evel 8# &nternal +evel $% &'ternal Level9 ( External +evel is described by a schema i#e# it cnsists ! de!initin ! lgical recrds and relatinship in the external view# &t als cntains the methd ! deriving the b?ects in the external view !rm the b?ects in the cnceptual view# (% )onceptual Level9 ( 1nceptual +evel represents the entire database# 1nceptual schema describes the recrds and relatinship included in the 1nceptual view# &t als cntains the methd ! deriving the b?ects in the cnceptual view !rm the b?ects in the internal view# 3% *nternal Level: - &nternal level indicates he the data will be stred and described the data structures and access methd t be used by the database# &t cntains the de!initin ! stred recrd and methd ! representing the data !ields and access aid used# A mapping between external and cnceptual views gives the crrespndence amng the recrds and relatin ship ! the cnceptual and external view# /he external view is the abstractin ! cnceptual view which in turns is the abstractin ! internal view# &t describes the cntents ! the database as perceived by the user r applicatin prgram ! that view# A mapping between cnceptual recrds !rm the physical database# Explain all DD+ @ D7+ cmmand with systems and utput? DML vs% DDL Data Manipulatin +anguage (als %nwn as DM+) is a !amily ! cmputer languages# /hey are used by cmputer prgrams" and=r database users" t manipulate data in a database A that is" insert" delete and update this data in the database# Data De!initin +anguage (als %nwn as DD+) is a cmputer language used t de!ine data structures A as its namesa%e suggests# &t !irst made its appearance in the 1BDASC+ database mdel (a mdel pertaining t the in!rmatin technlgy industry cnsrtium" %nwn as 1n!erence n Data Systems +anguages)# DD+ was used within the schema ! the database in rder t describe the recrds" !ields" and DsetsE that made up the user Data Mdel# &t was at !irst a way in which prgrammers de!ined S*+# 3w" hwever" it is used generically t re!er t any !rmal language used t describe data r in!rmatin structures (!r example" FM+ schemas)# /he mst ppular !rm ! DM+ is the Structured *uery +anguage (r S*+)# /his is a language used !r databases" and is designed speci!ically !r managing data in relatinal database management systems (r $DBMS)# /here are als ther !rms in which DM+ is used" !r instance A &M S=D+&" 1BDASC+ databases (&DMS" !r example)" and a !ew thers# DM+ cmprises ! S*+ data change statements" meaning that stred data is mdi!ied" but the schema r database b?ects remain the same# /he !unctinal capability ! the DM+ is rganised by the initial wrd in a statement# /his wrd is mst generally a verb A giving the page a speci!ic actin t !ul!il# /here are !ur speci!ic verbs that initiate an actin9 SE+E1/G&3/B" &3SE$/" <5DA/E" and DE+E/E# /he DD+ is used mainly t create A that is t ma%e a new database" table" index r stred )uery# A 1$EA/E statement in S*+ literally creates an b?ect inside any $DBMS# As such" the types ! b?ects able t be created are cmpletely dependent n which $DBMS is currently in use# Mst $DBMS supprt the table" index" user" synnym and database creatin# &n sme cases" a system will allw the 1$EA/E cmmand and ther DD+ cmmands inside a speci!ic transactin# /his means that these !unctins are capable ! being rlled bac%# /he mst cmmn 1$EA/E cmmand is the 1$EA/E /AB+E cmmand# DM+s are )uite varius# /hey have di!!erent !unctins and capabilities between database vendrs# /here are nly tw DM+ languages" hwever9 5rcedural and Declarative# While there are multiple standards established !r S*+" mst vendrs prvide their wn extensins t the standard withut implementing it entirely# Summary9 ,# DM+ is a gruping ! cmputer languages used by cmputer prgrams t manipulate data in a databaseH DD+ is a cmputer language used speci!ically t de!ine data structures# 6# /he mst ppular !rm ! DM+ is S*+" and is cmprised ! varius change statementsH DD+ mainly uses the 1$EA/E cmmand# DDL Data Definition Lan"ua"e (DD+) statements are used t de!ine the database structure r schema# Sme examples9 o 1$EA/E ( t create b?ects in the database o A+/E$ ( alters the structure ! the database o D$B5 ( delete b?ects !rm the database o /$<31A/E ( remve all recrds !rm a table" including all spaces allcated !r the recrds are remved o 1BMME3/ ( add cmments t the data dictinary o $E3AME ( rename an b?ect DML Data Manipulation Lan"ua"e (DM+) statements are used !r managing data within schema b?ects# Sme examples9 o SE+E1/ ( retrieve data !rm the a database o &3SE$/ ( insert data int a table o <5DA/E ( updates existing data within a table o DE+E/E ( deletes all recrds !rm a table" the space !r the recrds remain o ME$0E ( <5SE$/ peratin (insert r update) o 1A++ ( call a 5+=S*+ r Iava subprgram o EF5+A&3 5+A3 ( explain access path t data o +B1J /AB+E ( cntrl cncurrency DCL Data )ontrol Lan"ua"e (D1+) statements# Sme examples9 o 0$A3/ ( gives user>s access privileges t database o $EKBJE ( withdraw access privileges given with the 0$A3/ cmmand TCL Transaction )ontrol (/1+) statements are used t manage the changes made by DM+ statements# &t allws statements t be gruped tgether int lgical transactins# o 1BMM&/ ( save wr% dne o SAKE5B&3/ ( identi!y a pint in a transactin t which yu can later rll bac% o $B++BA1J ( restre database t riginal since the last 1BMM&/ o SE/ /$A3SA1/&B3 ( 1hange transactin ptins li%e islatin level and what rllbac% segment t use
Explain varius types ! data mdels with the help ! diagrams? &n s!tware engineering" the term data +odel is used in tw related senses# &n the sense cvered by this article" it is a descriptin ! the b?ects represented by a cmputer system tgether with their prperties and relatinshipsH these are typically Lreal wrldL b?ects such as prducts" suppliers" custmers" and rders# &n the secnd sense" cvered by the article database mdel" it means a cllectin ! cncepts and rules used in de!ining data mdels9 !r example the relatinal mdel uses relatins and tuples" while the netwr% mdel uses recrds" sets" and !ields# Bverview ! data mdeling cntext9 Data mdel is based n Data" Data relatinship" Data semantic and Data cnstraint# A data mdel prvides the details ! in!rmatin t be stred" and is ! primary use when the !inal prduct is the generatin ! cmputer s!tware cde !r an applicatin r the preparatin ! a !unctinal speci!icatin t aid a cmputer s!tware ma%e(r(buy decisin# /he !igure is an example ! the interactin between prcess and data mdels# :,; Data mdels are !ten used as an aid t cmmunicatin between the business peple de!ining the re)uirements !r a cmputer system and the technical peple de!ining the design in respnse t thse re)uirements# /hey are used t shw the data needed and created by business prcesses# Accrding t 7berman (6MM-)" LA data mdel is a way!inding tl !r bth business and &/ pr!essinals" which uses a set ! symbls and text t precisely explain a subset ! real in!rmatin t imprve cmmunicatin within the rgani2atin and thereby lead t a mre !lexible and stable applicatin envirnment#L :6; A data mdel explicitly determines the structure ! data# Data mdels are speci!ied in a data mdeling ntatin" which is !ten graphical in !rm# :8; A data mdel can be smetimes re!erred t as a data structure" especially in the cntext ! prgramming languages# Data mdels are !ten cmplemented by !unctin mdels" especially in the cntext ! enterprise mdels# ,elationships and functions A given database management system may prvide ne r mre ! the !ive mdels# /he ptimal structure depends n the natural rgani2atin ! the applicatin>s data" and n the applicatin>s re)uirements" which include transactin rate (speed)" reliability" maintainability" scalability" and cst# Mst database management systems are built arund ne particular data mdel" althugh it is pssible !r prducts t !!er supprt !r mre than ne mdel# Karius physical data mdels can implement any given lgical mdel# Mst database s!tware will !!er the user sme level ! cntrl in tuning the physical implementatin" since the chices that are made have a signi!icant e!!ect n per!rmance# A mdel is nt ?ust a way ! structuring data9 it als de!ines a set ! peratins that can be per!rmed n the data# /he relatinal mdel" !r example" de!ines peratins such as select (pr?ect) and ?in# Althugh these peratins may nt be explicit in a particular )uery language" they prvide the !undatin n which a )uery language is built# -lat +odel 'lat 'ile Mdel# Main articles9 'lat !ile database and Spreadsheet /he !lat (r table) mdel cnsists ! a single" tw(dimensinal array ! data elements" where all members ! a given clumn are assumed t be similar values" and all members ! a rw are assumed t be related t ne anther# 'r instance" clumns !r name and passwrd that might be used as a part ! a system security database# Each rw wuld have the speci!ic passwrd assciated with an individual user# 1lumns ! the table !ten have a type assciated with them" de!ining them as character data" date r time in!rmatin" integers" r !lating pint numbers# /his tabular !rmat is a precursr t the relatinal mdel# &arl# data +odels /hese mdels were ppular in the ,-NMs" ,-.Ms" but nwadays can be !und primarily in ld legacy systems# /hey are characteri2ed primarily by being navigatinal with strng cnnectins between their lgical and physical representatins" and de!iciencies in data independence# Hierarchical model 7ierarchical Mdel# Main article9 7ierarchical mdel &n a hierarchical mdel" data is rgani2ed int a tree(li%e structure" implying a single parent !r each recrd# A srt !ield %eeps sibling recrds in a particular rder# 7ierarchical structures were widely used in the early main!rame database management systems" such as the &n!rmatin Management System (&MS) by &BM" and nw describe the structure ! FM+ dcuments# /his structure allws ne ne(t(many relatinship between tw types ! data# /his structure is very e!!icient t describe many relatinships in the real wrldH recipes" table ! cntents" rdering ! paragraphs=verses" any nested and srted in!rmatin# /his hierarchy is used as the physical rder ! recrds in strage# $ecrd access is dne by navigating thrugh the data structure using pinters cmbined with se)uential accessing# Because ! this" the hierarchical structure is ine!!icient !r certain database peratins when a !ull path (as ppsed t upward lin% and srt !ield) is nt als included !r each recrd# Such limitatins have been cmpensated !r in later &MS versins by additinal lgical hierarchies impsed n the base physical hierarchy# Network model 3etwr% Mdel# Main article9 3etwr% mdel /he netwr% mdel expands upn the hierarchical structure" allwing many(t(many relatinships in a tree(li%e structure that allws multiple parents# &t was the mst ppular be!re being replaced by the relatinal mdel" and is de!ined by the 1BDASC+ speci!icatin# /he netwr% mdel rgani2es data using tw !undamental cncepts" called records and sets# $ecrds cntain !ields (which may be rgani2ed hierarchically" as in the prgramming language 1BBB+)# Sets (nt t be cn!used with mathematical sets) de!ine ne(t(many :disambiguation needed; relatinships between recrds9 ne wner" many members# A recrd may be an wner in any number ! sets" and a member in any number ! sets# A set cnsists ! circular lin%ed lists where ne recrd type" the set wner r parent" appears nce in each circle" and a secnd recrd type" the subrdinate r child" may appear multiple times in each circle# &n this way a hierarchy may be established between any tw recrd types" e#g#" type A is the wner ! B# At the same time anther set may be de!ined where B is the wner ! A# /hus all the sets cmprise a general directed graph (wnership de!ines a directin)" r network cnstruct# Access t recrds is either se)uential (usually in each recrd type) r by navigatin in the circular lin%ed lists# /he netwr% mdel is able t represent redundancy in data mre e!!iciently than in the hierarchical mdel" and there can be mre than ne path !rm an ancestr nde t a descendant# /he peratins ! the netwr% mdel are navigatinal in style9 a prgram maintains a current psitin" and navigates !rm ne recrd t anther by !llwing the relatinships in which the recrd participates# $ecrds can als be lcated by supplying %ey values# Althugh it is nt an essential !eature ! the mdel" netwr% databases generally implement the set relatinships by means ! pinters that directly address the lcatin ! a recrd n dis%# /his gives excellent retrieval per!rmance" at the expense ! peratins such as database lading and rergani2atin# 5pular DBMS prducts that utili2ed it were 1incm Systems> /tal and 1ullinet>s &DMS# &DMS gained a cnsiderable custmer baseH in the ,-OMs" it adpted the relatinal mdel and S*+ in additin t its riginal tls and languages# Mst b?ect databases (invented in the ,--Ms) use the navigatinal cncept t prvide !ast navigatin acrss netwr%s ! b?ects" generally using b?ect identi!iers as LsmartL pinters t related b?ects# Bb?ectivity=DB" !r instance" implements named ne(t(ne" ne(t(many" many(t(ne" and many(t(many named relatinships that can crss databases# Many b?ect databases als supprt S*+" cmbining the strengths ! bth mdels# Inverted file model Main article9 &nverted index &n an inverted file r inverted index" the cntents ! the data are used as %eys in a l%up table" and the values in the table are pinters t the lcatin ! each instance ! a given cntent item# /his is als the lgical structure ! cntemprary database indexes" which might nly use the cntents !rm a particular clumns in the l%up table# /he inverted file data model can put indexes in a secnd set ! !iles next t existing !lat database !iles" in rder t e!!iciently directly access needed recrds in these !iles# 3table !r using this data mdel is the ADABAS DBMS ! S!tware A0" intrduced in ,-.M# ADABAS has gained cnsiderable custmer base and exists and supprted until tday# &n the ,-OMs it has adpted the relatinal mdel and S*+ in additin t its riginal tls and languages# ,elational +odel Main article9 $elatinal mdel /he relatinal mdel was intrduced by E#'# 1dd in ,-.M :,; as a way t ma%e database management systems mre independent ! any particular applicatin# &t is a mathematical mdel de!ined in terms ! predicate lgic and set thery" and systems implementing it have been used by main!rame" midrange and micrcmputer systems# /he prducts that are generally re!erred t as relatinal databases in !act implement a mdel that is nly an apprximatin t the mathematical mdel de!ined by 1dd# /hree %ey terms are used extensively in relatinal database mdels9 relations" attributes" and domains# A relatin is a table with clumns and rws# /he named clumns ! the relatin are called attributes" and the dmain is the set ! values the attributes are allwed t ta%e# /he basic data structure ! the relatinal mdel is the table" where in!rmatin abut a particular entity (say" an emplyee) is represented in rws (als called tuples) and clumns# /hus" the LrelatinL in Lrelatinal databaseL re!ers t the varius tables in the databaseH a relatin is a set ! tuples# /he clumns enumerate the varius attributes ! the entity (the emplyee>s name" address r phne number" !r example)" and a rw is an actual instance ! the entity (a speci!ic emplyee) that is represented by the relatin# As a result" each tuple ! the emplyee table represents varius attributes ! a single emplyee# All relatins (and" thus" tables) in a relatinal database have t adhere t sme basic rules t )uali!y as relatins# 'irst" the rdering ! clumns is immaterial in a table# Secnd" there can>t be identical tuples r rws in a table# And third" each tuple will cntain a single value !r each ! its attributes# A relatinal database cntains multiple tables" each similar t the ne in the L!latL database mdel# Bne ! the strengths ! the relatinal mdel is that" in principle" any value ccurring in tw di!!erent recrds (belnging t the same table r t di!!erent tables)" implies a relatinship amng thse tw recrds# Cet" in rder t en!rce explicit integrity cnstraints" relatinships between recrds in tables can als be de!ined explicitly" by identi!ying r nn(identi!ying parent(child relatinships characteri2ed by assigning cardinality (,9," (M),9M" M9M)# /ables can als have a designated single attribute r a set ! attributes that can act as a L%eyL" which can be used t uni)uely identi!y each tuple in the table# A %ey that can be used t uni)uely identi!y a rw in a table is called a primary %ey# Jeys are cmmnly used t ?in r cmbine data !rm tw r mre tables# 'r example" an Emlo!ee table may cntain a clumn named "ocation which cntains a value that matches the %ey ! a "ocation table# Jeys are als critical in the creatin ! indexes" which !acilitate !ast retrieval ! data !rm large tables# Any clumn can be a %ey" r multiple clumns can be gruped tgether int a cmpund %ey# &t is nt necessary t de!ine all the %eys in advanceH a clumn can be used as a %ey even i! it was nt riginally intended t be ne# A %ey that has an external" real(wrld meaning (such as a persn>s name" a b%>s &SB3" r a car>s serial number) is smetimes called a LnaturalL %ey# &! n natural %ey is suitable (thin% ! the many peple named Brown)" an arbitrary r surrgate %ey can be assigned (such as by giving emplyees &D numbers)# &n practice" mst databases have bth generated and natural %eys" because generated %eys can be used internally t create lin%s between rws that cannt brea%" while natural %eys can be used" less reliably" !r searches and !r integratin with ther databases# ('r example" recrds in tw independently develped databases culd be matched up by scial security number" except when the scial security numbers are incrrect" missing" r have changed#) /he mst cmmn )uery language used with the relatinal mdel is the Structured *uery +anguage (S*+)# Dimensional model /he dimensinal mdel is a speciali2ed adaptatin ! the relatinal mdel used t represent data in data warehuses in a way that data can be easily summari2ed using nline analytical prcessing" r B+A5 )ueries# &n the dimensinal mdel" a database schema cnsists ! a single large table ! !acts that are described using dimensins and measures# A dimensin prvides the cntext ! a !act (such as wh participated" when and where it happened" and its type) and is used in )ueries t grup related !acts tgether# Dimensins tend t be discrete and are !ten hierarchicalH !r example" the lcatin might include the building" state" and cuntry# A measure is a )uantity describing the !act" such as revenue# &t is imprtant that measures can be meaning!ully aggregatedP!r example" the revenue !rm di!!erent lcatins can be added tgether# &n an B+A5 )uery" dimensins are chsen and the !acts are gruped and aggregated tgether t create a summary# /he dimensinal mdel is !ten implemented n tp ! the relatinal mdel using a star schema" cnsisting ! ne highly nrmali2ed table cntaining the !acts" and surrunding denrmali2ed tables cntaining each dimensin# An alternative physical implementatin" called a snw!la%e schema" nrmali2es multi(level hierarchies within a dimensin int multiple tables# A data warehuse can cntain multiple dimensinal schemas that share dimensin tables" allwing them t be used tgether# 1ming up with a standard set ! dimensins is an imprtant part ! dimensinal mdeling# &ts high per!rmance has made the dimensinal mdel the mst ppular database structure !r B+A5# ost-relational database +odels 5rducts !!ering a mre general data mdel than the relatinal mdel are smetimes classi!ied as ost-relational# :6; Alternate terms include Lhybrid databaseL" LBb?ect( enhanced $DBMSL and thers# /he data mdel in such prducts incrprates relatins but is nt cnstrained by E#'# 1dd>s &n!rmatin 5rinciple" which re)uires that all in!rmatin in the database must be cast explicitly in terms ! values in relatins and in n ther way :8; Sme ! these extensins t the relatinal mdel integrate cncepts !rm technlgies that pre(date the relatinal mdel# 'r example" they allw representatin ! a directed graph with trees n the ndes# /he 0erman cmpany sones implements this cncept in its 0raphDB# Sme pst(relatinal prducts extend relatinal systems with nn(relatinal !eatures# Bthers arrived in much the same place by adding relatinal !eatures t pre(relatinal systems# 5aradxically" this allws prducts that are histrically pre(relatinal" such as 5&1J and M<M5S" t ma%e a plausible claim t be pst(relatinal# /he resurce space mdel ($SM) is a nn(relatinal data mdel based n multi( dimensinal classi!icatin# :Q; Graph model Main article9 0raph database 0raph databases allw even mre general structure than a netwr% databaseH any nde may be cnnected t any ther nde# Multivalue model Main article9 MultiKalue Multivalue databases are LlumpyL data" in that they can stre exactly the same way as relatinal databases" but they als permit a level ! depth which the relatinal mdel can nly apprximate using sub(tables# /his is nearly identical t the way FM+ expresses data" where a given !ield=attribute can have multiple right answers at the same time# Multivalue can be thught ! as a cmpressed !rm ! FM+# An example is an invice" which in either multivalue r relatinal data culd be seen as (A) &nvice 7eader /able ( ne entry per invice" and (B) &nvice Detail /able ( ne entry per line item# &n the multivalue mdel" we have the ptin ! string the data as n table" with an embedded table t represent the detail9 (A) &nvice /able ( ne entry per invice" n ther tables needed# /he advantage is that the atmicity ! the &nvice (cnceptual) and the &nvice (data representatin) are ne(t(ne# /his als results in !ewer reads" less re!erential integrity issues" and a dramatic decrease in the hardware needed t supprt a given transactin vlume# Obect!oriented database models Example ! an Bb?ect(Briented Mdel# Main articles9 Bb?ect(relatinal mdel and Bb?ect mdel &n the ,--Ms" the b?ect(riented prgramming paradigm was applied t database technlgy" creating a new database mdel %nwn as b?ect databases# /his aims t avid the b?ect(relatinal impedance mismatch ( the verhead ! cnverting in!rmatin between its representatin in the database (!r example as rws in tables) and its representatin in the applicatin prgram (typically as b?ects)# Even !urther" the type system used in a particular applicatin can be de!ined directly in the database" allwing the database t en!rce the same data integrity invariants# Bb?ect databases als intrduce the %ey ideas ! b?ect prgramming" such as encapsulatin and plymrphism" int the wrld ! databases# A variety ! these ways have been tried :b! whom#; !r string b?ects in a database# Sme :which#; prducts have apprached the prblem !rm the applicatin prgramming end" by ma%ing the b?ects manipulated by the prgram persistent# /his typically re)uires the additin ! sme %ind ! )uery language" since cnventinal prgramming languages d nt have the ability t !ind b?ects based n their in!rmatin cntent# Bthers :which#;
have attac%ed the prblem !rm the database end" by de!ining an b?ect(riented data mdel !r the database" and de!ining a database prgramming language that allws !ull prgramming capabilities as well as traditinal )uery !acilities# Bb?ect databases su!!ered because ! a lac% ! standardi2atin9 althugh standards were de!ined by BDM0" they were never implemented well enugh t ensure interperability between prducts# 3evertheless" b?ect databases have been used success!ully in many applicatins9 usually speciali2ed applicatins such as engineering databases r mlecular bilgy databases rather than mainstream cmmercial data prcessing# 7wever" b?ect database ideas were pic%ed up by the relatinal vendrs and in!luenced extensins made t these prducts and indeed t the S*+ language# An alternative t translating between b?ects and relatinal databases is t use an b?ect( relatinal mapping (B$M) library#
Explain all types ! DBMS? +ist the system and cmmand alng with utput? A DBMS always prvides data independence# Any change in strage mechanism and !rmats are per!rmed withut mdi!ying the entire applicatin# /here are !ur main types ! database rgani2atin9 $elatinal Database9 Data is rgani2ed as lgically independent tables# $elatinships amng tables are shwn thrugh shared data# /he data in ne table may re!erence similar data in ther tables" which maintains the integrity ! the lin%s amng them# /his !eature is re!erred t as re!erential integrity ( an imprtant cncept in a relatinal database system# Bperatins such as LselectL and L?inL can be per!rmed n these tables# /his is the mst widely used system ! database rgani2atin# 'lat Database9 Data is rgani2ed in a single %ind ! recrd with a !ixed number ! !ields# /his database type encunters mre errrs due t the repetitive nature ! data# Bb?ect Briented Database9 Data is rgani2ed with similarity t b?ect riented prgramming cncepts# An b?ect cnsists ! data and methds" while classes grup b?ects having similar data and methds# 7ierarchical Database9 Data is rgani2ed with hierarchical relatinships# &t becmes a cmplex netwr% i! the ne(t(many relatinship is vilated# Data +ana"e+ent +odels /he data management systems (als called data base management systems) intrduced several new ways ! rgani2ing data# /hat is they intrduced several new ways ! lin%ing recrd !ragments (r segments) tgether t !rm larger recrds !r prcessing# Althugh many di!!erent methds were tried" nly three ma?r methds became ppular9 the hierarchic methd" the netwr% methd" and the newest" the relatinal methd# Each ! these methds re!lected the manner in which the vendr cnstructed and physically managed data within the !ile# /he systems designer and the prgrammer had t understand these methds s that they culd retrieve and prcess the data in the !iles# /hese mdels depicted the way the recrd !ragments were tied t each ther and thus the manner in which the chain ! pinters had t be !llwed t retrieved the !ragments in the crrect rder# Each vendr intrduced a structural mdel t depict hw the data was rgani2ed and tied tgether# /hese mdels als depicted what ptins were chsen t be implemented by the develpment team" data recrd dependencies" data recrd ccurrence !re)uencies" and the se)uence in which data recrds had t be accessed ( als called the navigatin se)uence# The hierarchic +odel /he hierarchic mdel (fi"ure .-$) is used t describe thse recrd structures in which the varius physical recrds which ma%e up the lgical recrd are tied tgether in a se)uence which l%s li%e an inverted tree# At the tp ! the structure is a single recrd# Beneath that are ne r mre recrds each ! which can ccur ne r mre times# Each ! these can in turn have multiple recrds beneath them# &n diagrammatic !rm the tp t bttm set ! recrds l%s li%e a inverted tree r a pyramid ! recrds# / access the set ! recrds assciated with the identi!ier ne started at the tp recrd and !llwed the pinters !rm recrd t recrd# /he varius recrds in the lwer part ! the structure are accessed by !irst accessing the recrds abve them and then !llwing the chain ! pinters t the recrds at the next lwer level# /he recrds at any given level are re!erred t as the parent recrds and the recrds at the next lwer level that are cnnected t it" r dependent n it are re!erred t as its children r the child recrds# /here can be any number ! recrds at any level" and each recrd can have any number ! children# Each ccurrence ! the structure nrmally represent the cllectin ! data abut a single sub?ect# /his parent(child repetitin can be repeated thrugh several levels# /he data mdel !r this type ! structural representatin usually depicts each segment r recrd !ragment nly nce and uses lines t shw the cnnectin between a parent recrd and its children# /his depictin ! recrd types and lines cnnecting them l%s li%e an inverted tree r an rgani2atinal hierarchy chart# Each !ile is said t cnsist ! a number ! repetitins ! this tree structure# Althugh the data mdel depicts all pssible recrds types within a structure" in any given ccurrence" recrd types may r may nt be present# Each ccurrence ! the structure represents a speci!ic sub?ect ccurrence an is identi!ied by a uni)ue identi!ier in the single" tpmst recrd type (the rt recrd)# Designers emplying this type ! data management system wuld have t develp a uni)ue recrd hierarchy !r each data strage sub?ect# A given applicatin may have several di!!erent hierarchies" each representing data abut a di!!erent sub?ect" assciated with it and a cmpany may have several d2en di!!erent hierarchies ! recrd types as cmpnents ! its data mdel# A characteristic ! this type ! mdel is that each hierarchy is nrmally treated as separate and distinct !rm the ther hierarchies" and varius hierarchies can be mixed and matched t suit the data needs ! the particular applicatin# The net!or/ +odel /he netwr% data mdel (fi"ure .-() has n implicit hierarchic relatinship between the varius recrds" and in many cases n implicit structure at all" with the recrds seemingly placed at randm# /he netwr% mdel des nt ma%e a clear distinctin between sub?ects mingling all recrd types in an verall schematic# /he netwr% mdel may have many di!!erent recrds cntaining uni)ue identi!iers" each ! which acts as an entry pint int the recrd structure# $ecrd types are gruped int sets ! tw" ne r bth ! which can in turn be part ! anther set ! tw recrd types# Within a given set" ne recrd type is said t be the wner recrd and ne is said t be the member recrd# Access t a set is always accmplished by !irst lcating the speci!ic wner recrd and then !llwing the chain ! pinters t the member recrds ! the set# /he netwr% can be traversed r navigated by mving !rm set t set# Karius di!!erent data structures can be cnstructed by selecting sets ! recrds and excluding thers# Each recrd type is depicted nly nce in this type ! data mdel and the relatinship between recrd types is indicated by a line between them# /he line ?ining the tw recrds cntains the name ! the set# Within a set a recrd can have nly ne wner" but multiple wner member sets can be cnstructed using the same tw recrd types /he netwr% mdel has n explicit hierarchy and n explicit entry pint# Whereas the hierarchic mdel has several di!!erent hierarchies structures" the netwr% mdel emplys a single master netwr% r mdel" which when cmpleted l%s li%e a web ! recrds# As new data is re)uired" recrds are added t the netwr% and ?ined t existing sets# The relational +odel /he relatinal mdel (fi"ure .-3)" unli%e the netwr% r the hierarchic mdels did nt rely n pinters t cnnect and chse t view individual recrds in sets regardless ! the sub?ect ccurrence they were assciated with# /his is in cntrast t the ther mdels which sught t depict the relatinships between recrd types# &n the netwr% mdel recrds are prtrayed as residing in tables with n physical pinter between these tables# Each table is thus prtrayed independently !rm each ther table# /his made the data mdel itsel! a mdel ! simplicity" but it in turn made the visuali2atin ! all the recrds assciated with a particular sub?ect smewhat di!!icult# Data recrds were cnnected using lgic and by using that data that was redundantly stred in each table# $ecrds n a given sub?ect ccurrence culd be selected !rm multiple tables by matching the cntents ! these redundantly stred data !ields# The i+pact of data +ana"e+ent s#ste+s /he use ! these prducts t manage data intrduced a new set ! tas%s !r the data analysis persnnel# &n additin t develping recrd layuts" they als had the new tas% ! determining hw these recrds shuld be structured" r arranged and ?ined by pinter structures# Bnce thse decisins were made they had t be cnveyed t the members ! the implementatin team# /he hierarchic and netwr% mdels were necessary because withut them the ccurrence se)uences and the recrd t recrd relatinships designed int the !iles culd nt be ade)uately prtrayed# Althugh the relatinal LmdelL design chices als needed t be cnveyed t the implementatin team" the relatinal mdel was always depicted in much the same !rmat as standard recrd layuts" and any ther access r navigatin related in!rmatin culd be cnveyed in narrative !rm# Data as a corporate ,esource Bne additinal cncept was intrduced during the perid when these new !ile management systems were being develped ( the cncept that data was a crprate resurce# /he implicatins ! cncept were that data belnged t the crpratin as a whle" and nt t individual user areas# /his implied that data shuld smehw be shared" r used in cmmn by all members ! the !irm# Data sharing re)uired data planning# Data had t be rgani2ed" si2ed and !rmatted t !acilitate use by all wh needed it# /his cncept ! data sharing was diametrically ppsed t the applicatin rientatin where data recrds and data !iles were designed !r" and data wned by the applicatin and the users ! that applicatin# /his cncept als intrduced a new set ! participants in the data analysis prcess and a new set ! users ! the data mdels# /hese new peple were business area persnnel wh were nw drawn int the data analysis prcess# /he data recrd mdels which had su!!iced !r the data prcessing persnnel n lnger cnveyed either the right in!rmatin nr in!rmatin with the crrect perspective t be meaning!ul !r these new participants# /he primary methd ! data planning is the develpment ! the data mdel# Many ! the early data planning was accmplished within the cntext ! the schematics used by the design team t describe the data management !ile structures# /hese mdels were used as analysis and re)uirements tls" and as such were mderately e!!ective# /hey were limited in ne respect" that being that rgani2atins tended t use the implementatin mdel" which als cntained in!rmatin abut pinter use" navigatin in!rmatin" r in the case ! the netwr% mdels" wner(member set in!rmatin" access chice in!rmatin and ther in!rmatin which was imprtant t the data prcessing implementatin team" but nt terribly relevant t the user# 0or+ali1ation 1ncurrent with the intrductin ! the relatinal data mdel anther cncept was intrduced ( that ! nrmali2atin# Althugh it was intrduced in the early nineteen(seventies its !ull impact did nt begin t be !elt until almst a decade later" and even tday its cncepts are nt well understd# /he varius recrd mdels gave the designer a way ! presenting t the user nt nly the recrd layut but als als the cnnectins between the data recrds# &n a sense allwing the designer t shw the user what data culd be accessed with what ther data# Determinatin ! recrd cntent hwever was nt addressed in any methdical manner# Data elements were cllect int recrds in a smewhat hapha2ard manner# /hat is there was n ratinale r predetermined reasn why ne data element was placed in the same recrd as anther# 3r was there any need t d s since the physical pinters between recrds prevented data n ne sub?ect !rm being cn!used with data abut anther" even at the ccurrence level# /he relatinal mdel hwever lac%ed these pinters and relied n lgic t assemble a cmplete set ! data !rm its tables# Because it was lgic driven (based upn mathematics) the ntin was prpsed that placement ! data elements in recrds culd als be guided by a set ! rules# &! !llwed" these rules wuld eliminate many ! the design mista%es which arse !rm the meaning ! data being inadvertently changed due t ttally unrelated changes# &t als set !rth rules which i! !llwed wuld arrange the data within the recrds and within the !iles mre lgically and mre cnsistently# 5reviusly data analysis" !ile and recrd designers" relied n intuitin and experience t cnstruct recrd layuts# As the design prgressed" data was mved !rm recrd t recrd" recrds were split and thers cmbined until the !inal mdel was pleasing" relatively e!!icient and satis!ied the prcessing needs ! the applicatin that needed the data that these mdels represented# 3rmali2atin !!ered the hpe that the prcess ! recrd layut" and thus mdel develpment culd be mre prcedurally driven" mre rule driven such that relatively inexperienced users culd als participate in the prcess# &t was als hped that these rules wuld als assist the experienced designer and eliminate sme ! the iteratins" and thus ma%e the prcess mre e!!icient# /he !irst rule ! nrmali2atin was that data shuld depend (r be cllected) by %ey# /hat is" data shuld be rgani2ed by sub?ect" as ppsed t previus methds which cllected data by applicatin r system# /his ntin was bvius t hierarchic mdel users" whse mdels inherently !llwed this principle" but was smewhat !reign and nvel t netwr% mdel develpers where the aggregatin ! data abut a data sub?ect was nt as cmmnplace# /his ntin ! sub?ect rgani2ed data led t the develpment ! nn(DBMS riented data mdels# The &ntit#-,elationship +odel While the recrd data mdels served many purpses !r the system designers" these mdels had little meaning r relevance t the users cmmunity# Mrever" much ! the in!rmatin the users needed t evaluate the e!!ectiveness ! the design was missing# Several alternative data mdel !rmats were intrduced t !ill this vid# /hese mdels attempted t mdel data in a di!!erent manner# $ather than l% at data !rm a recrd perspective" they began t l% at the entities r sub?ects abut which data was being cllected and maintained# /hey als reali2ed that the the relatinship between these data sub?ects was als an area that needed t be mdeled and sub?ected t user scrutiny# /hese relatinships were imprtant because in may respects they re!lected the business rules under which the !irm perated# /his mdeling ! relatinships was particularly imprtant when relatinal data management systems were being used because the relatinship between the data tables was nt explicitly stated" and the design team re)uired sme methd !r describing thse relatinships t the user# As we shall see later n" the Entity($elatinship mdel has ne ther imprtant advantage# &n as much as it is nn(DBMS speci!ic" and is in !act nt a DBMS mdel at all" data mdels can be develped by the design team withut !irst having t ma%e a chice as t which DBMS t use# &n thse !irms where multiple data management systems are bth in use and available" this is a critical advantage in the design prcess#