Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 340 Introduction to Database Systems.

Slides:



Advertisements
Similar presentations
Database System Concepts and Architecture
Advertisements

Chapter 2 Database System Concepts and Architecture
Database Systems Chapter 2
Chapter 2 Database Environment.
1 Chapter 2 Database System Concepts and Architecture.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 1.
Database system concepts and architecture Winter 2007Ron McFadyen ACS Database schema Database system architecture Data independence concept Database.
ICS (072)Database Systems Background Review 1 Database Systems Background Review Dr. Muhammad Shafique.
Chapter 2 Database Environment Pearson Education © 2014.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Overview of Database Languages and Architectures.
Database System Concepts and Architecture Dr. Ali Obaidi.
1 Chapter 2 Database Environment. 2 Chapter 2 - Objectives u Purpose of three-level database architecture. u Contents of external, conceptual, and internal.
Chapter 2 Database System Concepts and Architecture
Copyright © 2004 Pearson Education, Inc. Chapter 1 Introduction.
Database Environment 1.  Purpose of three-level database architecture.  Contents of external, conceptual, and internal levels.  Purpose of external/conceptual.
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
Information storage: Introduction of database 10/7/2004 Xiangming Mu.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 1 Chapter 2: Database System Concepts and Architecture - Outline Data Models and Their.
Database System Concepts and Architecture
Chapter 2 CIS Sungchul Hong
Faculty of Information Science and Technology Mahanakorn University of Technology Topic 2 Database System Concepts and Architecture.
CST203-2 Database Management Systems Lecture 2. One Tier Architecture Eg: In this scenario, a workgroup database is stored in a shared location on a single.
Database System Concepts and Architecture Lecture # 2 21 June 2012 National University of Computer and Emerging Sciences.
2. Database System Concepts and Architecture
Database system concept and Architecture
Ihr Logo Fundamentals of Database Systems Fourth Edition El Masri & Navathe Chapter 2 Database System Concepts and Architecture.
Instructors: Churee Techawut Introduction to Database System Chapter 1 CS (204)321 Database System I.
Database System Concepts and Architecture. Relational Model Concepts relational model represents the database as a collection of relations. Each relation.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
1 CS 430 Database Theory Winter 2005 Lecture 2: General Concepts.
Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition Copyright © 2004 Pearson Education, Inc. Slide 2-1 Data Models Data Model: A set.
Chapter 2 Database System Concepts and Architecture Dr. Bernard Chen Ph.D. University of Central Arkansas.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture Presented & Modified.
1Mr.Mohammed Abu Roqyah. Database System Concepts and Architecture 2Mr.Mohammed Abu Roqyah.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Database System Concepts and Architecture
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 1.
DataBase System Concepts and Architecture
Database Design Chapter-2- Database System Concepts and Architecture
Chapter 2 Database Environment.
1 Chapter 2 Database Environment Pearson Education © 2009.
2) Database System Concepts and Architecture. Slide 2- 2 Outline Data Models and Their Categories Schemas, Instances, and States Three-Schema Architecture.
Postgraduate Module Enterprise Database Systems Technological Educational Institution of Larisa in collaboration with Staffordshire University Larisa
1 Database Design Chapter-2- Database System Concepts and Architecture Reference: Prof. Mona Mursi Lecture notes.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Introduction: Databases and Database Systems Lecture # 1 June 19,2012 National University of Computer and Emerging Sciences.
Database Systems 主講人 : 陳建源 日期 :99/9/14 研究室 : 法 Chapter 2 Database System Concepts and Architecture.
ISC321 Database Systems I Chapter 2: Overview of Database Languages and Architectures Fall 2015 Dr. Abdullah Almutairi.
Copyright © 2011 Ramez Elmasri and Shamkant Navathe Chapter 2 Database System Concepts and Architecture.
College of Arts & Science Computer Science Department
Chapter (2) Database Systems Concepts and Architecture Objectives
Databases (CS507) CHAPTER 2.
Databases and DBMSs Todd S. Bacastow January 2005.
Chapter 2: Database System Concepts and Architecture - Outline
Chapter (2) Database Systems Concepts and Architecture Objectives
Chapter 2 Database Environment.
Chapter 2 Database System Concepts and Architecture
Database System Concepts and Architecture
Database System Concepts and Architecture
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Chapter 2 Database Environment.
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 2: Database System Concepts and Architecture
Chapter 2 Database Environment Pearson Education © 2009.
Data, Databases, and DBMSs
Chapter 2 Database Environment Pearson Education © 2014.
Database System Concepts and Architecture
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 2 Database Environment Pearson Education © 2009.
Presentation transcript:

Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 340 Introduction to Database Systems (Chapter 2: Database System Concepts and Architecture)

