SlideShare ist ein Scribd-Unternehmen logo
1 von 34
Chapter 1: Introduction




  Database System Concepts, 5th Ed.
       ©Silberschatz, Korth and Sudarshan
  See www.db-book.com for conditions on re-use
Chapter 1: Introduction
             s Purpose of Database Systems
             s Database Languages
             s Relational Databases
             s Database Design
             s Data Models
             s Database Internals
             s Database Users and Administrators
             s Overall Structure
             s History of Database Systems




atabase System Concepts - 5 th Edition, May 23, 2005   1.2   ©Silberschatz, Korth and Sudarshan
Database Management System
                                 (DBMS)
             s DBMS contains information about a particular enterprise
                   q    Collection of interrelated data
                   q    Set of programs to access the data
                   q    An environment that is both convenient and efficient to use
             s Database Applications:
                   q    Banking: all transactions
                   q    Airlines: reservations, schedules
                   q    Universities: registration, grades
                   q    Sales: customers, products, purchases
                   q    Online retailers: order tracking, customized recommendations
                   q    Manufacturing: production, inventory, orders, supply chain
                   q    Human resources: employee records, salaries, tax deductions
             s Databases touch all aspects of our lives



atabase System Concepts - 5 th Edition, May 23, 2005   1.3                ©Silberschatz, Korth and Sudarshan
Purpose of Database Systems
             s In the early days, database applications were built directly on top of
                  file systems
             s Drawbacks of using file systems to store data:
                    q   Data redundancy and inconsistency
                             Multiple file formats, duplication of information in different files
                    q   Difficulty in accessing data
                             Need to write a new program to carry out each new task
                    q   Data isolation — multiple files and formats
                    q   Integrity problems
                             Integrity constraints (e.g. account balance > 0) become
                              “buried” in program code rather than being stated explicitly
                             Hard to add new constraints or change existing ones




atabase System Concepts - 5 th Edition, May 23, 2005      1.4                    ©Silberschatz, Korth and Sudarshan
Purpose of Database Systems
                                   (Cont.)
             s Drawbacks of using file systems (cont.)
                    q   Atomicity of updates
                             Failures may leave database in an inconsistent state with partial
                              updates carried out
                             Example: Transfer of funds from one account to another should
                              either complete or not happen at all
                    q   Concurrent access by multiple users
                             Concurrent accessed needed for performance
                             Uncontrolled concurrent accesses can lead to inconsistencies
                               – Example: Two people reading a balance and updating it at the
                                 same time
                    q   Security problems
                             Hard to provide user access to some, but not all, data
             s Database systems offer solutions to all the above problems




atabase System Concepts - 5 th Edition, May 23, 2005    1.5                  ©Silberschatz, Korth and Sudarshan
Levels of Abstraction
             s Physical level: describes how a record (e.g., customer) is stored.
             s Logical level: describes data stored in database, and the relationships
                  among the data.
                        type customer = record
                                        customer_id : string;
                                        customer_name : string;
                                        customer_street : string;
                                        customer_city : string;
                                    end;
             s View level: application programs hide details of data types. Views can
                  also hide information (such as an employee’s salary) for security
                  purposes.




atabase System Concepts - 5 th Edition, May 23, 2005       1.6          ©Silberschatz, Korth and Sudarshan
View of Data

            An architecture for a database system




atabase System Concepts - 5 th Edition, May 23, 2005   1.7       ©Silberschatz, Korth and Sudarshan
Instances and Schemas
             s    Similar to types and variables in programming languages
             s    Schema – the logical structure of the database
                    q   Example: The database consists of information about a set of customers and
                        accounts and the relationship between them)
                    q   Analogous to type information of a variable in a program
                    q   Physical schema: database design at the physical level
                    q   Logical schema: database design at the logical level
             s    Instance – the actual content of the database at a particular point in time
                    q   Analogous to the value of a variable
             s    Physical Data Independence – the ability to modify the physical schema
                  without changing the logical schema
                    q   Applications depend on the logical schema
                    q   In general, the interfaces between the various levels and components should be
                        well defined so that changes in some parts do not seriously influence others.




