1 / 20

Introduction to Database Systems Fundamental Concepts

Introduction to Database Systems Fundamental Concepts. Irvanizam Zamanhuri, M.Sc Computer Science Study Program Syiah Kuala University Website: http://www.informatika.unsyiah.ac.id Email: irvanizam.zamanhuri@informatika.unsyiah.ac.id. Users/Programmers. Database System.

Download Presentation

Introduction to Database Systems Fundamental Concepts

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Database SystemsFundamental Concepts Irvanizam Zamanhuri, M.Sc Computer Science Study Program Syiah Kuala University Website: http://www.informatika.unsyiah.ac.id Email: irvanizam.zamanhuri@informatika.unsyiah.ac.id

  2. Users/Programmers Database System Queries / Application Programs DBMS Software Software to Process Queries / Programs Software to Access Stored Data Stored Database Definition Stored Database (Metadata) A DBMS Presents Programmers and Users with a Simplified Environment “Catalogue”, “Data dictionary”

  3. Schema A formal definition that fixes all the relevant features of those parts of the real world that are of interest to the users of the database The schema of a db is held in the data dictionary Data Model A set of concepts that can be used to describe the structure of a database: the data types, relationships, constraints, semantics and operational behaviour Hides details of data storage Data Model, Schema and Instance Student(studno,name,address) Course(courseno,lecturer) Student(123,Bloggs,Bolzano) Course(CS321,Franconi) Schema (in relational data model) Instance

  4. ADDER CPU A FA Adder ALU ADDER Other Data Models Relational model is good for: Large amounts of data  simple operations Navigate among small number of relations/tables Difficult Applications for relational model: • VLSI Design (CAD in general) • CASE • Graphical Data • Bill of materials, transitive closure ALU

  5. Object Data Models Where number of “relations” is large, relationships are complex • Object Data Model • “Knowledge Data Model” (= Objects + Deductive Rules) OBJECT DATA MODEL 1. Complex Objects – Nested Structure (pointers or references) 2. Encapsulation, set of methods/access functions 3. Object Identity 4. Inheritance – Defining new classes like old classes Object model: usually find objects via explicit navigation Also query language in some systems

  6. Data Models 60’s 70's 80's 90’s now Hierarchical Network Relational Choice for most new applications Object Bases Knowledge Bases

  7. Sharing—Multiple views of data Database Management System Database

  8. Characteristics of the DB Approach • Insulation of programs and data • Support of multipleuser views • Use of a catalogue to store the schema  How can we realise these principles?

  9. View 1 View 2 View 3 Conceptual Schema Physical Schema Three Levels of Abstraction ANSI/SPARC architecture for DBMSs (1978): • Manyexternalviews • Oneconceptual(= logical) schema • Onephysical(= internal) schema • Views describe how users see the data • Conceptual schema defines logical structure • Physical schema describes the files and indexes used mappings mapping

  10. Data Independence New functions New Change in hardware use New users New data Database User's view Change in New storage technology Linkage to other techniques databases • Logical data independence • change the conceptual schema without having to change the external schemas • Physical data independence • change the internal schema without having to change the conceptual schema Change the mapping, not the schema!

  11. Database Languages • Data Definition Language (DDL) • Commands for setting up schema of database • Process of designing schema can be complex, may use design methodology and/or tool • Data Manipulation Language (DML) • Commands to manipulate data in database: RETRIEVE, INSERT, DELETE, MODIFY • Also called “query language”

  12. Host Languages C, C++, Fortran, Lisp, Java, Perl, … Application prog. Host language is completely general (Turing complete) but gives you no support Query language—less general “non procedural” and optimizable DBMS Calls to DB Local Vars (Memory) (Storage)

  13. Building an Application with a DBMS • Requirements gathering (natural language, pictures) • Requirements modeling (conceptual data model, ER) • Decide what entities should be part of the application and how they should be related • Schema design and implementation • Decide on a set of tables, attributes • Create the tables in the database system • Populate database (insert records/tuples) • Write application programs using the DBMS • … way easier now that the data management is taken care of

  14. Conceptual Modeling name category name cid ssn Takes Course Student quarter Advises Teaches Professor name faculty office

  15. Schema Design and Implementation • Tables: • Separates the logical view from the physical view of the data. Student: Takes: Course:

  16. Querying a Database • “Find all courses that Mary takes” • S(tructured) Q(uery) L(anguage) • Query processor figures out how to answer the query efficiently select C.namefrom Student S, Takes T, Course Cwhere S.name=“Mary” and S.ssn = T.ssn and T.cid = C.cid

  17. sname cid=cid sid=sid name=“Mary” Course Takes Student Query Optimization Goal: Declarative SQL query Imperative query execution plan select C.name from Student S, Takes T, Course C where S.name=“Mary” and S.ssn = T.ssn and T.cid = C.cid Plan:Tree of relational algebra operators, choice of algorithm at each operator Ideally: Want to find best plan. Practically: Avoid worst plans!

  18. Traditional and NovelData Management Issues • Traditional Data Management: • relational data for enterprise applications • storage • query processing/optimization • transaction processing • Novel Data Management: • Integration of data from multiple databases, warehousing • Data management for decision support, data mining • Exchange of data on the web: XML

  19. Database Industry • Relational databases are a great success of theoretical ideas • Big DBMS companies are among the largest software companies in the world • Oracle • IBM (with DB2) • Microsoft (with SQL Server, Microsoft Access) • Sybase • $20B industry

  20. Databases as a Research Area • Several aspects: • Modeling and design of databases • Database programming: querying and update operations • Database implementation • The study of databases cuts across many fields of Computer Science: • Operating systems • Formal languages • Artificial intelligence • Logic • Multimedia • Theoretical CS

More Related