Sei sulla pagina 1di 46

CS 228: Database Management System

Introduction

Combined Slides based on Database System Concepts, 6th Ed.


& Database Management Systems 3rd Ed.
©Silberschatz, Korth and Sudarshan
See www.db-book.com for conditions on re-use ,
& Raghu Ramakrishnan, Johannes Gehrke
Instructor: Mr. Thomas
Course Description……..(10 Credit s)
 This course introduces student to database management systems
 Course objectives:
 To give students an in-depth skills on the Database Management
Systems concept
 Learning Outcomes
 Upon completion of this course, students should be able to:
 Describe the architecture and capabilities of a modern Relational
Database Management System (DBMS) and compare and contrast
with other database models.
 Explain and describe how a DBMS facilitates transaction
management, concurrency and recovery.
 Describe the principals involved in ensuring data security and privacy
in a database system.
 Evaluate the effects of data restructuring and take action to maintain
data independence.
 Prerequisite: CS 125: Introduction to Database Systems
Instructor: Mr. Thomas
Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.2 ©Silberschatz, Korth and Sudarshan
Course content
 Introduction: Overview, Database modules, Data storage and
querying, Introduction Transaction management and concurrency
control, Data mining, Data warehousing and Information retrieval;
History of Database.
 Features of Good Relational Design: Atomic Domains and First
Normal Form, Decomposition Using Functional Dependencies,
Functional Dependency Theory, Algorithms for Functional
Dependencies Decomposition Using Multivalued, Dependencies, More
Normal Form, Database-Design Process Modeling Temporal Data.
 Overview of Object-Oriented Data Modeling: Object definition,
Types and classes, Object methods, Assertions and constraints,
ODMG, Storage structure for complex/composite objects, Object
identity, Encapsulation, Types/classes, Inheritance, late binding,
Persistence.
 Relational and relational algebra: Structure of Relational
Databases, Fundamental Relational-Algebra Operations, Additional
Relational-Algebra-Operations, Extended Relational-Algebra-
Operations Null Values, Modification of the Database.
Instructor: Mr. Thomas
Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.3 ©Silberschatz, Korth and Sudarshan
Course content
 Query: Query Processing, Query Optimization Basic Concepts.
 Transactions: Transaction Concept, Transaction State, Concurrent
Executions, Serializability, Recoverability, Implementation of Isolation,
Transaction Definition in SQL, Testing for Serializability
 Concurrency Control: Lock-Based Protocols, Timestamp-Based
Protocols, Validation-Based, Protocols, Multiple Granularity,
Multiversion Schemes, Insert and Delete Operations, Concurrency in
Index Structures.
 Recovery System: Failure Classification, Storage Structure,
Recovery and Atomicity, Log-Based Recovery, Shadow Paging,
Recovery With Concurrent Transactions, Buffer Management, Failure
with Loss of Nonvolatile Storage, Advanced Recovery Techniques,
ARIES Recovery Algorithm Remote Backup Systems.
 Database Integrity and Security: Data protection, Domain
Constraints, Referential Integrity, Assertions, Triggers, Security,
Authorization control, Authorization in SQL

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.4 ©Silberschatz, Korth and Sudarshan
Delivery mode
 Single 2 hours Lecture per week
 Single 1 hour Tutorial session per week. Will be occupied by readings
and discussion questions. Two Questions from the discussion
Questions shall appear in the Quiz prior to the start of the following
lectures. The Quiz shall take only first 10 Minutes prior to the start of
the lecture. If you miss the quiz, it counts that you’ve missed that
session regardless of your presence, which will eventually affect
you CA on the attendance.
 Self readings, at least 2 not necessarily consecutive, 4 Hours per