Chapter 2: Database System Concepts and Architecture1 Outline Data Models Categories of Data Models Schemas,Instances, and Database State Three-Schema Architecture & Data Independence Database Languages DBMS Interfaces DBMS Component Modules Database System Utilities Tools, Application Environments, & Communication Facilities Client/Server DBMS Architecture Classification of Database Management Systems Reading: Chapter 2

2 Data Models A collection of concepts that can be used to describe the structure of a database. Provides the means to achieve data abstraction by hiding unneeded details of data storage. Most data models include a set of basic operations for specifying retrievals and updates on the database. Some data models include concepts for specifying the dynamic aspects or behavior of a database application. Data model examples: hierarchical model, network model, relational model, object oriented model. Chapter 2: Database System Concepts and Architecture Data types, relationships and constraints

Chapter 2: Database System Concepts and Architecture3 Categories of Data Models Data models can be categorized according to the types of concepts they use to describe the database structure: Conceptual (High-level, semantic) data models: Provide concepts close to the way users perceive data. Physical (Low-level, internal) data models: Provide concepts that describe the details of how data is stored in the computer. Implementation (Representational) data models: Provide concepts that fall between the above two, balancing user views with some computer storage details.

Chapter 2: Database System Concepts and Architecture4 Categories of Data Models Conceptual data models use concepts such as entities, attributes and relationships. An entity represents a real-world object or concept such as an employee or a project. An attribute represents some property of interest that further describes an entity such as the employee’s name or salary. A relationship among two or more entities represents an association among two or more entities such as a works-on relationship between an employee and a project.

Chapter 2: Database System Concepts and Architecture5 Categories of Data Models Physical data models describe how data is stored in the computer by representing information such as record formats, record ordering, and access paths. Implementation data model: The most frequently used model in traditional commercial DBMSs. Includes the widely used relational data model, as well as the network, and the hierarchical models. Represents data by using record structures.

6 Schemas, Instances, and Database State It is important to distinguish between the description of a database and the database itself. The description of a database is called the database schema, which is specified during database design and is not expected to change frequently. A displayed schema is called a schema diagram. Each object in the schema is called a schema construct. Schema diagram does not display the actual instances of records. Chapter 2: Database System Concepts and Architecture NameStudentNumberClassMajor CourseNameCourseNumberCreditHoursDepartment STUDENT COURSE

Schemas, Instances, and Database State The data in a database at a particular moment is called the database state or the database instance. STUDENT Every time we insert or delete a record we change the state of a database. The schema change is called schema evolution. 7Chapter 2: Database System Concepts and Architecture NameStudentNumberClassMajor Smith171CS Brown82CS

Chapter 2: Database System Concepts and Architecture Three-Schema Architecture & Data Independence A three schema architecture is an architecture that is proposed to help in achieving & visualizing the following three important characteristics: Program-data independence. Support of multiple user views. Use of catalog to store the data description. 8

Chapter 2: Database System Concepts and Architecture The Three-Schema Architecture Schemas can be defined at the following three levels: The internal level internal schema Describes the physical storage of the database (e.g. indexes). Uses a physical data model. The conceptual level conceptual schema Describes the structure of the whole database for users. Hides the details of physical storage structure. Concentrates on describing entities, data types, relationships, user operations, and constraints. Uses a conceptual or an implementation data model. The external (view) level # of external schemas/user views Each describes the part of the database that a particular user group is interested in and hides the rest. Uses the same data model as the conceptual level. 9

The Three-Schema Architecture END USERS EXTERNAL LEVEL... external/conceptual mapping CONCEPTUAL LEVEL conceptual/internal mapping INTERNAL LEVEL 10Chapter 2: Database System Concepts and Architecture External view External view Conceptual schema Internal schema STORED DATABASE

Chapter 2: Database System Concepts and Architecture Data Independence The capacity to change the schema at one level of a database system without having to change the schema at the next higher level. There are two types of independence: Logical data independence: The capacity to change the conceptual schema without having to change external schemas or application programs (expand or reduce). Physical data independence: The capacity to change the internal schema without having to change the conceptual schema or external schemas. The two levels of mappings create an overhead during execution of a query, leading to inefficiencies in the DBMS Few DBMS have implemented the full three-schema architecture. 11

Database Languages Data Definition Language (DDL) is used by the DBA and database designers to specify the conceptual schema of a database. In many DBMSs, the DDL is also used to define internal and external schemas (views). In some DBMS, separate Storage Definition Language (SDL) and View Definition Language (VDL) are used to define internal and external schemas. 12Chapter 2: Database System Concepts and Architecture

Database Languages Once the database is populated with data a Data Manipulation Language (DML) is used to manipulate data. In current DBMSs, the preceding types of languages are usually not considered distinct languages; rather a comprehensive integrated language is used. The Structured Query Language (SQL) is a typical example of comprehensive relational database language. 13