atabase System Concepts - 5 th Edition, May 23, 2005    1.8                        ©Silberschatz, Korth and Sudarshan
Data Models
             s A collection of tools for describing
                    q Data
                    q Data relationships
                    q Data semantics
                    q Data constraints

             s Relational model
             s Entity-Relationship data model (mainly for database design)
             s Object-based data models (Object-oriented and Object-relational)
             s Semistructured data model (XML)
             s Other older models:
                    q   Network model
                    q   Hierarchical model




atabase System Concepts - 5 th Edition, May 23, 2005   1.9          ©Silberschatz, Korth and Sudarshan
Data Manipulation Language (DML)
             s Language for accessing and manipulating the data organized by the
                  appropriate data model
                   q    DML also known as query language
             s Two classes of languages
                   q    Procedural – user specifies what data is required and how to get
                        those data
                   q    Declarative (nonprocedural) – user specifies what data is
                        required without specifying how to get those data
             s SQL is the most widely used query language




atabase System Concepts - 5 th Edition, May 23, 2005   1.10             ©Silberschatz, Korth and Sudarshan
Data Definition Language (DDL)
             s Specification notation for defining the database schema
                   Example:             create table account (
                                              account_number       char(10),
                                                   branch_name     char(10),
                                                  balance          integer)
             s DDL compiler generates a set of tables stored in a data dictionary
             s Data dictionary contains metadata (i.e., data about data)
                   q    Database schema
                   q    Data storage and definition language
                            Specifies the storage structure and access methods used
                   q    Integrity constraints
                            Domain constraints
                            Referential integrity (e.g. branch_name must correspond to a
                             valid branch in the branch table)
                   q    Authorization


atabase System Concepts - 5 th Edition, May 23, 2005        1.11               ©Silberschatz, Korth and Sudarshan
Relational Model
                                                                             Attributes
             s Example of tabular data in the relational model




atabase System Concepts - 5 th Edition, May 23, 2005   1.12      ©Silberschatz, Korth and Sudarshan
A Sample Relational Database




atabase System Concepts - 5 th Edition, May 23, 2005   1.13   ©Silberschatz, Korth and Sudarshan
SQL
             s SQL: widely used non-procedural language
                    q   Example: Find the name of the customer with customer-id 192-83-7465
                         select customer.customer_name
                         from     customer
                         where customer.customer_id = ‘192-83-7465’
                    q   Example: Find the balances of all accounts held by the customer with
                        customer-id 192-83-7465
                         select account.balance
                         from     depositor, account
                         where depositor.customer_id = ‘192-83-7465’ and
                                  depositor.account_number = account.account_number
             s Application programs generally access databases through one of
                    q   Language extensions to allow embedded SQL
                    q   Application program interface (e.g., ODBC/JDBC) which allow SQL
                        queries to be sent to a database



atabase System Concepts - 5 th Edition, May 23, 2005    1.14             ©Silberschatz, Korth and Sudarshan
Database Design
             The process of designing the general structure of the database:


             s Logical Design – Deciding on the database schema. Database design
                  requires that we find a “good” collection of relation schemas.
                    q   Business decision – What attributes should we record in the
                        database?
                    q   Computer Science decision – What relation schemas should we
                        have and how should the attributes be distributed among the various
                        relation schemas?


             s Physical Design – Deciding on the physical layout of the database




atabase System Concepts - 5 th Edition, May 23, 2005   1.15              ©Silberschatz, Korth and Sudarshan
The Entity-Relationship Model
             s Models an enterprise as a collection of entities and relationships
                   q    Entity: a “thing” or “object” in the enterprise that is distinguishable
                        from other objects
                            Described by a set of attributes
                   q    Relationship: an association among several entities
             s Represented diagrammatically by an entity-relationship diagram:




atabase System Concepts - 5 th Edition, May 23, 2005   1.16                    ©Silberschatz, Korth and Sudarshan
Other Data Models
             s Object-oriented data model
             s Object-relational data model




atabase System Concepts - 5 th Edition, May 23, 2005   1.17   ©Silberschatz, Korth and Sudarshan
Database Application Architectures




                                                              (web browser)




                     Old                                      Modern