week
 This course is a theoretical and has no practical session.

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.5 ©Silberschatz, Korth and Sudarshan
Mode of Assessment
 Attendance 90% of lectures……………………...5 Marks
 Quizzes……………………………………………...10 Marks
 Assignments ………………………………………10 Marks
 Tests………………………………………………..15 Marks
 Sub Total…………………………………………………40 Marks
 Final Exam…………………………………………..60 Marks
 Sub Total………………………………………………...60 Marks
 Cumulative CA + Final………………………100 Marks

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.6 ©Silberschatz, Korth and Sudarshan
Outline of Today Discussion

 The Need for Databases


 Data Models
 Relational Databases
 Database Design
 Storage Manager
 Query Processing
 Transaction Manager

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.7 ©Silberschatz, Korth and Sudarshan
Database Management System (DBMS)

 DBMS contains information about a particular enterprise


 Collection of interrelated data
 Set of programs to access the data
 An environment that is both convenient and efficient to use
 Database Applications:
 Banking: transactions
 Airlines: reservations, schedules
 Universities: registration, grades
 Sales: customers, products, purchases
 Online retailers: order tracking, customized recommendations
 Manufacturing: production, inventory, orders, supply chain
 Human resources: employee records, salaries, tax deductions
 Databases can be very large.
 Databases touch all aspects of our lives
Instructor: Mr. Thomas
Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.8 ©Silberschatz, Korth and Sudarshan
University Database Example
 Application program examples
 Add new students, instructors, and courses
 Register students for courses, and generate class rosters
 Assign grades to students, compute grade point averages
(GPA) and generate transcripts
 In the early days, database applications were built directly on
top of file systems

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.9 ©Silberschatz, Korth and Sudarshan
Drawbacks of using file systems to store data

 Data redundancy and inconsistency


 Multiple file formats, duplication of information in different files
 Difficulty in accessing data
 Need to write a new program to carry out each new task
 Data isolation
 Multiple files and formats
 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

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.10 ©Silberschatz, Korth and Sudarshan
Drawbacks of using file systems to store data
(Cont.)
 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
 Concurrent access by multiple users
 Concurrent access needed for performance
 Uncontrolled concurrent accesses can lead to inconsistencies
 Example: Two people reading a balance (say 100) and
updating it by withdrawing money (say 50 each) at the same
time
 Security problems
 Hard to provide user access to some, but not all, data

Database systems offer solutions to all the above problems


Instructor: Mr. Thomas
Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.11 ©Silberschatz, Korth and Sudarshan
Advantages of A DBMS
 Data Independence:
 Application programs should not, ideally, be exposed to details of
data representation and storage, The DBJVIS provides an
abstract view of the data that hides such details.
 Efficient Data Access:
 A DBMS utilizes a variety of sophisticated techniques to store and
retrieve data efficiently. This feature is especially important if the
data is stored on external storage devices.
 Data Integrity and Security:
 If data is always accessed through the DBMS, the DBMS can
enforce integrity constraints. For example, before inserting salary
information for an employee, the DBMS can check that the
department budget is not exceeded. Also, it can enforce access
contmls that govern what data is visible to different classes of
users.

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.12 ©Silberschatz, Korth and Sudarshan
Advantages of A DBMS (Cont.)
 Data Administration:
 When several users share the data, centralizing the administration of data
can offer significant improvements. Experienced professionals who
understand the nature of the data being managed, and how different
groups of users use it, can be responsible for organizing the data
representation to minimize redundancy and for fine-tuning the storage of
the data to make retrieval efficient.
 Concurrent Access and Crash Recovery:
 A DBMS schedules concurrent accesses to the data in such a manner
that users can think of the data as being accessed by only one user at a
time. Further, the DBMS protects users from the effects of system failures.
 Reduced Application Development Time:
 Clearly, the DBMS supports important functions that are common to many
applications accessing data in the DBMS. This, in conjunction with the
high-level interface to the data, facilitates quick application development.
DBMS applications are also likely to be more robust than similar stand-
alone applications because many important tasks are handled by the
DBMS (and do not have to be debugged and tested in the application).

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.13 ©Silberschatz, Korth and Sudarshan
Levels of Abstraction
 Physical level: describes how a record (e.g., instructor) is stored.
 Logical level: describes data stored in database, and the relationships
among the data.
type instructor = record
ID : string;
name : string;
dept_name : string;
salary : integer;
end;
 View level: application programs hide details of data types. Views can
also hide information (such as an employee’s salary) for security
purposes.

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.14 ©Silberschatz, Korth and Sudarshan
View of Data

An architecture for a database system

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.15 ©Silberschatz, Korth and Sudarshan
Instances and Schemas
 Similar to types and variables in programming languages
 Logical Schema – the overall logical structure of the database
 Example: The database consists of information about a set of