Chapter 2: Database System Concepts and Architecture DBMS Interfaces Stand alone query language interface. Programmer interfaces for embedding DML in programming languages. User friendly interfaces provided by DBMS may include the following: Menu-Based interfaces for web clients or browsing: Present the user with lists of options, called menus, that lead the user through the formulation of a request. Forms-based interfaces: Users can fill out some of the form entries and the DBMS will retrieve matching data for the remaining entries. 14

Chapter 2: Database System Concepts and Architecture DBMS Interfaces Graphical user interfaces: Displays a schema to the user in a diagrammatic form. The user can then specify a query by manipulating the diagram. Natural language interfaces: These interfaces accept requests written in English. Speech Input and Output: Limited use of speech as an input query and speech as an answer to a question or result of a request is becoming commonplace. Interfaces for parametric users: Repeated work. Interfaces for the DBAs: Privileged commands. 15

Chapter 2: Database System Concepts and Architecture DBMS Component Modules The database and DBMS catalog are usually stored on disk. Access to the disk is controlled by the operating system (OS). A higher-level, stored data manager module (component) controls access to DBMS information that is stored on disk. The DDL compiler processes schema definitions, specified in the DDL, and stores descriptions of schemas in the DBMS catalog which include information such as table names, data items, mapping into many schemas and constraints. The query compiler handles high-level queries that are entered interactively. 16

Chapter 2: Database System Concepts and Architecture DBMS Component Modules The query optimizer is concerned with rearrangement and possible reordering of operations, elimination of redundancies, and use of correct algorithms and indexes during execution. The precompiler extracts DML commands from an application program written in a host programming language. These commands are sent to the DML compiler for compilation into object code for database access. The rest of the program is sent to the host language compiler. The runtime database processor handles database access at runtime; it receives retrieval or update operations and carries them out on the database. 17

Chapter 2: Database System Concepts and Architecture Component Modules of a DBMS & Their Interactions 18 Stored database Stored data manager Concurrency control/ backup/recovery subsystems Runtime database processor Query compiler DML compiler DDL compiler Host language compiler Privileged commands DDL statements Interactive query Application programs Precompiler System catalog/ data dictionary Compiled transactions DBA Commands, Queries, and Transactions DBA staffCausal usersParametric usersApplication programmers Query Optimizer Input/Output from Database

Chapter 2: Database System Concepts and Architecture Database System Utilities Most DBMSs have database utilities that help the DBA in managing the database: Loading: Used to load existing data files into the database (e.g. Text files). The source & target structure are specified to the utility which reformats & stores data. Backup: Backup copy of the database, usually by dumping the entire data onto tape. It can then be used to restore data in case of disaster. Database storage reorganization: Reorganize a set of database files into a different file organization to improve performance. 19

Chapter 2: Database System Concepts and Architecture Database System Utilities Performance monitoring: Monitors database usage and provides statistics for decision making. Sorting files. Handling data compression. Monitoring access by users. Interfacing with the network. 20

Chapter 2: Database System Concepts and Architecture Tools, Application Environments, & Communication Facilities Tools available to database designers, users, and DBAs include: CASE tools which are used in the design phase. Data dictionary (data repository) to store catalog information and others such as design decisions, usage standards, application program descriptions, and user information. Application development environments: PowerBuilder designer...etc are becoming quite popular because of their features in database design, GUI development, querying & updating, and application program development. Communication facilities: Communications software, which allows users to access remote databases. 21

Chapter 2: Database System Concepts and Architecture Client/Server DBMS Architecture The architecture of DBMS packages has evolved. DBMS software package was one tightly integrated system DBMS software packages became modular in design, with a client/server system architecture Large centralized mainframe computers Hundreds of distributed workstations & PCs connected via communications networks to various types of server machines 22

Chapter 2: Database System Concepts and Architecture Client/Server DBMS Architecture In a basic client/server DBMS architecture: The system functionality is distributed between two types of modules. A client module is typically designed so that it will run on a user workstation or PC. Application programs and user interfaces that access the database run in the client module. A server module handles data storage, Access, search, and other functions. 23

Chapter 2: Database System Concepts and Architecture Classification of Database Management Systems Several criteria are used to classify DBMSs: Data model on which DBMS is based. Two types are currently used, the relational data model and the object oriented model. Number of users supported by the system. Singular systems and multi-user systems Number of sites over which the database is distributed. A DBMS is centralized if the data is stored at a single computer site. A distributed DBMS (DDBMS) can have actual database and DBMS at multiple sites. The cost of the DBMS. The type of access path for storing files. General purpose or special purpose. 24