atabase System Concepts - 5 th Edition, May 23, 2005   1.18      ©Silberschatz, Korth and Sudarshan
Database Management System
                                Internals
             s Storage management
             s Query processing
             s Transaction processing




atabase System Concepts - 5 th Edition, May 23, 2005   1.19   ©Silberschatz, Korth and Sudarshan
Storage Management
             s Storage manager is a program module that provides the interface
                  between the low-level data stored in the database and the application
                  programs and queries submitted to the system.
             s The storage manager is responsible to the following tasks:
                   q    Interaction with the file manager
                   q    Efficient storing, retrieving and updating of data
             s Issues:
                   q    Storage access
                   q    File organization
                   q    Indexing and hashing




atabase System Concepts - 5 th Edition, May 23, 2005   1.20                  ©Silberschatz, Korth and Sudarshan
Query Processing

             1. Parsing and translation
             2. Optimization
             3. Evaluation




atabase System Concepts - 5 th Edition, May 23, 2005   1.21     ©Silberschatz, Korth and Sudarshan
Query Processing (Cont.)
             s Alternative ways of evaluating a given query
                    q   Equivalent expressions
                    q   Different algorithms for each operation
             s Cost difference between a good and a bad way of evaluating a query can
                  be enormous
             s Need to estimate the cost of operations
                    q   Depends critically on statistical information about relations which the
                        database must maintain
                    q   Need to estimate statistics for intermediate results to compute cost of
                        complex expressions




atabase System Concepts - 5 th Edition, May 23, 2005   1.22                 ©Silberschatz, Korth and Sudarshan
Transaction Management
             s A transaction is a collection of operations that performs a single
                  logical function in a database application
             s Transaction-management component ensures that the database
                  remains in a consistent (correct) state despite system failures (e.g.,
                  power failures and operating system crashes) and transaction failures.
             s Concurrency-control manager controls the interaction among the
                  concurrent transactions, to ensure the consistency of the database.




atabase System Concepts - 5 th Edition, May 23, 2005   1.23             ©Silberschatz, Korth and Sudarshan
Overall System Structure




atabase System Concepts - 5 th Edition, May 23, 2005   1.24   ©Silberschatz, Korth and Sudarshan
History of Database Systems
             s 1950s and early 1960s:
                   q    Data processing using magnetic tapes for storage
                            Tapes provide only sequential access
                   q    Punched cards for input
             s Late 1960s and 1970s:
                   q    Hard disks allow direct access to data
                   q    Network and hierarchical data models in widespread use
                   q    Ted Codd defines the relational data model
                            Would win the ACM Turing Award for this work
                            IBM Research begins System R prototype
                            UC Berkeley begins Ingres prototype
                   q    High-performance (for the era) transaction processing




atabase System Concepts - 5 th Edition, May 23, 2005   1.25                 ©Silberschatz, Korth and Sudarshan
History (cont.)
             s 1980s:
                   q    Research relational prototypes evolve into commercial systems
                            SQL becomes industry standard
                   q    Parallel and distributed database systems
                   q    Object-oriented database systems
             s 1990s:
                   q    Large decision support and data-mining applications
                   q    Large multi-terabyte data warehouses
                   q    Emergence of Web commerce
             s 2000s:
                   q    XML and XQuery standards
                   q    Automated database administration
                   q    Increasing use of highly parallel database systems
                   q    Web-scale distributed data storage systems



atabase System Concepts - 5 th Edition, May 23, 2005   1.26                  ©Silberschatz, Korth and Sudarshan
End of Chapter 1




Database System Concepts, 5th Ed.
     ©Silberschatz, Korth and Sudarshan
See www.db-book.com for conditions on re-use
Database Users
             Users are differentiated by the way they expect to interact with
             the system
             s Application programmers – interact with system through DML
                  calls
             s Sophisticated users – form requests in a database query language
             s Specialized users – write specialized database applications that do
                  not fit into the traditional data processing framework
             s Naï ve users – invoke one of the permanent application programs
                  that have been written previously
                   q    Examples, people accessing database over the web, bank tellers,
                        clerical staff