customers and accounts in a bank and the relationship between them
 Analogous to type information of a variable in a program
 Physical schema – the overall physical structure of the database
 Instance – the actual content of the database at a particular point in time
 Analogous to the value of a variable
 Physical Data Independence – the ability to modify the physical schema
without changing the logical schema
 Applications depend on the logical schema
 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.

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.16 ©Silberschatz, Korth and Sudarshan
Data Models
 is a collection of high-level data description constructs that hide
many low-level storage details i.e. collection of tools for describing
 Data
 Data relationships
 Data semantics
 Data constraints

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

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.17 ©Silberschatz, Korth and Sudarshan
Relational Model
 All the data is stored in various tables.
 Example of tabular data in the relational model Columns

Rows

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.18 ©Silberschatz, Korth and Sudarshan
A Sample Relational Database

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.19 ©Silberschatz, Korth and Sudarshan
Data Definition Language (DDL)
 Specification notation for defining the database schema
Example: create table instructor (
ID char(5),
name varchar(20),
dept_name varchar(20),
salary numeric(8,2))
 DDL compiler generates a set of table templates stored in a data dictionary
 Data dictionary contains metadata (i.e., data about data)
 Database schema
 Integrity constraints
 Primary key (ID uniquely identifies instructors)
 Authorization
 Who can access what

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.20 ©Silberschatz, Korth and Sudarshan
Data Manipulation Language (DML)
 Language for accessing and manipulating the data organized
by the appropriate data model
 DML also known as query language
 Two classes of languages
 Pure – used for proving properties about computational
power and for optimization
 Relational Algebra
 Tuple relational calculus
 Domain relational calculus
 Commercial – used in commercial systems
 SQL is the most widely used commercial language

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.21 ©Silberschatz, Korth and Sudarshan
SQL

 The most widely used commercial language


 SQL is NOT a Turing machine equivalent language
 To be able to compute complex functions SQL is usually
embedded in some higher-level language
 Application programs generally access databases through one of
 Language extensions to allow embedded SQL
 Application program interface (e.g., ODBC/JDBC) which allow
SQL queries to be sent to a database

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.22 ©Silberschatz, Korth and Sudarshan
Database Design
The process of designing the general structure of the database:

 Logical Design – Deciding on the database schema.


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

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.23 ©Silberschatz, Korth and Sudarshan
Database Design (Cont.)
 Is there any problem with this relation?

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.24 ©Silberschatz, Korth and Sudarshan
Design Approaches
 Need to come up with a methodology to ensure that each of the
relations in the database is “good”
 Two ways of doing so:
 Entity Relationship Model
 Models an enterprise as a collection of entities and
relationships
 Represented diagrammatically by an entity-relationship
diagram:
 Normalization Theory
 Formalize what designs are bad, and test for them

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.25 ©Silberschatz, Korth and Sudarshan
Object-Relational Data Models
 Relational model: flat, “atomic” values
 Object Relational Data Models
 Extend the relational data model by including object orientation
and constructs to deal with added data types.
 Allow attributes of tuples to have complex types, including non-
atomic values such as nested relations.
 Preserve relational foundations, in particular the declarative
access to data, while extending modeling power.
 Provide upward compatibility with existing relational languages.

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.26 ©Silberschatz, Korth and Sudarshan
XML: Extensible Markup Language
 Defined by the WWW Consortium (W3C)
 Originally intended as a document markup language not a
database language
 The ability to specify new tags, and to create nested tag structures
made XML a great way to exchange data, not just documents
 XML has become the basis for all new generation data interchange
formats.
 A wide variety of tools is available for parsing, browsing and
querying XML documents/data

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.27 ©Silberschatz, Korth and Sudarshan
Database Engine
 Storage manager: the component of a database system that
provides the interface between the low-level data stored in the
database and the application programs and queries submitted to
the system.
 The storage manager is responsible for the interaction with the
file manager. The raw data are stored on the disk using the file
system provided by the operating system.
 The storage manager translates the various DML statements
into low-level file-system commands
 It is, the storage manager is responsible for storing, retrieving,
and updating data in the database.
 The storage manager components include:
 Authorization and integrity manager, Transaction
manager, File manager and Buffer manager
 The storage manager implements several data structures as
part of the physical system implementation:
 Data files, Data dictionaries and Indices Instructor: Mr. Thomas
Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.28 ©Silberschatz, Korth and Sudarshan
Database Engine
 Query processing:
 DDL interpreter: which interprets DDL statements and records
the definitions in the data dictionary.
 DML compiler: which translates DML statements in a query
language into an evaluation plan consisting of low-level
instructions that the query evaluation engine understands.
 A query can usually be translated into any of a number of
alternative evaluation plans that all give the same result.
 The DML compiler also performs query optimization; that is,
it picks the lowest cost evaluation plan from among the
alternatives.
 Query evaluation engine, which executes low-level
instructions generated by the DML compiler.

 Transaction manager
Instructor: Mr. Thomas
Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.29 ©Silberschatz, Korth and Sudarshan
Query Processing
1. Parsing and translation
2. Optimization
3. Evaluation

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.30 ©Silberschatz, Korth and Sudarshan
Query Processing (Cont.)
 Alternative ways of evaluating a given query
 Equivalent expressions
 Different algorithms for each operation
 Cost difference between a good and a bad way of evaluating a
query can be enormous
 Need to estimate the cost of operations
 Depends critically on statistical information about relations
which the database must maintain
 Need to estimate statistics for intermediate results to compute
cost of complex expressions

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.31 ©Silberschatz, Korth and Sudarshan
Database Engine
 The transaction manager (TM) of a DBMS controls the
execution of transactions.
 The DBMS supports concurrency and crash recovery by
carefully scheduling user requests and maintaining a log of all
changes to the database using TM.
 TM ensures that transactions request and release locks are
according to a suitable locking protocol and schedules the
execution transactions;
 the lock manager, keeps track of requests for locks and grants
locks on database objects when they become available
 the recovery manager, is responsible for maintaining logs and
restoring the system to a consistent state after crash.
 The disk space manager, buffer manager, and file and
access method layers must interact with these components.

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.32 ©Silberschatz, Korth and Sudarshan
Transaction Management
 What if the system fails?
 What if more than one user is concurrently updating the same
data?
 A transaction is a collection of operations that performs a single
logical function in a database application
 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.
 Concurrency-control manager controls the interaction among
the concurrent transactions, to ensure the consistency of the
database.

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.33 ©Silberschatz, Korth and Sudarshan
Database Users and Administrators

Database

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.34 ©Silberschatz, Korth and Sudarshan
Database System Internals
 This Fig. shows various components
of a database system and the
connections among them

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.35 ©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:
 Database systems can be centralized, or client-server, where one
server machine executes work on behalf of multiple client machines.
 Database systems can also be designed to exploit parallel computer
architectures.
 Distributed databases span multiple geographically separated
machines.

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.36 ©Silberschatz, Korth and Sudarshan
Database Architecture

 Database applications are usually partitioned into two or three parts.


 In a two-tier architecture, the application resides at the client
machine, where it invokes database system functionality at the
server machine through query language statements
 Application program interface standards like ODBC and JDBC are
used for interaction between the client and the server.
 In contrast, in a three-tier architecture, the client machine acts as
merely a front end and does not contain any direct database calls.
 Instead, the client end communicates with an application server,
usually through a forms interface. The application server in
turn communicates with a database system to access data.
 The business logic of the application, which says what
actions to carry out under what conditions, is embedded in the
application server, instead of being distributed across multiple
clients.
 Three-tier applications are more appropriate for large
applications, and for applications that run on the WorldWideWeb.
Instructor: Mr. Thomas
Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.37 ©Silberschatz, Korth and Sudarshan
Database Architecture

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.38 ©Silberschatz, Korth and Sudarshan
Data Warehousing, Data Mining and
Information Retrieval
 The term data mining refers loosely to the process of
semiautomatically analyzing large databases to find useful patterns.
 Like knowledge discovery in artificial intelligence (also called machine
learning) or statistical analysis, data mining attempts to discover
rules and patterns from data. However, data mining differs from
machine learning and statistics in that it deals with large volumes of
data, stored primarily on disk.
 That is, data mining deals with “knowledge discovery in databases.”
 Large companies have diverse sources of data that they need to use
