Download as pdf
Download as pdf
You are on page 1of 24
cCOm 1302 Database Management Systems Ln troduction to Database Systems Data «ok representation of facts, concepts or Instructions tn a formaltsed manner suttable for communtcation, interpretation or processing by human betngs or by automatic means + Raw dota which 1S unprocessed text | coloulS, symbols, shapes eek Etc. or Other factS and figures are _datasuitable for processing | Egi- Person or Employee Customer Nome address, phone, dob, designation Information - Knoweledge derived from data : Processed or organized { dato Egi- Process DOB 5 Age or summarised ProcesS Salary —» Wigest paid employee Why we use Database ? We can keep track of a collection is to create database Why database Technology ? The need to manipulate large collection Of data tor Frequent used data queries ang Yeports, Equa collednions soGea meet T 4 O° Ibrary Books | Examples for Database A Vcations. OO s34>$eae Aplications. 9 Purchase from the Super market D Purchase using your credit card. 3) Booking a holiday Cticuer hotel) 4) Using internet 5) Studying at University The solu tion ee 5 Unique and centratised admintstration o4 data in a given company | Whot 1s 0 Database ? Ai database ta. qscotertiop.ot related data *. It feprentS some aapects of the real world © TH £3 a coherent colection of data © TH 18 designed Cor specific purpose and intended users » 4 an bE varuin Size and complextt c 4 J Tt can be generated maintain mannuatly Types of Database Applications © Traditiona) Applications - - merical and Textual Database © Recent Application pay e “Hultimedia Databases - a +__Geographic To formation mer stem is (G38) Data ware house = * Real-time active databese _ _ | ee ed _ Some part of the real world about which data ip Sabobete (57 _and transcripts at @ Uni tore _\v “Student gre 1 , Database Managemen t System vt to factlitate A software package / system _the creation and maintarnance of a computerized database. 7 a Database System ‘ _| The DBMS software Fogether nity data itself Sometime the application ore also included Database Systeno = ~ | Appiication - t 9 | programs Stored e DBMS Databa s- S| Appiication Dehoitioy D 2 ograrn > #b e to 3 t 4a") Ef Progra Softwar Software to | Cmetadata’ ——_} process Access — 2 Applicaton. quiries Stored data Stored a 4 | pro gran Database Components of Database System Environmen Hard ware 5 Machine Sottwore ; Data 7 Bridge “Procedure 4 Buman People Hacd ware Set of prysical devices resides. Can network sn Which databey ronge From o PC to of Com puters. a Software eure Database Managemens S yshero Seemating Sy stem OPP lication Programs |. \ User interface Datq \ Dote is used by the Organization and 7 description of she — data schema.’ Procedure Tostructions ond rules that should be applied to the design and use of the database . People Enrolled with didferend activities on database, Ty pi call gaMS metionals + ot) Defining paticuion database io terms af iis datatypes | gtructurS and constraints ConStructing or Joading the intial database contents on a secondasy Storage medium 5 Manipulating the database Ret rseval Querying 5 generading, reports Modi ficaton ! Tnsertons Deletions updates Accessing the — dasavase through Heb Dpplicuss + Processin ond Shar\n by 9 set of Concurreng Users and ap Pic atsoo Programs 2. Database System Concepts and Accht tecture OOD OECD S SSE A ae Dato Model A Set of concepts to &eScribe the structure ot a database the operations for manipulating these structures and certain constrains ¢ that the database Should Obey. Data Mode] Structure and Con s traints Construcis are used to define the daka base Struct. they are £Y Pically timed include elements aS well aS groups of elements egt- entity, record, table and relationship such groups Constraints specit some restrictions _ OM valid data. Must be enfosed at al) time Data Model Operations Operations are used for Specifying datas retrievals and updates by re Hering tO the constructs oF the data mode} @g:- 9 msert, delete, update and user defined -eperations. compute. Student =P Categories of Data Model Dd _ Physical Clow- level , internal) data models The concept 18 how data is Stored tn the computer. These ore usually spect fied in an ad-hoc manner through DBMS design and admintstration manuals, D Conceptual C high-level semantic) Thee concept that ore close to the wa many, user (perceive data C entity. - based 2 object based) 3) Implementation Crepresen tational ) Fall between the above two, many commeriedal DBMS eg'- relational data models used by implementations. Database § Sch ema the description of a database indluge Structure, datatypes the database. Schema Diagram and constraints oo An itustrative display of ( most aspect a +) Qa dotabase ~echema- Schema Construct A component of the schema oar an obyect with in the gchema, egt- Student, course + Instances : The actual ‘data stored in a, database ata partir moment in time, This includ es Ahe collection of all the data inthe datobas. + Also called database iagtonce eg'- veeord instance | table instance. State Database State Refers the contend of a database at moment in time Toitial Gatabase State When it ts \natally loaded into the Syste Nalid State, A state that saris fies the structure ond constraints oF the database. Schema Vs. State The database Sctheme chang es ver ty frequen ty C An tension) 3 The State chan: aes every Hime the databe, ts updated. nies Three Level Architecture = D use e+ of a catalog to store the database ges criptlon 2) Program - data independence _ Sermon OGIMNIp le Views or ive doe. 2 ~ Not ex plicity used a] S09 commercial DBMS ae Products | but Shas been useful in explaining database Systerm organization. _Detines DBMS Schemas at three levels DQ Internal schemas 7 At the interval level @o describe physical Storage structures and. accesS, path: | eg:- Indexes = 2) Conceptual schema a A+ the conceptual level describe the Structure and __conStraints for the database for a whole commun tig Of users 3) External schema PtH Extermal bevel describe the Various Views, user ct End Users External External Level View Conceptuc) ~ Level Tnterna) Level snserad )- xe Ex ternal View Schema Schema Stored @atabase Mapping mmong schema levels are needed ko tran S fovm reques tS and dbta. Program refers to an external scheme and are internal mapped by Schema for Dato extracted dron DMS revel ¢5 the users ex tema) the the vebormaetta to meteh) the DBMS to the execution interne) views, Data Independence D Logial Data Todependence _ i THe capacity to change the conceptual schema without | having to change the ex ternal schemas and their associated applicahion Progran _ D__ Physical Data Independence = = ihe: —capasity to Change the toternal | Schema__without having “change the conceptual _ schema, r 1 Pa. fet kewl aye may be changed wihen certain file Structure Gre wzeesq reorganized oy new ‘indexes are created _to improve’ databas e performance. ——-DAMS__Languages 8 thterface E D Data De Fini tion Lenguage CD) 9) Dota Man apa lation Language COn1) Data Definition Language : ODL ts used for Speci tying the database _ echema. In mapy DBMS, the DDL is also used to define ftnternal and external schemas Data Manipulation Longuage COML) + Used %0 Specify database redrtevals. .and updates DML commond det canbe general purpose Prog ramming Coser | Gee has, A NVbren Funetivg can also be provided 45 DEMS trom a preg ramming Language embedded in a language such as Qecess the + Stand alone DML commands con he SPP directly C called query language) igh -~ Level 9, Non ~ procedural Lenguaye r example, the S@L_ relational Language Also callad — geclarative languages low- Level or Procedural Language Retrieve data one record at oa time. DBMS totter faces : D. Stand- alone quer Language . toter faces SQL queries ot the ams in Fenactive SQL interfaces. D Programmer Toter faces for em bedding OML tn Bragramming language 3) User- friendiy Thterfoces Menu based form - based graphics — based etc Programmer In ter faces Embedded Approach :. Embedded car sat Co, Crt etc) » SALT for save Procedure gall Approach JDBC for Tava, OP BC for oiner progron" languages. Database Programming Lenguege Ppproach: Oracle has PL/SQL programming languege based on Sar. Janquage incorporates SQL and its data ty pes aS integral component, User-friendly Tn ter facey Menu - based Form based Graphics ~ based Natural Language Combination of the above DEMS Tnterfacos _ Speech as Inpus and Output Wel browses _ - Parametric woter faces eg: bank tellers Inter faces for the 989 creating user accounts granting authorization ' Setting system | porameiers MOMS Utsirties Programs that add functlona lity to your DMS or help your DSMS to perform better: Jo perform certeig fbunctions such as, DY _boading data stored to files into a daltabse D> Bacning up the database Periodically on tac a) Recon Re organizing database file structure D Re port geveration utilities 5) Per formance monitoring Udy Data dictdonary A Fepositor i Used to Store Schema descriptions Other information such as design APPlication Program descriptions | user usage, Standards ett decis * Ong ‘7 Formas; Active data dictdonary Tt is aceessed by DBMS sottware and users / gay Passive Data ictionar TM 18 accessed by “users / 986A only DEMS Architecture A rechi tecture — DOMS Architecture t- 4ter at cee noc Architecture Archt tecture Arch latier Archi tecture * The datohase to the user. " Any changes done by the user will Atrectly be done on the database itself + The \- archi tecture : development 04 the local Programmer can direct database fa, will be directly avai lable Tier 1S used for the app lication, where Ccommurmicate with the a quick Yespons e. a2- Ther Archi tecture Same as asic client - server, Database at the server side. OM 6¢, 3DBc Will create the connection The userfoce interface and application programy are run on the cltent Side. The cerver Side %4 responsible to provide the functionalities like = query processing and transaction management To communicate with the O8MS cient side application establishes a-connectioo with the ss server side Database Systen - GerveY > OY 3 - tier Archi tecture ie “This contairS ano ther layer between the Client and the server, The cliert 58 reeds communi Cate mith the server. L S cumeal ve! application On the client- end 1 teres with on Opplication server which further Communicate wi the the database sygtem. e End user has nO tdeqd avau} The existe, of the database bey ond the applicaton Server <0 The.cse +ter archi tecture 's used ty case of large web application. Application Server Server Client e Data Modelling Using Entity _ Relationship Database Design Process D_ Requirement onaly sis 2) Conceptual 2 database design 3) choosing Deus 4) Logteal Design 5) 9 Requtrement Gathering and Analysis Purpose -~ To document the data requirement of the user. Functional Requirement - Are the operation s that will be applied to the database, including queries and update. Conceptual Design Two Parallel activities )_ Schema Design DQ Transaction estan Conceptal Scheme Design \6ok at the data requiremen tS resulting Srom the analysts and Produce a concep tual Schema jo BMS, _ Transaction Design Pur pose a to produce a design of the transactiong that will Tun on the dototas, Yetrieval . vetrieve dota tor display. Or 14%; Part; at ° Yeport. update + enter new dato or amend exits tlag data mixed : more complex applications 80, do both retrieval and update” why 2 a need to be sure to include {0 the conceptual schema all to forma ti 20 required by transaction s i Relative importance . and Frequenc of ue of transactions well ipiblun nce Physical database destgn. ~The ‘sottwore needs tO be destgned a met! a3 the dota 3. Choosing og DMS Purpose = @ectding the best framework For implementing ke the produced chen choice made on the basis of Technical factor The BMS has to support the yequired task. 4 Economte Factor ] Goftware acquisition / maintain once, hard ware acquisttion , creation / conversion , training of staff | Organizatton Factor plat form supported , avotlobility of vendor Services. Legical Design to transform the genertc, DBMS indepen dent |_conceptual schema’ ts the gata model o+ “the choosen M3 Cdata model mapping) , Two stages * | + System wndependen t mapping» No consfderation ot any spectf#rc charactertstic that may apply to: ‘the spect ttc DBMS package. (+ Ydy Totloring +o DEMS dtffierent DBMSs may implement the same data model i> slightly different ways. vesult ¢6 9 Set of Data Description Language CODE) statements i the language of the choosen DBMS, 3) ON Phystcal Destgo to choose tne specttic Storoge Structures gad aceess paths for the databage Cates. ~ attention to Performances Some relevant rt terias ' 2 response time ¢ may want tO minimize database Access ime for dota items reterenced by frequently used transactions, Space uti lations less Frequently used data and queries may archteved tran sactfon throughput : Average number of transactions that can be processed. per minute. Tmplementatiod To create the database. Comptie ond. execute mar statements Populote the datobase Manvally / Automatically C May need to comer data from previous formats) Implement Application ~ programs J Programs ore Written with em beddet QML Statements analysis and c Used _routicely for system __ design - : : Simple enough to learn and understand the. bastc concepts. Conceptual desig?S using the €R model are called ER schemas Entity - Relationship Model Concepts D Notations for ER Drogrom _ 2) Relationships 2 3) Entities and Artriputes , eo ~ _ The Ore spect Fic objects or thing s tn the mot - world that ore represen ted in the = oe. j — Eg'- EMPLOYEE Jono Gmitb | Atavibutes ¢ They _are properties used to describe an enti be Employee - Nome | S3N.. Address gex; 908 Tyree of AAdviwutes’, ‘) _Stmple Boch entity has o sing te atomic value Cor the attyibule: : ‘ eg'- SSN or sex a Composite - The attelpube may be Composed of several co PONEAK, address ( Ne, cy, zip code, Country) Eat- 3 Rlieme (CPs a mome. Cagtname) Mul4t valued Ao enkKty may hove for thot — attribute Eg! - Color of a Car Telephore number mult! ple. values Entity Types and Key Attributes Eotittes with the game basic Ot4+ ri buts are grouped or typed 19to an entity ty pe: Employee - SSN of employee . Runique value = key ott, A Mey ottvibute may be composite License plate number ¢6 a key OF the Cor entity type: eelhe com entity tyPe may heave two nena VIN Eidenge| (Giole number “Calumbe; prove) J Boch key {8 undet lined. composite multi-value. peouej = seus = — - Each ent type will have a collection of entives otore in the OB called cok tty sets Relattonshies —— . The intial design is typically ‘nor complete _ Some aSpec*S to the reg will be represented oS relationships | | +) A relattomshyp relates 400 or more dis tinct __ entities with a gpecific ae ees Hh : Relationships of the ee type are grouped or ty ped into O rela torship ty Pe: The degree of @ relationship type is ‘the number of participating entity types ___ Both Manages aed / WoRXS om are btaary + relationships, | Week Lotity Tyees | 44 thot + ve A ki + An entity oF does no have ey _ attribute A week entisy rus + Par tictpate io an __Adeoti ing re latton ship, type with an owner or iden Fy ing aa) type . Enrities ore \dentist ed by the cor binatoO oF : ® parttetal key of the vieok sents type The poticular enrtt they ore relate tO to he ‘dent’ bying ently ryPe OY Congtroing $s Cord inalit SPec! Fes axl mun porticipation, TONO COnSp¥aly . Roatto also | Soe to one CVD, one - to - mony Crain) Mary to - many Cen) Ex iStence DePendenc Spect sies mioalmans participation, Cc Portid Patten constraint oO. 2erO Coptional par tip adi on) one or mor ie mandatory POrtclpad Constraint - ‘0n) Attributes ‘ Relationship types A: ¥ela Honship type For example |. M45 value for de Scribes of can House Per Week eouh Tebation ship the num be ot thot an EMP loyee orks A yalue of Patteular Mos+ M:N hove Ottributes of Works _on inS tance hours, ana House Per Week: Cemployee > Pros ect’) relationship aleribures relationships One ee cd relation ships, the can be drans ferred fo the anti eh ee oo ene WN atde o+ the *elador Ship- per week Prosect - depends On a combination Ore used. wil)

You might also like