Security, Transactions, and Views. Security Achieved through GRANT & REVOKE Assumes the database can recognize its users and verify their identity can.

Slides:



Advertisements
Similar presentations
Chapter 23 Database Security and Authorization Copyright © 2004 Pearson Education, Inc.
Advertisements

Transaction Processing. Objectives After completing this lesson, you should be able to do the following: –Define transactions effectively for an application.
Database Management System
10/25/2001Database Management -- R. Larson Data Administration and Database Administration University of California, Berkeley School of Information Management.
A Guide to SQL, Seventh Edition. Objectives Create a new table from an existing table Change data using the UPDATE command Add new data using the INSERT.
Database Administration Chapter Six DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
Introduction to Structured Query Language (SQL)
Transaction Management and Concurrency Control
Transaction Management and Concurrency Control
Chapter 3: Using SQL Queries to Insert, Update, Delete, and View Data
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 8-1 COS 346 Day 18.
Security and Transaction Management Pertemuan 8 Matakuliah: T0413/Current Popular IT II Tahun: 2007.
A Guide to MySQL 7. 2 Objectives Understand, define, and drop views Recognize the benefits of using views Use a view to update data Grant and revoke users’
Introduction to Structured Query Language (SQL)
9 Chapter 9 Transaction Management and Concurrency Control Hachim Haddouti.
A Guide to SQL, Seventh Edition. Objectives Understand, create, and drop views Recognize the benefits of using views Grant and revoke user’s database.
Database Administration Part 1 Chapter Six CSCI260 Database Applications.
Functions of a Database Management System. Functions of a DBMS C.J. Date n Indexing n Views n Security n Integrity n Concurrency n Backup/Recovery n Design.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Transaction Management and Concurrency Control.
Using SQL Queries to Insert, Update, Delete, and View Data © Abdou Illia MIS Spring 2015 Wednesday 1/28/2015 Chapter 3A.
Chapter 1 Introduction to Databases
Database Management Systems (DBMS)
Training on Koha ILS organized by BALID Institute of Information Management 3-7 September Basic of MySQL Prepared by Nur Ahammad Junior Assistant Librarian.
10/5/1999Database Management -- R. Larson Data Administration and Database Administration University of California, Berkeley School of Information Management.
Objectives of the Lecture :
Managing Multi-User Databases AIMS 3710 R. Nakatsu.
DBSQL 7-1 Copyright © Genetic Computer School 2009 Chapter 7 Transaction Management, Database Security and Recovery.
Multi-user Database Processing Architectures Architectures Transactions Transactions Security Security Administration Administration.
1 Transactions BUAD/American University Transactions.
HAP 709 – Healthcare Databases SQL Data Manipulation Language (DML) Updated Fall, 2009.
Database Management System Module 5 DeSiaMorewww.desiamore.com/ifm1.
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 10 Transaction Management.
Chapter 6 Database Administration
Security, Transactions, and Views. About Security As is the case in most shared environments, the DBMS also must implement a security mechanism that allows.
7 1 Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
MySQL Database Connection
Instructor: Dema Alorini Database Fundamentals IS 422 Section: 7|1.
Quick review of SQL And conversion to Oracle SQL.
Concurrency Control in Database Operating Systems.
Oracle 11g DATABASE DEVELOPMENT LAB1. Introduction  Oracle 11g Database:-  Oracle 11g database is designed for some features, which helps to the organizations.
Lesson Overview 3.1 Components of the DBMS 3.1 Components of the DBMS 3.2 Components of The Database Application 3.2 Components of The Database Application.
11/7/2012ISC329 Isabelle Bichindaritz1 Transaction Management & Concurrency Control.
Chapter 9 Database Systems Introduction to CS 1 st Semester, 2014 Sanghyun Park.
ITBIS373 Database Development Lecture 3a - Chapter 3: Using SQL Queries to Insert, Update, Delete, and View Data.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Database structure and space Management. Segments The level of logical database storage above an extent is called a segment. A segment is a set of extents.
INFO1408 Database Design Concepts Week 16: Introduction to Database Management Systems Continued.
Business Solutions. Formatting It is sometimes necessary to alter the output of a query for the sake of readability such as in report generation. This.
Chapter 13 Views Oracle 10g: SQL. Oracle 10g: SQL2 Objectives Create a view, using CREATE VIEW command or the CREATE OR REPLACE VIEW command Employ the.
1 Announcements Reading for next week: Chapter 4 Your first homework will be assigned as soon as your database accounts have been set up.  Expect an .
CSC 411/511: DBMS Design Dr. Nan WangCSC411_L12_JDBC_MySQL 1 Transations.
A Guide to SQL, Eighth Edition Chapter Six Updating Data.
Security, Transactions, and Views. About Security As is the case in most shared environments, the DBMS also must implement a security mechanism that allows.
Business Solutions. Formatting It is sometimes necessary to alter the output of a query for the sake of readability such as in report generation. This.
A Guide to MySQL 6. 2 Objectives Create a new table from an existing table Change data using the UPDATE command Add new data using the INSERT command.
A Guide to SQL, Sixth Edition 1 Chapter 5 Updating Data.
1 Database Fundamentals Introduction to SQL. 2 SQL Overview Structured Query Language The standard for relational database management systems (RDBMS)
SQL Triggers, Functions & Stored Procedures Programming Operations.
MY SQL INTRODUCTION TO LOGIN BASIC COMMANDS OTHER COMMANDS.
Chapter 13 Managing Transactions and Concurrency Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition.
7.5 Using Stored-Procedure and Triggers NAME MATRIC NUM GROUP Muhammad Azwan Bin Khairul Anwar CS2305A Muhammad Faiz Bin Badrol Shah CS2305B.
SYSTEMS IMPLEMENTATION TECHNIQUES TRANSACTION PROCESSING DATABASE RECOVERY DATABASE SECURITY CONCURRENCY CONTROL.
1 Section 9 - Views, etc. u Part 1: Views u Part 2:Security Issues u Part 3:Transaction Management u Part 4:Set Operations u Part 5:Triggers and Stored.
Chapter 9 Database Systems
Functions of a Database Management System
Introduction To Database Systems
DATABASE MANAGEMENT SYSTEM
Chapter 10 Transaction Management and Concurrency Control
SQL Fundamentals in Three Hours
SQL .. An overview lecture3.
Presentation transcript:

Security, Transactions, and Views

Security Achieved through GRANT & REVOKE Assumes the database can recognize its users and verify their identity can also be controlled through the use of views - subsets of data usually maintained by the database administrator or DBA

Views A view is representation of an existing table which corresponds to the SELECT statement that created it. The view can then be manipulated much like an actual table. A view is not a separate table or entity. It’s more like a mask of the actual table.

Uses of a VIEW Hiding sensitive data from users Preserving a previous table schema Presenting data to users in a desired format. Simplify a complex query

Creating a VIEW CREATE VIEW view_name [(col_name…)] AS SELECT _statement

Dropping a VIEW DROP VIEW view_name Only drops the view… not the table.

More about Views The view displays like any table and the data you see is the actual data in the table(s). A view is more for viewing rather than updating since an update could disqualify a record from the view. Updates made to a view are made to the table(s) and any changes made to the table(s) are reflected in the view.

Naming View Columns Column names are inherited from the underlying tables. New names can be assigned Columns must be renamed when using arithmetic expressions or when more than one column has the same name.

Formatting It is sometimes necessary to alter the output of a query for the sake of readability such as in report generation. This can also be applied to a view creation which users will share.

SUBSTRING Returns a part of a character or binary string. SUBSTRING (expression, start, length) SUBSTRING (‘SQL Programming’, 1, 3) = SQL

CONVERT Changes one datatype to another. CONVERT(datatype[length], expression) CONVERT(char(2), ‘SQL’) = SQ CONVERT(int, ‘10’) = 10

Using them together... Select substring(title_id, 1, 2) as alpha convert(int, substring(title_id, 3, 4)) as num from titles

Transactions are... Transaction - Logical unit of work Transaction Management - ensuring that a set of SQL statements is treated as a unit - an indivisible entity

Transactions A transaction is a set of SQL statements that represent a unit of work or a procedural operation. A transaction is not complete unless all off its steps are followed through. This can be critical to maintaining data integrity such as when an account must be credited while debiting another.

Why transactions? Transactions are necessary for the purpose of concurrency control and recovery concurrency control - allowing multiple users simultaneous access recovery - allowing the database system to return the database to a reliable state after a failure.

Concurrency Lost-update problem Locking database system puts a lock on accessed data so it cannot be altered until lock is released.

Locking Since many users may be trying to access the same data simultaneously the DBMS has a locking mechanism which locks data which is in use. This provides a solution to concurrency problems which would arise if locking were not available.

2 Types of Locks Exclusive - for UPDATE, INSERT, and DELETE (write operations) - no other transaction can acquire lock until original is released Shared - applied during non-update or read operations - usually SELECT - prevents write operations from acquiring lock - allows other read operations to share lock

Recovery Allows a database to bounce back after a system failure must decide what transactions are incomplete which transactions completed but were not written and must be redone

User-defined Transactions Allows user to define any number of SQL statements as a transaction and instruct the database to process them as one unit.

Defining a Transaction A transaction starts with the keyword BEGIN BEGIN SQL statement SQL statement SQL statement COMMIT

Finishing the Transaction If the transaction goes successfully then the COMMIT command will commit the changes to the database. However, if an error occurs the ROLLBACK command can be used to restore the database to its state prior to the transaction.