Dbms 1

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 23

Acknowledgement

I WISH TO EXPRESS MY SINCERE GRATITUDE TO. MISS NAVNEET


COMPUTER TEACHER OF IHM GURDASPUR, FOR PROVIDING ME AN
OPPORTUNITY TO DO PPT ON DBMS .
SUBMITTED BY – SANCHIT KOUL
ROLL NO-109
PG-4
INTRODUCTION
A DBMS makes it possible for end users to create,
read, update and delete data in a database. The
DBMS essentially serves as an interface between the 
database and end users or application programs,
ensuring that data is consistently organized and
remains easily accessible.
Database management concepts
• Database Management Systems (DBMS)
• An example of a database (relational)
• Database schema (e.g. relational)
• Data independence
• Architecture of a DBMS
• Types of DBMS
• Basic DBMS types
• Retrieving and manipulating data: query processing
• Database views
• Data integrity
• Client-Server architectures
• Knowledge Bases and KBS (and area of AI)
• DBMS tasks:
• Managing large quantity of structured data
• Efficient retrieval and modification: query processing and optimization
• Sharing data: multiple users use and manipulate data
• Controlling the access to data: maintaining the data integrity
• An example of a database (relational):
• Relations (tables)
• Attributes (columns)
• Tuples (rows)
• Example query: Salesperson='Mary' AND Price>100.
• Database schema (e.g. relational):
• Names and types of attributes
• Addresses
• Indexing
• Statistics
• Authorization rules to access data etc.
• Data independence: separation of the physical and logical data
• Particularly important for distributed systems
• The mapping between them is provided by the schema
• Architecture of a DBMS - three levels: external, conceptual and internal schema
• Types of DBMS
• The data structures supported: tables (relational), trees, networks, objects
• Type of service provided: high level query language, programming primitives
Basic DBMS types
• Linear files
• Sequence of records with a fixed format usually stored on a single file
• Limitation: single file
• Example query: Salesperson='Mary' AND Price>100
• Hierarchical structure
• Trees of records: one-to-many relationships
• Limitations:
• Requires duplicating records (e.g. many-to-many relationship)
• Problems when updated
• Retrieval requires knowing the structure (limited data independence):
traversing the tree from top to bottom using a procedural language
• Network structure: similar to the hierarchical database with the
implementation
of many-to-many relationships
• Relational structure
• Object-Oriented structure
Relational structure
• Relations, attributes, tuples
• Primary key (unique combination of attributes for each tuple)
• Foreign keys: relationships between tuples (many-to-many).
Example: SUPPLIES defines relations between ITEM and SUPPLIER tuples.
• Advantages: many-to-many relationships, high level declarative query language (e.g. SQL)
• SQL example (retrieve all items supplied by a supplier located in Troy):
SELECT ItemName
FROM ITEM, SUPPLIES, SUPPLIER
WHERE SUPPLIER.City = "Troy" AND
SUPPLIER.Supplier# = SUPPLIES.Supplier# AND
SUPPLIES.Item# = ITEM.Item#
• Programming language interfaces: including SQL queries in the code
Retrieving and manipulating data: query processing

• Parsing and validating a query: data dictionary - a relation listing all relations and
relations listing the attributes
• Plans for computing the query: list of possible way to execute the query,
estimated cost for each. Example:
SELECT ItemNames, Price
FROM ITEM, SALES
WHERE SALES.Item# = ITEM.Item# AND Salesperson="Mary"
• Index: B-tree index, drawbacks - additional space, updating;
indexing not all relations (e.g. the keys only)
• Estimating the cost for computing a query: size of the relation, existence/size of the indices.
Example: estimating Attribute=value with a given number of tuples and the size of the index.
• Query optimization: finding the best plan (minimizing the computational cost and
the size of the intermediate results), subsets of tuples, projection and join.
Database views
• Creating user defined subsets of the database
• Improving the user interface
• Example:
CREATE VIEW MarySales(ItemName,Price)
AS SELECT ItemName, Price
FROM ITEM, SALES
WHERE ITEM.Item#=SALES.Item# AND Salesperson="Mary"

Then the query:

SELECT ItemName
FROM MarySales
WHERE Proce>100

translates to:

SELECT ItemName
FROM ITEM, SALES
WHERE ITEM.Item#=SALES.Item# AND Salesperson="Mary" AND Price>100
Data integrity

Integrity constraints: semantic conditions on the data


