2 - 1 Copyright © 2012 Robinson College of Business, Georgia State University David S. McDonald Director of Emerging Technologies Tel: 404-413-7368; e-mail: [email protected] CIS 8040 – DBMS ConceptS Modeling and Basics Outline Data Models DBMS Basics ANSI/SPARC Architecture Data Independence Centralized/Distributed DBMS2 - 2 Copyright © 2012 Robinson College of Business, Georgia State University David S. McDonald Director of Emerging Technologies Tel: 404-413-7368; e-mail: [email protected] Data Models Formal representation for describing Entities -- An object, concept or an event about which the org. chooses to collect and store information about Relationships -- Associations among data Operations -- Activities involved Integrity constraints -- Data integrity and business rules Data model classification in a DB Physical data model Deals with physical storage and access Conceptual data model Deals with conceptual structure and access Logical data models One step away from products created based on these models DBMS - Basics Database schema (Definition): Description of the structure of a database Organization of application data in a database Database state: Data values stored in a database at a specific point of time. Changes over time (How?) Database languages Data definition language (DDL) -- Defines the database schema Data manipulation language (DML) Creates, deletes, modifies, and retrieves data in application programs Data query language (e.g. SQL) -- For users to retrieve data2 - 3 Copyright © 2012 Robinson College of Business, Georgia State University David S. McDonald Director of Emerging Technologies Tel: 404-413-7368; e-mail: [email protected] Data Dependence Search ( name-asked : char[30] ); s : Student-Record; . . . Begin open ( student-file ); while not end of file do begin read-a-record ( s ); if s.name = name-asked then begin print ( s ); stop; end; end; print ( "No such a student." ); End. John, 3/21/70, . . . Peter, 6/2/78, . . . Lisa, 8/11/73, . . . Tom, 9/21/70, . . . Linda, 11/2/71, . . . Bill, 6/2/76, . . . Data Dependence... Search ( name-asked : char[30] ); root-record : student-record; begin root-record := root record; Find-It (name-asked, root-record ); end. Find-It ( name-asked : char[30]; root : student-record ); begin if root = null then begin print ( "No such a student." ); stop; end; if root.name = name-asked then begin print( root ); stop; end else if root.name < name-asked then find-it ( name-asked, root.left ); else find-it ( name-asked, root.right ); end. John, . . . Lisa, . . . Peter, . . . Tom, . . . Linda, . . . Bill, . . .2 - 4 Copyright © 2012 Robinson College of Business, Georgia State University David S. McDonald Director of Emerging Technologies Tel: 404-413-7368; e-mail: [email protected] Data Independence WHY do we have to modify our program after the data structure is changed? Data Independence: The capability to change the lower level structure of data without having to change the application programs at the next higher level. ANSI/SPARC Architecture View ( User 1 ) View ( User 2 ) View ( User N )Internal LevelExternal LevelConceptual LevelInternal SchemalConceptual SchemaPhysical Data OrganizationMapping Mapping Mapping Student(SID, Name, Address) Instructor(Emp#, Name, Address, Rank, Dept)2 - 5 Copyright © 2012 Robinson College of Business, Georgia State University David S. McDonald Director of Emerging Technologies Tel: 404-413-7368; e-mail: [email protected] Three Schema Levels Internal level (schema) Describes the physical storage structure and access paths Uses a physical data model Conceptual level (schema) Describes the logical structure and access paths of the whole database Hides the physical storage structure and access paths from the user Uses a conceptual data model External level (schema) Describes individual user views An external view is a part of the DB Typically uses a logical data model ANSI/SPARC Architecture... Data independence is achieved by inter-level mappings… Queries are translated between levels automatically Physical data independence Refers to immunity of conceptual schema to changes in the internal schema. Internal schema changes (e.g. using different file organizations, storage structures/devices). Should not require change to conceptual or external schemas. Logical data independence Refers to immunity of external schemas to changes in conceptual schema. Conceptual schema changes (e.g. addition/removal of entities). Should not require changes to external schema or rewrites of application programs2 - 6 Copyright © 2012 Robinson College of Business, Georgia State University David S. McDonald Director of Emerging Technologies Tel: 404-413-7368; e-mail: [email protected] Centralized DB Systems DatabaseDBMS Distributed DB Systems DatabaseData Manager Transaction Manager DatabaseData Manager Transaction Manager DatabaseData Manager Transaction Manager DBMS2 - 7 Copyright © 2012 Robinson College of Business, Georgia State University David S. McDonald Director of Emerging Technologies Tel: 404-413-7368; e-mail: [email protected] Client/Server DB Systems Server Internet Client DatabaseDBMS Internet Client Internet
View Full Document