for making business decisions.
 To execute queries efficiently on such diverse data, companies have
built data warehouses.
 Data warehouses gather data from multiple sources under a unified
schema, at a single site. Thus, they provide the user with a single
uniform interface to data
 When considering textual data database which are unstructured,
Querying of unstructured textual data is referred to as information
Instructor: Mr. Thomas
Combined lectureretrieval.
from Database System Concepts - 6 Ed. & Database Management System – 3rd Ed.
th

1.39 ©Silberschatz, Korth and Sudarshan


History of Database Systems
 1950s and early 1960s:
 Data processing using magnetic tapes for storage
 Tapes provided only sequential access
 Punched cards for input
 Late 1960s and 1970s:
 Hard disks allowed direct access to data
 Network and hierarchical data models in widespread use
 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
 High-performance (for the era) transaction processing

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.40 ©Silberschatz, Korth and Sudarshan
History (cont.)
 1980s:
 Research relational prototypes evolve into commercial systems
 SQL becomes industrial standard
 Parallel and distributed database systems
 Object-oriented database systems
 1990s:

Large decision support and data-mining applications
 Large multi-terabyte data warehouses
 Emergence of Web commerce
 Early 2000s:
 XML and XQuery standards
 Automated database administration
 Later 2000s:
 Giant data storage systems
 Google BigTable, Yahoo PNuts, Amazon, ..
Instructor: Mr. Thomas
Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.41 ©Silberschatz, Korth and Sudarshan
Reading exercise
 Read chapter 1 of Database Systems Concepts and or chapter 1 of
Database Management Systems and attempt the following
Discussion Questions

 Please Read!!!!!!

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.42 ©Silberschatz, Korth and Sudarshan
Discussion Question
1. What are the main benefits of using a DBMS to manage data in
applications involving extensive data access?
2. When would you store data in a DBMS instead of in operating
system files and vice-versa?
3. What are locks in a DBMS, and why are they used? What is
write-ahead logging, and why is it used? What is checkpointing
and why is it used?
4. Explain the difference between logical and physical data
independence.
5. Explain the difference between two-tier and three-tier
architectures. Which is better suited for Web applications?
Why?
6. Explain the difference between external, internal, and
conceptual schemas. How are these different schema layers
related to the concepts of logical and physical data
independence?
Combined lecture from Database System Concepts - 6 Ed. & Database Management System – 3rd Ed.
th
Instructor: Mr. Thomas
1.43 ©Silberschatz, Korth and Sudarshan
Discussion Question
6. Scrooge McNugget wants to store information (names,
addresses, descriptions of embarrassing moments, etc.) about
the many ducks on his payroll. Not surprisingly, the volume of
data compels him to buy a database system. To save money,
he wants to buy one with the fewest possible features, and he
plans to run it as a stand-alone application on his PC alone.
Of course, Scrooge does not plan to share his list with
anyone. Indicate which of the following DBMS features
Scrooge should pay for; in each case, also indicate why
Scrooge should (or should not) pay for that feature in the
system he buys.
i. A security facility.
ii. Concurrency control.
iii. Crash recovery.
iv. A view mechanism.
v. A query language.
Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
Instructor: Mr. Thomas
1.44 ©Silberschatz, Korth and Sudarshan
Discussion Question
7. List five ways in which the type declaration system of a
language such as Java or C++ differs from the data definition
language used in a database.
8. Suppose you want to build a video site similar to YouTube.
Consider each of the points listed in 7.), as disadvantages of
keeping data in a file-processing system. Discuss the
relevance of each of these points to the storage of actual
video data, and to metadata about the video, such as title, the
user who uploaded it, tags, and which users viewed it.
9. List at least two reasons why database systems support data
manipulation using a declarative query language such as
SQL, instead of just providing a a library of C or C++ functions
to carry out data manipulation

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.45 ©Silberschatz, Korth and Sudarshan
End of Lecture 01

Instructor: Mr. Thomas


Combined lecture from Database System Concepts - 6th Ed. & Database Management System – 3rd Ed.
1.46 ©Silberschatz, Korth and Sudarshan

Potrebbero piacerti anche