atabase System Concepts - 5 th Edition, May 23, 2005   1.28                ©Silberschatz, Korth and Sudarshan
Database Administrator
             s Coordinates all the activities of the database system
                    q   has a good understanding of the enterprise’s information resources
                        and needs.
             s Database administrator's duties include:
                    q   Storage structure and access method definition
                    q   Schema and physical organization modification
                    q   Granting users authority to access the database
                    q   Backing up data
                    q   Monitoring performance and responding to changes
                             Database tuning




atabase System Concepts - 5 th Edition, May 23, 2005   1.29               ©Silberschatz, Korth and Sudarshan
Database Architecture

             The architecture of a database systems is greatly influenced by
              the underlying computer system on which the database is running:
             s Centralized
             s Client-server
             s Parallel (multiple processors and disks)
             s Distributed




atabase System Concepts - 5 th Edition, May 23, 2005   1.30           ©Silberschatz, Korth and Sudarshan
Object-Relational Data Models
             s Extend the relational data model by including object orientation and
                  constructs to deal with added data types.
             s Allow attributes of tuples to have complex types, including non-atomic
                  values such as nested relations.
             s Preserve relational foundations, in particular the declarative access to
                  data, while extending modeling power.
             s Provide upward compatibility with existing relational languages.




atabase System Concepts - 5 th Edition, May 23, 2005   1.31            ©Silberschatz, Korth and Sudarshan
XML: Extensible Markup Language
             s Defined by the WWW Consortium (W3C)
             s Originally intended as a document markup language not a
                  database language
             s The ability to specify new tags, and to create nested tag structures
                  made XML a great way to exchange data, not just documents
             s XML has become the basis for all new generation data interchange
                  formats.
             s A wide variety of tools is available for parsing, browsing and
                  querying XML documents/data




atabase System Concepts - 5 th Edition, May 23, 2005   1.32            ©Silberschatz, Korth and Sudarshan
Figure 1.4




atabase System Concepts - 5 th Edition, May 23, 2005      1.33      ©Silberschatz, Korth and Sudarshan
Figure 1.7




atabase System Concepts - 5 th Edition, May 23, 2005      1.34      ©Silberschatz, Korth and Sudarshan

Weitere ähnliche Inhalte

Was ist angesagt?

Database System Concepts and Architecture
Database System Concepts and ArchitectureDatabase System Concepts and Architecture
Database System Concepts and Architecturesontumax
 
Relational database revised
Relational database revisedRelational database revised
Relational database revisedmnodalo
 
Fundamentals of database system - Database System Concepts and Architecture
Fundamentals of database system - Database System Concepts and ArchitectureFundamentals of database system - Database System Concepts and Architecture
Fundamentals of database system - Database System Concepts and ArchitectureMustafa Kamel Mohammadi
 
Technical Note on DBMS
Technical Note on DBMSTechnical Note on DBMS
Technical Note on DBMSKr Shrishant
 
Lesson 2 network database system
Lesson 2 network database systemLesson 2 network database system
Lesson 2 network database systemGiO Friginal
 
Database management system overview
Database management system overviewDatabase management system overview
Database management system overviewNj Saini
 
Ch01 database-conceptsppt4207
Ch01 database-conceptsppt4207Ch01 database-conceptsppt4207
Ch01 database-conceptsppt4207Burhan Chaudhry
 
Introduction to Database Management System
Introduction to Database Management SystemIntroduction to Database Management System
Introduction to Database Management SystemAmiya9439793168
 
Database Management System
Database Management SystemDatabase Management System
Database Management SystemAbishek V S
 
Database Design
Database DesignDatabase Design
Database Designlearnt
 
Database management system chapter1
Database management system chapter1Database management system chapter1
Database management system chapter1Pranab Dasgupta
 
Ansi spark
Ansi sparkAnsi spark
Ansi sparkjani
 

Was ist angesagt? (20)

Database System Concepts and Architecture
Database System Concepts and ArchitectureDatabase System Concepts and Architecture
Database System Concepts and Architecture
 
Ch1
Ch1Ch1
Ch1
 
Relational database revised
Relational database revisedRelational database revised
Relational database revised
 
