DBMS Unit 1 notes

You might also like

Download as pdf
Download as pdf
You are on page 1of 27
UNIT - 4. Database Syste = Oo) delabose Sa an organized colle clon ov date , 4 alo electronically dn a compuler ayston. 0b wally cbt by Dalaba Moagimel_ dn (DoS Ty Daobascs va 0 Fe tn velationa) dlstabare are 0 ant zed on & O Relational databases Boe of ables waite rae » One whi debeban + Yb wmists duo or more files located tn differed @ Dishibued AES ate hats ee be alortel a multiple scnpuibe lncaked dn Yan dance physical location, ov auttored uw difgusnt natuorks: 4 Atinclind Sdormalion File tee — Ome & bast amonging. You flea at alow medium jire Ka ails. i a8 “or © Digrud fils one grouped wo divecbvies . Mastin file Directory Shim OO ied Se ee ee ee ane eae ee der Airing waiving. the, dade.“ ffectively whur its © Provides aetuni mmesaurss per proteding- te late frou. unauthorized acer, ore ewer Aebabona) ee y SAL ( Atinetined Query Languog’) guesies ond OL abo promicles mechouiamd fr dete recom Ye etn bark up. ad wD Database , ppc hams DBotebanc] Q Differnce blo file System bn SBME | @ Orgauiros ste files te | © Manages we : a prope meditem within a comprtex eee Oa care ae pesadk aed O Ne qpidiosk que procening- mak, O low Co! O More dab consistency because © leu Complee Ha procs af mor zoho Q les security © More complex © Lew expensive O More. Aecurity, © No date Jinclependeuce Rita coat i b uidlepunderce ohh le Bases oSye tine se se a De eg be eran ali "Sot fe Se Es > a pee rie i C4. ep. oa 4 “he cn » aa Mm format pli cotton qm wi problems @: The, ne constrict repemly Type. Y, Opa (DBA) > Ya aelema.. Te vente. mao account TE wo sa person] team who oletines ee need to acces dhe olatabase . ” wratble for provicling _tucutily. bo he allows adel fies 1 css moat ere © Monitors Ys aaa Ja Pethnien) dupport © Repairs chamages due Lo horduoan, bj oF flare. © Tag dowt deus amy SBMS Hauorrladg but frequently ues He DB appllieatiows din dlanly bie Ex- Roilusoay’s ticket Beckie Users , : 6 Ag No Mirage obustee /Neuo dabestincian / dijjaoel’ anes melo d/ Mange un Atlin of the dedober, a °*** + eee 4 Codd's Rule of logical Data ee opal Wl OR uw. ee be obbe to se ae oa pe i a tay ibid Onn of * of 2d Table 0 objut "> Employer , Deputmec Or wobam eash a é or veot. | pout opie ei ated on parul—elbild selatiovali} O Pat attebd de haul mall hill but wl wa Js wot pouible . Acaloble o a sua Hetrarelial model . ntti sali AE a. Miratchiol. ue wth. x graph ihe dhu © Tae. exalt do Uooieal associabions bho the fe. , a Paes fete eel om but parent ° Lawl 0/Ownet Level 4.) Dwsner Mumbo Level 2] Member Extily. ¢ ert, claws , ov plate Oy itll aa r @ Attiibucte ': Used to desea rr Feline is wed te epresent i oe Relationsliip : Vaed to describe te polation blw enti : ® pein or came Wee Ganoads we relationalaps Databane Tateuce : OUb containa a dnapilot of Yr datahare [Toe dilution whee 0 data ov info ws Aloreol dn Phe at a pariicular onomust | bent &- 2 lac le Ceo ree ne eer ee meee EO eae mai tom be ued t stad, dtsre, bo update. oats ODD (Deka Definition 2 lao pli. > vied to cust selumo , tbls , Suolsxts , Comtrade be dn He databote . ed nar i rea a eas aaa “bls be Auhsrwos , Yori 1 dindens) cpbaumns Sun each tablee , worattrauti ce. OCreaki > to vate obj tn dB. eLearn ctiuchun a DB Drvp > ‘to delete objects from 4 Tine froin te beh. @pmv (dake Manipulation 2 Used for acceding aud qranipula PEE hebdles vir Prequesis Olaat > Uud te iat data Lito a sable. © update > ured to update, exutvy. data within a table. Oyebehe > used to delete abl records rom a phe. O® Der (bet Coubhof fgg > Yad to ee or saved lata. > Te hes ‘rollback parenelirs . Diets ce et oe ; to a dalabore. ) ~ Vaed to jpke Back peymissions ose QCL (Tromachon Conttol Laugusges) ste dee Abatement . > Vaed fo Tu ta Changer rane, ie database OGmmit + sour Ya transaction ox © Rollback > ured to resbre ta database te orlginal ace a lout, commil O©HGc (Deke Lavguage) 7 Vad Pe tueo’ ond Auman relatib bared on te yey posed to ik. © febeck > Vid to yhiewe oot from Yon DB. BO pie bw debe Detabare Lit OA dems stepfce a WK aes Brake abloreg Pe on tb Sopuke aa a ae ema 1 jenu-Based Interfaces for Web Clients or Browsing - These interfaces present the user with lists of options (called menus) that lead the user through the formation of a request. Basic advantage of using menus is that they removes the tension of remembering specific commands and syntax of any query language. Ex > Run ! 2, Forms-Based Interfaces — A forms-based interface displays a form to each user. Users can fill out all of the form entries to insert new data, or they can fill out only certain entries, in which case the DBMS will redeem same type of data for other remaining entries. These types of forms are usually designed or created and programmed for the users that have no expertise in operating system Er- SOL* forms 3. Graphical User Interface - AGUI typically displays a schema to the user in diagrammatic form. The user then can specify a query by manipulating the diagram Natural language Interfaces - 3 Vie. bath. MuevAt be fooms These interfaces accept request written in English or some other language and attempt to understand them. A Natural language interface has its own schema, which is similar to the “Meads conceptual schema as wellas a dictionary of i tant words. Nt t 5 speech Input and Output - advounee - There is limited use of speech be it for a query or an answer toa question or beinga result of a request it is becoming commonplace. Applications with limited vocabularies such as inquiries for telephone directory, flight arrival/departure, and bank account information are allowed speech for input and output to enable ordinary folks to access this information. 6. Interfaces for DBA- Most database system contains privileged commands that can be used only by the DBA's staff. These include commands for creating accounts, setting system ca parameters, granting account authorization, changing a schema, reorganizing the storage structures of a databases. ER Moacel OL defies due oncipial view a chatabere. OF works crowd real wolh udibics be aneoefations tem. . d Ode utw Jew, Han ER mode iy contedusd a. good optic © Entity, > Real wold objec Hab eam be carily iduutifioble. @Budil ae dilar typa 4 Poe Exod School Datta oo chers ms ne > ut ; ee ea ye dee thus | i no oa ele. A stadt Sut > toubain, A Moe Mtl af a school. L Gatily aur w Eu Le nerd mot be disjoint @ ADs b Se > Lidilta ox ys eubed anil OR projet toed Batbdde 4 4 OAL athibules have some values . yy athisules 7 O Ample obbTbube > Howe. abomie. volus- je ib cannot be divided fuller. i Olompostte abhtaube> robe of Cue Oh mole aWudult ODaitud alttibule > ay oo rab exist tin plapicel dbetabase. bul Hair ee doviiued fron our oltiihula ° ua uA Hl ® volize + coulthos Sip volue. ©Mubbivelued olfitbube > Conbatd mow ton pur volure. eid myer ble abd usb Dowdle Lier § digo cud dob Peake jee mubtfveluad ho og PH (aticbak ton hase. cae bey phome wo. bh emaib Idi ; SE ann ing osc a vusiquily dail an collect Og? 8a ati Coe a PCAN D be NULL d Aladunt ( Sid, Srame , Be id Sid Srome Aupe, hey gid Sid ee Aye i intenal i ardidale ® Cudidale aan mint ee ee hee # cA + beaded: agen Sy) Sid > Gndflad + Enrol (Sid , hd fee) Sid CIA > (oudidate ey. be nm pies Cotte © Paimarg hy fess, ab e Bene qe DB Shida Aid, thon a eee not) Oa ae candidate sebti~ exept prt : oe ek ce i ar © Mo Yan aut Obewnett hap Astras CREATE theLe Emp (Eid Varchan (10) PRIMARY KEY, Eneme Varehor (30), ‘ Pour Td Varchor (10) UNIQUE Bema by Codiolade Bank Varchar (10), by. Aw no Tabeger (29), VINNIQUE (Bank , Acco) ° Stideuk (Aid Snoma dye) Esl (Sil Cid fer) © Vied to olercrthe the. rebstion hho entities. sl O Diamond o rhombus ts used “in suprs cu Ye relationship. O Tend poticipabin.— Lar entiy i trust un rebabonehip . a oat aio ie a ee ane sauobued in tre relbiorship :

Any aliclust must earn ieee rcs weal at lat ami. gsc, Mt aw ue Ona iS oe Courses Gensall je Teak Rekiipaion 9 Pe i cipdibe enwrali zatiou Ow « prope te witch a me adi Ls framed a alt toutes tw Ha ods ecto abit OGha - doum. ach. © Cppaaitz oy Gucllnaill O om. higlas bel entity com be brohin clown. indo Jo Ina Deut entities . rane 9 ALE Dak shored some © Vand te dolendity ton dubs af orm ee ane Gmploge Pie he Apetelination Tes [Dorelo per pouak Eri Shong athibile , OD da on “end wb Hol dae wot hou Suit! > 4 tad , CIA alhi dul for ee areal eee ane Jeords. ite ite OT contain’ » portinl buy alled aise’ rnakor which helps in, identity aoe eat of endities ee Ofankial kay is represedted by ails (al a dashed Line, 4 & Rea a Sto sacl Q ER Diagn 5 > Rabson j Fadia) Kay > nan vA roy moving many otlnr ele . A sslapuronr os tWoun eulg ove" Aales peopl . A doles om apm mong a a A managed a) At haa ceca ac d be - der Lis be (order) tan be p been le wd ooh numbled jute inven Qe Dru ER i af unity, dB opplosion conscbeng He (oustiainds A wntvarss has many aoe i eaiea a eg a Hop) (a saglinal ayes me oli oa couibes, arava dough by a Aiigh v x (coutues) ees 1A ata wnt ny ae if Que 1.19. | Draw an ER diagram for a small marketing company database, assuming your own data requirements. AKTU 2016-17, Marks 7.5 Answer 2001S Goryeuryu0.) paseysand sionposg, Buddrys) quauseg aereay, ypnporg =. aes a) SED Fig.1.19.1. Que 1.20. | A university registrar’s office maintains data about the following entities (a) courses, including number, title, credits, syllabus and prerequisites; (b) course offerings, including course Introduction 1-20 A (CS/IT-Sem-5) number, year, semester section number, instructor(s), timings and classroom; (c) students, including student-id, name and program; and (d) instructors, including identification number, name department and title. Further the enrollment of students in courses and grades awarded to students in each course they are enrolled for must be appropriately modeled. Construct an ER diagram for the registrar’s office. Document all assumption that you make about the mapping constraints. AKTU 2015-16, Marks 10 Answer In this ER diagram, the main entity sets are student, course, course offering and instructor. The entity set course offering is a weak entity set dependent on course. The assumptions made are : a. Aclass meets only at one particular place and time. This ER diagram cannot model a class meeting at different places at different times. b. There is no guarantee that the database does not have two classes meeting at the same place and time. prerequisit® course title) imaincounse Fig. 1.20.1, ER diagram for University. th Reduction of ER diagram to Table . =e aim = => Count) em ‘STUDEI Teaches Ry HAS u > : LECTURER qf Teaches: 7 SUBJECTS syasecto > eae saat a Sludeut_tol . Cane Sis vlad Aiba —, ee ie a Composite. GMO buls > repreauted by Colemn Daiwd Miiduls > Nob Gustolued Abo ne ces errs lueok- byt’ Separate aa X - prinony M4 ad column eee ae Hong vit -) STUDENT LECTURER SUBJECT STUDENT_IO LECTURER_ID SUBJECT_ID — STUDENT_NAME LECTURER_NAME SUBJECT_NAME DoB COURSE_ID LECTURER _ID DOOR # cat STREET { CITY STATE COURSE Pm tL counseae COURSE_ID _ STUD_HOBBY +] stuent_o HOBBY H Exlinded ER Mode EER is a high-level data model that incorporates the extensions to the criginal ER model. Enhanced ERD are high level models that represent Category or Union the requirements and complexities of complex databace, Inaction to ER adel concepts EE-R includes ~ ealiee These concepts are used to create EE-R diagrams. |.> Subclasses and Super cassos. > Specialization and Generatztion Bee Category or union type. Y.* Aorecaton ubclasses and Super class Super class isan entity that can be divided into further subtype, For example — consider Shape super class. ‘SHAPE ‘SQUARE cRGE TRIANGLE ‘Super class shape has sub groups: Triangle, Square and Circle. ‘Sub classes are the group of entities with some unique attributes. Sub lass inherits the properties and attributes from super class. {elationship of one super or sub class with more than one super class. (were 7] ‘Owner is the subset of two super class: Vehicle and House. UML UML (Unified Modeling Language) is a general-purpose, graphical modeling language in the field of Software Engineering. UML is used to specify, visualize, construct, and document the artifacts (major elements) of the software system Goals of UML © Since it is a general-purpose modeling language, it can be utilized by all the modelers. © UML came into existence after the introduction of object-oriented concepts to systemize and consolidate the object-oriented development, due to the absence of standard methods at that time. © The UML diagrams are made for business users, developers, ordinary people, or anyone who is looking forward to understand the system, such that the system can be software or non-software. © Thus it can be concluded that the UML is a simple modeling approach that is used to model all the practical systems. The diagrams are the graphical implementation of the models that incorporate symbols and text. Each symbol has a different meaning in the context of the UML diagram. There are thirteen different types of UML diagrams that are available in UML 2.0, such that each diagram has its own set of a symbol. And each diagram manifests a different dimension, perspective, and view of the system. UML diagrams are classified into three categories that are given below: h, { L t eaten g-6 dingams 3. Interaction Diagram for exam purpose Structural Diagram: It represents the static view of a system by portraying the structure of system. It shows several objects residing in the system. Following are the structural diagrams given below: © Class diagram —> Tae © Object diagram —* © Package diagram © Component diagram © Deployment diagram Behavioral Diagram: It depicts the behavioral features of a system. It deals with dynamic parts of the system, It encompasses the following diagrams: © Activity diagram —> Cla © State machine diagram © Use case diagram ——> Dep Interaction diagram: It is a subset of behavioral diagrams. It depicts the interaction between two objects and the data flow between them. Following are the several interaction diagrams in UML: © Timing diagram > Dep © Sequence diagram —> yp « Colleton Gace 1. Structural Diagrams Structural diagrams depict a static view or structure of a system. It is widely used in the documentation of software architecture. It embraces class diagrams, composite structure diagrams, component diagrams, deployment diagrams, object diagrams, and package diagrams. It presents an outline for the system. It stresses the elements to be present that are to be modeled. © Class Diagram: Class diagrams are one of the most widely used diagrams. Itis the backbone of all the object-oriented software systems. It depicts the static structure of the system. It displays the system's class, attributes, and methods. It is helpful in recognizing the relation between different objects as well as classes. ‘© Composite Structure Diagram: The composite structure diagrams show parts within the class. It displays the relationship between the parts and their configuration that ascertain the behavior of the class. It makes full use of ports, parts, and connectors to portray the internal structure of a structured classifier. It is similar to class diagrams, just the fact it represents individual parts in a detailed manner when compared with class diagrams. © Object Diagram: It describes the static structure of a system at a particular point in time. It can be used to test the accuracy of class diagrams. It represents distinct relationship between them at a time. stances of classes and the ‘© Component Diagram: It portrays the organization of the physical components within the system. It is used for modeling execution details. it determines whether the desired functional requirements have been considered by the planned development or not, as it depicts the structural relationships between the elements of a software system. © Deployment Diagram: It presents the system's software and its hardware by telling what the existing physical components are and what software components are running on them. It produces information about system software. It is incorporated whenever software is used, distributed, or deployed across multiple machines with dissimilar configurations. © Package Diagram: It is used to illustrate how the packages and their elements are organized. It shows the dependencies between distinct packages. It manages UML diagrams by making it easily understandable. It is used for organizing the class and use case diagrams. 2. Behavioral Diagrams: Behavioral diagrams portray a dynamic view of a system or the behavior of a system, which describes the functioning of the system. It includes use case diagrams, state diagrams, and activity diagrams. It defines the interaction within the system. © State Machine Diagram: It is a behavioral diagram. it portrays the system's behavior utilizing finite state transitions. It is also known as the State-charts diagram. It models the dynamic behavior of a class in response to external stimuli © Activity Diagram: It models the flow of control from one activity to the other. With the help of an activity diagram, we can model sequential and concurrent activities. It visually depicts the workflow as well as what causes an event to occur. © Use Case Diagram: It represents the functionality of a system by utilizing actors and use cases. It encapsulates the functional requirement of a system and its association with actors. It portrays the use case view of a system. 3. Interaction Diagrams Interaction diagrams are a subclass of behavioral diagrams that give emphasis to object interactions and also depicts the flow between various use case elements of a system. In simple words, it shows how objects interact with each other and how the data flows within them. It consists of communication, interaction overview, sequence, and timing diagrams. © Sequence Diagram: It shows the interactions between the objects in terms of messages exchanged over time. It delineates in what order and how the object functions are in a system, © Communication Diagram: It shows the interchange of sequence messages between the objects. It focuses on objects and their relations. It describes the static and dynamic behavior of a system. ©. Timing Diagram: It is a special kind of sequence diagram used to depict the object's behavior over a specific period of time. It governs the change in state and object behavior by showing the time and duration constraints. © Interaction Overview diagram: It is a mixture of activity and sequence diagram that depicts a sequence of actions to simplify the complex interactions into simple interactions. pNit- 4 Long

You might also like