1 / 37

Chapter 1

Chapter 1. Database Concepts. Chapter 1 &2 in Textbook. Database Concepts. Data is a meaningless static value. What does 3421 means? Information is the data you process in a manner that makes it meaningful. Information can be provided only if proper data exists.

stasia
Download Presentation

Chapter 1

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. Chapter 1 Database Concepts Chapter 1 &2 in Textbook Database Systems

  2. Database Concepts Data is a meaningless static value. What does 3421 means? Information is the data you process in a manner that makes it meaningful. Information can be provided only if proper data exists. A database (DB) is a collection of related persistent data. Can be generated & maintained manually or automatically Data is what you store in database. Information is what you retrieve from a database. A database application is a collection of data and the programs that allow the manipulation of these data to meet the information needs of an enterprise Database Systems

  3. Database Application: Examples • The e-shop around the corner • KSU Library • Saudia Airline Reservations • KSU University Database Systems

  4. Database Concepts A database application is usually implemented using a Database Management System (DBMS) Database System (DBS) is DB + Software (DBMS + Application program) (TO BE CONTINUED ..) Database Systems

  5. DBS Environment DBS Application Programs DBMS Query Process Data Access Meta-Data Database Database Systems

  6. File-Based Systems (FBS) FBS is a collection of application programs that perform tasks where each program defines and manages its own data. File handling Data Entry User 1 File Def Application Program 1 File1 File handling Data Entry User 2 File Def Application Program 2 File 2 Database Systems

  7. File-Based Systems (FBS) Major Disadvantages of FBS: • Data Redundancy & Inconsistency • Data Isolation • Data Dependence • Incompatible File Format • Fixed Queries/Proliferation of application programs Database Systems

  8. File-Based Systems (FBS) The limitations of the FBS approach attributed to two factors: • The definition of data is embedded in the application programs • There is no control over the access & manipulation of data beyond the imposed by the application program Database Systems

  9. DataBased Systems (DBS) DBS is a single large repository of data, defined once & used by many application programs. Data Entry User 1 Application Program 1 DBMS Data Entry Database User 2 Application Program 2 Database Systems

  10. Database Systems (DBS) Ref 1 Major Characteristics of DBS: • Self-Describing nature • Program-Data Independence • Sharing of Data & Multi-user Transactions (Concurrency Control) • Support of Multiple Views of the Data Database Systems

  11. Database Systems (DBS) View 1 View 2 Staff_No FName LName Age Salary Staff_No LName Bno Staff_No FName LName Age Salary Bno DBS Support of Multiple Views of Data Database Systems

  12. Database Systems (DBS) Disadvantages of DBS: • Complexity • Size • Cost (DBMS,Hardware, Staff, Training) • Performance • Higher impact of a failure Database Systems

  13. Database Management System(DBMS) A DBMS is a collection of software thatfacilitates the implementation andmanagement of database applications Database Systems

  14. Database Management System (DBMS) DBMS facilitates the following: • Creating and Defining a DB • Construct and Store a DB • Manipulate a DB (query & update the DB) • Control access to data Database Systems

  15. Database Management System Major Relational DBMS vendors/products • Paradox by Corel • dBase, Clipper • FoxPro, Access & SQL Server by MS • MySQL • DB2 by IBM • Oracle, Sybase, Informix Database Systems

  16. DBS Environment Communicate Procedure User Requirement Write Write DB Designer System Analyst Application programmer Design DBA Program Manage App Program DBMS Use Naïve End User DB Use H/W Sophisticated End User Database Systems

  17. Database People • Database Administrator (DBA): administrates the DB, DBMS & related software • Database Designer: Identify the data & choose the appropriate structure to represent &store the data • Database user: Queries/modifies data - Naïve users: invoke one of the permanent application programs that have been written previously - Sophisticated users: form requests in a database query language Database Systems

  18. Database People • System Analyst: determine the requirements of end users & develop system specifications • Application Programmer: implement system specifications • DBMS designer & Implementers • Tool Developer • Operators & Maintenance Personnel Database Systems

  19. Three-Schema Architecture Database Systems

  20. Three-Schema Architecture User 1 User 2 User n External Level View 1 View 2 View n Conceptual Level Conceptual Description Internal Level Internal Description Database Database Systems

  21. Three-Schema Architecture • Internal level: describes how data is stored. The way perceived by the DBMS & OS. • Conceptual level: describes what data stored in DB, and the relationships among the data. The way perceived by the DBA & programmers. • External level: describes the part of the DB that user is interested in. The way perceived by the end users. Database Systems

  22. Three-Schema Architecture External Level View 1 View 2 Emp_No FName LName Dept_No Emp_No LName Salary EMPLOYEE Emp_No CHAR(6) FName CHAR(15) LName CHAR(15) Dept_No CHAR(3) Salary NUMBER(5) Conceptual Level PREFIX TYPE=BYTE(6),OFFSET=0 EMP# TYPE=BYTE(6),OFFSET=6, INDEX=EMPX LNM TYPE=BYTE(15),OFFSET=12 FNM TYPE=BYTE(15),OFFSET=27 DPT# TYPE=BYTE(4),OFFSET=42 PAY TYPE=FULLWORD,OFFSET=46 Internal Level Database Systems

  23. Schemas & Instances Schema is the description of the DB.It rarely changes. Instance is the actual content of the DB at a particular point in time. Data is actual "instance" of DB, changes rapidly. The concepts of Schema & Instances corresponds to Types & Values in programming languages, respectively Database Systems

  24. Mapping Mapping is the process of transforming requests and results between the Internal, Conceptual & External levels. Two types of mapping: - External / Conceptual mapping -Conceptual / Internal mapping Database Systems

  25. Data Independence Data Independence is the ability to modify a schema definition in one level without affecting a schema definition in the next higher level. Two levels of data independence: – Logical data independence – Physical data independence Database Systems

  26. Data Independence External Schema External Schema External Schema External/Conceptual Mapping Logical data Independence Conceptual Schema Conceptual/Internal Mapping Physical data Independence Internal Schema Database Systems

  27. Data Definition Language (DDL) DDL is a descriptive language for defining the database schema DDL compiler generates meta-data stored in a the data dictionary Database Systems

  28. Data Manipulation Language (DML) DML is a language for retrieving and updating (insert, delete, & modify) the data in the DB Two classes of languages – Procedural: user specifies what data is required and how to get those data – Nonprocedural: user specifies what data is required without specifying how to get those data (e.g. SQL) Database Systems

  29. Database Languages DBMS have a facility for embedding DDL & DML (sub-languages) in a High-Level Language (COBOL,PASCAL, C), which in this case is considered a host language. C,C++,Lisp,.. Application Program DBMS Call to DB Local Vars (memory) Database Systems

  30. Data Models Data Model is a set of concepts for describing the structure of a DB Categories of data models: - Object-based conceptual model - Record-based logical model - Physical model Database Systems

  31. Data Models Conceptual model is the construction of an enterprise’s information that is independent of implementation details. Logical model is the logical description of an enterprise’s information with high level description of the implementation. Database Systems

  32. Data Models Hardware independent Software independent Conceptual model Hardware independent Software dependent Logical model Hardware dependent Software dependent Physical model Database Systems

  33. Data Models Object-based conceptual model – Entity-Relationship – Object-Oriented – Semantic – Functional - Binary Record-based logical models – Relational model – Network model – Hierarchical model Database Systems

  34. Data Models Staff_No LName Salary Brn_No Brn_No Street Tel_No St1 Name1 7000 1 1 Olayaa 4630000 2 Malaz 4780000 3 Rawda 2310000 Relational Model St2 Name2 4000 1 St3 Name3 6500 2 St4 Name4 3000 3 St1 Name1 7000 Olayaa 4630000 Malaz 4780000 Network Model St2 Name2 4000 Rawda 2310000 St3 Name3 6500 St4 Name4 3000 Database Systems

  35. Data Models Malaz 4780000 Olayaa 4630000 Rawda 2310000 St4 Name4 3000 St3 Name3 6500 St1 Name1 7000 St2 Name2 4000 Hierarchical Model Database Systems

  36. Summary of DB Concepts (1) • Database (DB) • Database Application • Database Management System (DBMS) • Database System (DBS) - Centralized approach • File-Based System(FBS) - Decentralized approach • Program-data dependence & independence • Meta-data & data dictionary • Concurrency Control Database Systems

  37. Summary of DB Concepts (2) • Three-schema Architecture (internal, conceptual, & external levels) • Schemas &Instances • Mapping (external/conceptual, conceptual/internal) • Data Independence (logical & physical) • Data Definition Language (DDL) • Data Manipulation Language (DML) • Query language& host language • Conceptual model,Logical model,&Physical model • Data model (Entity-Relationship,Object-Oriented,Relational) Database Systems

More Related