Fundamentals of database system - Database System Concepts and Architecture
Fundamentals of database system - Database System Concepts and ArchitectureFundamentals of database system - Database System Concepts and Architecture
Fundamentals of database system - Database System Concepts and Architecture
 
Database language
Database languageDatabase language
Database language
 
Technical Note on DBMS
Technical Note on DBMSTechnical Note on DBMS
Technical Note on DBMS
 
Dbms Lecture Notes
Dbms Lecture NotesDbms Lecture Notes
Dbms Lecture Notes
 
Lesson 2 network database system
Lesson 2 network database systemLesson 2 network database system
Lesson 2 network database system
 
Database management system overview
Database management system overviewDatabase management system overview
Database management system overview
 
Ch01 database-conceptsppt4207
Ch01 database-conceptsppt4207Ch01 database-conceptsppt4207
Ch01 database-conceptsppt4207
 
Introduction to Database Management System
Introduction to Database Management SystemIntroduction to Database Management System
Introduction to Database Management System
 
Unit01 dbms
Unit01 dbmsUnit01 dbms
Unit01 dbms
 
Dbms models
Dbms modelsDbms models
Dbms models
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
 
D B M S Animate
D B M S AnimateD B M S Animate
D B M S Animate
 
Database Design
Database DesignDatabase Design
Database Design
 
Database management system chapter1
Database management system chapter1Database management system chapter1
Database management system chapter1
 
Unit 02 dbms
Unit 02 dbmsUnit 02 dbms
Unit 02 dbms
 
Bab9
Bab9Bab9
Bab9
 
Ansi spark
Ansi sparkAnsi spark
Ansi spark
 

Ähnlich wie Database System Concepts Chapter 1 Introduction

Ähnlich wie Database System Concepts Chapter 1 Introduction (20)

Ch1
Ch1Ch1
Ch1
 
DDL DML sysytems
DDL DML sysytemsDDL DML sysytems
DDL DML sysytems
 
sql-plsql-dbms-database-management-systen.ppt
sql-plsql-dbms-database-management-systen.pptsql-plsql-dbms-database-management-systen.ppt
sql-plsql-dbms-database-management-systen.ppt
 
Database management system INTRODUCTION.ppt
Database management system INTRODUCTION.pptDatabase management system INTRODUCTION.ppt
Database management system INTRODUCTION.ppt
 
GFGC CHIKKABASUR ( DBMS )
GFGC CHIKKABASUR ( DBMS )GFGC CHIKKABASUR ( DBMS )
GFGC CHIKKABASUR ( DBMS )
 
DBMS_Ch1
 DBMS_Ch1 DBMS_Ch1
DBMS_Ch1
 
Ch1
Ch1Ch1
Ch1
 
Vnsispl dbms concepts_ch1
Vnsispl dbms concepts_ch1Vnsispl dbms concepts_ch1
Vnsispl dbms concepts_ch1
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
DBMS
DBMS DBMS
DBMS
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
SQL.pptx
SQL.pptxSQL.pptx
SQL.pptx
 
Presentation on DBMS systems for IT Professionals
Presentation on DBMS systems for IT ProfessionalsPresentation on DBMS systems for IT Professionals
Presentation on DBMS systems for IT Professionals
 
Ch1 Introduction
Ch1 IntroductionCh1 Introduction
Ch1 Introduction
 
DownloadClassSessionFile (37).pdf
DownloadClassSessionFile (37).pdfDownloadClassSessionFile (37).pdf
DownloadClassSessionFile (37).pdf
 
Ch 1.pdf
Ch 1.pdfCh 1.pdf
Ch 1.pdf
 
Introduction to Database System Concepts
Introduction to Database System ConceptsIntroduction to Database System Concepts
Introduction to Database System Concepts
 

Kürzlich hochgeladen

ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 

Kürzlich hochgeladen (20)

ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 

Database System Concepts Chapter 1 Introduction

  • 1. Chapter 1: Introduction Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See www.db-book.com for conditions on re-use
  • 2. Chapter 1: Introduction s Purpose of Database Systems s Database Languages s Relational Databases s Database Design s Data Models s Database Internals s Database Users and Administrators s Overall Structure s History of Database Systems atabase System Concepts - 5 th Edition, May 23, 2005 1.2 ©Silberschatz, Korth and Sudarshan
  • 3. Database Management System (DBMS) s DBMS contains information about a particular enterprise q Collection of interrelated data q Set of programs to access the data q An environment that is both convenient and efficient to use s Database Applications: q Banking: all transactions q Airlines: reservations, schedules q Universities: registration, grades q Sales: customers, products, purchases q Online retailers: order tracking, customized recommendations q Manufacturing: production, inventory, orders, supply chain q Human resources: employee records, salaries, tax deductions s Databases touch all aspects of our lives atabase System Concepts - 5 th Edition, May 23, 2005 1.3 ©Silberschatz, Korth and Sudarshan
  • 4. Purpose of Database Systems s In the early days, database applications were built directly on top of file systems s Drawbacks of using file systems to store data: q Data redundancy and inconsistency  Multiple file formats, duplication of information in different files q Difficulty in accessing data  Need to write a new program to carry out each new task q Data isolation — multiple files and formats q Integrity problems  Integrity constraints (e.g. account balance > 0) become “buried” in program code rather than being stated explicitly  Hard to add new constraints or change existing ones atabase System Concepts - 5 th Edition, May 23, 2005 1.4 ©Silberschatz, Korth and Sudarshan
  • 5. Purpose of Database Systems (Cont.) s Drawbacks of using file systems (cont.) q Atomicity of updates  Failures may leave database in an inconsistent state with partial updates carried out  Example: Transfer of funds from one account to another should either complete or not happen at all q Concurrent access by multiple users  Concurrent accessed needed for performance  Uncontrolled concurrent accesses can lead to inconsistencies – Example: Two people reading a balance and updating it at the same time q Security problems  Hard to provide user access to some, but not all, data s Database systems offer solutions to all the above problems atabase System Concepts - 5 th Edition, May 23, 2005 1.5 ©Silberschatz, Korth and Sudarshan
  • 6. Levels of Abstraction s Physical level: describes how a record (e.g., customer) is stored. s Logical level: describes data stored in database, and the relationships among the data. type customer = record customer_id : string; customer_name : string; customer_street : string; customer_city : string; end; s View level: application programs hide details of data types. Views can also hide information (such as an employee’s salary) for security purposes. atabase System Concepts - 5 th Edition, May 23, 2005 1.6 ©Silberschatz, Korth and Sudarshan
  • 7. View of Data An architecture for a database system atabase System Concepts - 5 th Edition, May 23, 2005 1.7 ©Silberschatz, Korth and Sudarshan
  • 8. Instances and Schemas s Similar to types and variables in programming languages s Schema – the logical structure of the database q Example: The database consists of information about a set of customers and accounts and the relationship between them) q Analogous to type information of a variable in a program q Physical schema: database design at the physical level q Logical schema: database design at the logical level s Instance – the actual content of the database at a particular point in time q Analogous to the value of a variable s Physical Data Independence – the ability to modify the physical schema without changing the logical schema q Applications depend on the logical schema q In general, the interfaces between the various levels and components should be well defined so that changes in some parts do not seriously influence others. atabase System Concepts - 5 th Edition, May 23, 2005 1.8 ©Silberschatz, Korth and Sudarshan
  • 9. Data Models s A collection of tools for describing q Data q Data relationships q Data semantics q Data constraints s Relational model s Entity-Relationship data model (mainly for database design) s Object-based data models (Object-oriented and Object-relational) s Semistructured data model (XML) s Other older models: q Network model q Hierarchical model atabase System Concepts - 5 th Edition, May 23, 2005 1.9 ©Silberschatz, Korth and Sudarshan
  • 10. Data Manipulation Language (DML) s Language for accessing and manipulating the data organized by the appropriate data model q DML also known as query language s Two classes of languages q Procedural – user specifies what data is required and how to get those data q Declarative (nonprocedural) – user specifies what data is required without specifying how to get those data s SQL is the most widely used query language atabase System Concepts - 5 th Edition, May 23, 2005 1.10 ©Silberschatz, Korth and Sudarshan
  • 11. Data Definition Language (DDL) s Specification notation for defining the database schema Example: create table account ( account_number char(10), branch_name char(10), balance integer) s DDL compiler generates a set of tables stored in a data dictionary s Data dictionary contains metadata (i.e., data about data) q Database schema q Data storage and definition language  Specifies the storage structure and access methods used q Integrity constraints  Domain constraints  Referential integrity (e.g. branch_name must correspond to a valid branch in the branch table) q Authorization atabase System Concepts - 5 th Edition, May 23, 2005 1.11 ©Silberschatz, Korth and Sudarshan
  • 12. Relational Model Attributes s Example of tabular data in the relational model atabase System Concepts - 5 th Edition, May 23, 2005 1.12 ©Silberschatz, Korth and Sudarshan
  • 13. A Sample Relational Database atabase System Concepts - 5 th Edition, May 23, 2005 1.13 ©Silberschatz, Korth and Sudarshan
  • 14. SQL s SQL: widely used non-procedural language q Example: Find the name of the customer with customer-id 192-83-7465 select customer.customer_name from customer where customer.customer_id = ‘192-83-7465’ q Example: Find the balances of all accounts held by the customer with customer-id 192-83-7465 select account.balance from depositor, account where depositor.customer_id = ‘192-83-7465’ and depositor.account_number = account.account_number s Application programs generally access databases through one of q Language extensions to allow embedded SQL q Application program interface (e.g., ODBC/JDBC) which allow SQL queries to be sent to a database atabase System Concepts - 5 th Edition, May 23, 2005 1.14 ©Silberschatz, Korth and Sudarshan
  • 15. Database Design The process of designing the general structure of the database: s Logical Design – Deciding on the database schema. Database design requires that we find a “good” collection of relation schemas. q Business decision – What attributes should we record in the database? q Computer Science decision – What relation schemas should we have and how should the attributes be distributed among the various relation schemas? s Physical Design – Deciding on the physical layout of the database atabase System Concepts - 5 th Edition, May 23, 2005 1.15 ©Silberschatz, Korth and Sudarshan
  • 16. The Entity-Relationship Model s Models an enterprise as a collection of entities and relationships q Entity: a “thing” or “object” in the enterprise that is distinguishable from other objects  Described by a set of attributes q Relationship: an association among several entities s Represented diagrammatically by an entity-relationship diagram: atabase System Concepts - 5 th Edition, May 23, 2005 1.16 ©Silberschatz, Korth and Sudarshan
  • 17. Other Data Models s Object-oriented data model s Object-relational data model atabase System Concepts - 5 th Edition, May 23, 2005 1.17 ©Silberschatz, Korth and Sudarshan
  • 18. Database Application Architectures (web browser) Old Modern atabase System Concepts - 5 th Edition, May 23, 2005 1.18 ©Silberschatz, Korth and Sudarshan
  • 19. Database Management System Internals s Storage management s Query processing s Transaction processing atabase System Concepts - 5 th Edition, May 23, 2005 1.19 ©Silberschatz, Korth and Sudarshan
  • 20. Storage Management s Storage manager is a program module that provides the interface between the low-level data stored in the database and the application programs and queries submitted to the system. s The storage manager is responsible to the following tasks: q Interaction with the file manager q Efficient storing, retrieving and updating of data s Issues: q Storage access q File organization q Indexing and hashing atabase System Concepts - 5 th Edition, May 23, 2005 1.20 ©Silberschatz, Korth and Sudarshan
  • 21. Query Processing 1. Parsing and translation 2. Optimization 3. Evaluation atabase System Concepts - 5 th Edition, May 23, 2005 1.21 ©Silberschatz, Korth and Sudarshan
  • 22. Query Processing (Cont.) s Alternative ways of evaluating a given query q Equivalent expressions q Different algorithms for each operation s Cost difference between a good and a bad way of evaluating a query can be enormous s Need to estimate the cost of operations q Depends critically on statistical information about relations which the database must maintain q Need to estimate statistics for intermediate results to compute cost of complex expressions atabase System Concepts - 5 th Edition, May 23, 2005 1.22 ©Silberschatz, Korth and Sudarshan
  • 23. Transaction Management s A transaction is a collection of operations that performs a single logical function in a database application s Transaction-management component ensures that the database remains in a consistent (correct) state despite system failures (e.g., power failures and operating system crashes) and transaction failures. s Concurrency-control manager controls the interaction among the concurrent transactions, to ensure the consistency of the database. atabase System Concepts - 5 th Edition, May 23, 2005 1.23 ©Silberschatz, Korth and Sudarshan
  • 24. Overall System Structure atabase System Concepts - 5 th Edition, May 23, 2005 1.24 ©Silberschatz, Korth and Sudarshan
  • 25. History of Database Systems s 1950s and early 1960s: q Data processing using magnetic tapes for storage  Tapes provide only sequential access q Punched cards for input s Late 1960s and 1970s: q Hard disks allow direct access to data q Network and hierarchical data models in widespread use q Ted Codd defines the relational data model  Would win the ACM Turing Award for this work  IBM Research begins System R prototype  UC Berkeley begins Ingres prototype q High-performance (for the era) transaction processing atabase System Concepts - 5 th Edition, May 23, 2005 1.25 ©Silberschatz, Korth and Sudarshan
  • 26. History (cont.) s 1980s: q Research relational prototypes evolve into commercial systems  SQL becomes industry standard q Parallel and distributed database systems q Object-oriented database systems s 1990s: q Large decision support and data-mining applications q Large multi-terabyte data warehouses q Emergence of Web commerce s 2000s: q XML and XQuery standards q Automated database administration q Increasing use of highly parallel database systems q Web-scale distributed data storage systems atabase System Concepts - 5 th Edition, May 23, 2005 1.26 ©Silberschatz, Korth and Sudarshan
  • 27. End of Chapter 1 Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See www.db-book.com for conditions on re-use
  • 28. Database Users Users are differentiated by the way they expect to interact with the system s Application programmers – interact with system through DML calls s Sophisticated users – form requests in a database query language s Specialized users – write specialized database applications that do not fit into the traditional data processing framework s Naï ve users – invoke one of the permanent application programs that have been written previously q Examples, people accessing database over the web, bank tellers, clerical staff atabase System Concepts - 5 th Edition, May 23, 2005 1.28 ©Silberschatz, Korth and Sudarshan
  • 29. Database Administrator s Coordinates all the activities of the database system q has a good understanding of the enterprise’s information resources and needs. s Database administrator's duties include: q Storage structure and access method definition q Schema and physical organization modification q Granting users authority to access the database q Backing up data q Monitoring performance and responding to changes  Database tuning atabase System Concepts - 5 th Edition, May 23, 2005 1.29 ©Silberschatz, Korth and Sudarshan
  • 30. Database Architecture The architecture of a database systems is greatly influenced by the underlying computer system on which the database is running: s Centralized s Client-server s Parallel (multiple processors and disks) s Distributed atabase System Concepts - 5 th Edition, May 23, 2005 1.30 ©Silberschatz, Korth and Sudarshan
  • 31. Object-Relational Data Models s Extend the relational data model by including object orientation and constructs to deal with added data types. s Allow attributes of tuples to have complex types, including non-atomic values such as nested relations. s Preserve relational foundations, in particular the declarative access to data, while extending modeling power. s Provide upward compatibility with existing relational languages. atabase System Concepts - 5 th Edition, May 23, 2005 1.31 ©Silberschatz, Korth and Sudarshan
  • 32. XML: Extensible Markup Language s Defined by the WWW Consortium (W3C) s Originally intended as a document markup language not a database language s The ability to specify new tags, and to create nested tag structures made XML a great way to exchange data, not just documents s XML has become the basis for all new generation data interchange formats. s A wide variety of tools is available for parsing, browsing and querying XML documents/data atabase System Concepts - 5 th Edition, May 23, 2005 1.32 ©Silberschatz, Korth and Sudarshan
  • 33. Figure 1.4 atabase System Concepts - 5 th Edition, May 23, 2005 1.33 ©Silberschatz, Korth and Sudarshan
  • 34. Figure 1.7 atabase System Concepts - 5 th Edition, May 23, 2005 1.34 ©Silberschatz, Korth and Sudarshan