• Individual constraints on data items
• Uniqueness of the primary keys
• Dependencies between relations
Concurrency control
• Steps in executing a query
• Concurrent users of the database, interfering the execution of one query by another
• Transaction: a set of operations that takes the database from one consistent state to another
• Solving the concurrency control problem: making transactions atomic operations (one at a time)
• Concurrent transactions: serializability theory (two-phase locking), read lock (many), write lock
(one).
• Serializible transactions: first phase - accumulating locks, second phase - releasing locks.
• Deadlocks: deadlock detection algorithms.
• Distributed execution problems:
• release a lock at one node (all locks accumulated at the other node?)
• strict two-phase locking
The Transaction Model

Primitive Description

BEGIN_TRANSACTION Make the start of a transaction

END_TRANSACTION Terminate the transaction and try to commit

ABORT_TRANSACTION Kill the transaction and restore the old values

READ Read data from a file, a table, or otherwise

WRITE Write data to a file, a table, or otherwise

• Examples of primitives for transactions.


The Transaction Model
BEGIN_TRANSACTION BEGIN_TRANSACTION
reserve WP -> JFK; reserve WP -> JFK;
reserve JFK -> Nairobi; reserve JFK -> Nairobi;
reserve Nairobi -> Malindi; reserve Nairobi -> Malindi full =>
END_TRANSACTION ABORT_TRANSACTION
(a) (b)

a) Transaction to reserve three flights commits


b) Transaction aborts when third flight is unavailable
Distributed Transactions

a) A nested transaction
b) A distributed transaction
Concurrency Control (1)

.
Popular types of DBMS
Popular database models and their management
systems include:
Relational database management system (RDMS)  -
adaptable to most use cases, but RDBMS Tier-1
 products can be quite expensive.
NoSQL DBMS - well-suited for loosely defined data
structures that may evolve over time. 
In-memory database management system
(IMDBMS) - provides faster response times and
better performance.
Columnar database management system (CDBMS) -
well-suited for data warehouses that have a large
number of similar data items.
USES

 Connolly and Begg define Database Management System


(DBMS) as a "software system that enables users to define,
create, maintain and control access to the database".[24]
 The DBMS acronym is sometime extended to indicated the
underlying database model, with RDBMS for relational,
OODBMS or ORDBMS for the object (orientated)
model and ORDBMS for Object-Relational. Other
extensions can indicate some other characteristic, such as
DDBMS for a distributed database management systems.
 The functionality provided by a DBMS can vary enormously. The
core functionality is the storage, retrieval and update of
data. Codd proposed the following functions and services a fully-
fledged general purpose DBMS should provide:[25]
 Data storage, retrieval and update
 User accessible catalog or data dictionary describing the
metadata
 Support for transactions and concurrency
 Facilities for recovering the database should it become damaged
 Support for authorization of access and update of data
 Access support from remote locations
 Enforcing constraints to ensure data in the database abides by
certain rules
USE OF DBMS IN HOTEL INDUSTRY

The system provides hospitality marketers with enterprisewide features to


understand and serve their guests better and to develop one-to-one
customer communications. DM1 Corporate Hospitality also offers data
hygiene and enhancement capabilities and provides analysis through
ad hoc query and online analytical processing software, data
visualization, modeling, reporting and campaign management. It
incorporates third-party technologies from companies such as Oracle,
Cognos, Dimensional Insight and MapInfo.

Whether installed at a company or used as an application service


provider, users can access the suite via the Internet. The solution also
can be implemented more quickly because it is a template solution
rather than a fully customizable offering, which it had been in the past
 Data management system is needed for data access
within the company
 Modern database management systems are dependent on a
programming language that is called structured query language.
This language is then used to access, update and delete data that
are present within its tables. The database systems also contain
programs that include Microsoft’s SQL server and the open
source MySQL queries that enable outside programs to access its
data through SQL queries. For example, a web page can display
information or data that includes product data and description,
photographs and prices. This information is easily available to the
user easily, when the web server software is connected to the
relational database management system.
 It is needed to maintain strong relationships between
data
 of the most important functions of relational database
management systems programs is that it allows different data
tables to relate to one another. When a database contains
information about employee data on its product sales in one
table and another table contain information one with sales
employee data, then a relational database will be perfect to
manage their relationships in a systematic and simple style. This
system in turn can help brand managers to understand
important statistics like which salesperson is able to sell the most
or which product is being sold by a particular salesperson.
 It is needed to maintain strong relationships between data
 One of the most important functions of relational database
management systems programs is that it allows different data tables to
relate to one another. When a database contains information about
employee data on its product sales in one table and another table
contain information one with sales employee data, then a relational
database will be perfect to manage their relationships in a systematic
and simple style. This system in turn can help brand managers to
understand important statistics like which salesperson is able to sell the
most or which product is being sold by a particular salesperson.
THANK YOU

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy