Database Integrity and Security HAP 709 – Healthcare Databases George Mason University Janusz Wojtusiak, PhD Fall, 2010.

Slides:



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

By RUPESH KUMAR.  Database? Types? Abstraction?  Database Models?  Database Integrity?  ACID?  RDBMS?  Normalization?  Data Warehouse?  Database.
Database Management System
Introduction to Database Management  Department of Computer Science Northern Illinois University January 2001.
Monday, 08 June 2015Dr. Mohamed Osman1 What is Database Administration A high level function (technical Function) that is responsible for ► physical DB.
Maintenance Modifying the data –Add records –Delete records –Update records Modifying the design –Add fields into tables –Remove fields from a table –Change.
Database Integrity, Security and Recovery Database integrity Database integrity Database security Database security Database recovery Database recovery.
Database Management: Getting Data Together Chapter 14.
Transaction Management and Concurrency Control
DBMS Functions Data, Storage, Retrieval, and Update
Concepts of Database Management Sixth Edition
Chapter 8 Security Transparencies © Pearson Education Limited 1995, 2005.
Database Design Concepts INFO1408 Term 2 week 1 Data validation and Referential integrity.
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)
A Guide to SQL, Seventh Edition. Objectives Understand, create, and drop views Recognize the benefits of using views Grant and revoke user’s database.
CSC 2720 Building Web Applications Database and SQL.
Database Administration Part 1 Chapter Six CSCI260 Database Applications.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Transaction Management and Concurrency Control.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Transaction Management Chapter 9. What is a Transaction? A logical unit of work on a database A logical unit of work on a database An entire program An.
Chapter 9 Database Management
Database Management System Lecture 2 Introduction to Database management.
Managing Multi-User Databases AIMS 3710 R. Nakatsu.
Introduction to DBMS and SQL Introduction to DBMS and SQL GUIDED BY : MR. YOGESH SAROJ (PGT-CS) MR. YOGESH SAROJ (PGT-CS) Presented By : JAYA XII –COM.
Chapter 6: Integrity and Security Thomas Nikl 19 October, 2004 CS157B.
Database Lecture # 1 By Ubaid Ullah.
DBMS By Narinder Singh Computer Sc. Deptt. Topics What is DBMS What is DBMS File System Approach: its limitations File System Approach: its limitations.
PHP Programming with MySQL Slide 8-1 CHAPTER 8 Working with Databases and MySQL.
1 CSE 480: Database Systems Lecture 23: Transaction Processing and Database Recovery.
DAY 15: ACCESS CHAPTER 2 Larry Reaves October 7,
DBSQL 7-1 Copyright © Genetic Computer School 2009 Chapter 7 Transaction Management, Database Security and Recovery.
Concepts of Database Management, Fifth Edition Chapter 4: The Relational Model 3: Advanced Topics.
Chapter 4 The Relational Model 3: Advanced Topics Concepts of Database Management Seventh Edition.
Database Technical Session By: Prof. Adarsh Patel.
Chapter 1 In-lab Quiz Next week
Lecture 7 Integrity & Veracity UFCE8K-15-M: Data Management.
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 10 Transaction Management.
Discovering Computers Fundamentals Fifth Edition Chapter 9 Database Management.
DAY 12: DATABASE CONCEPT Tazin Afrin September 26,
Chapter 6 Database Administration
DATABASE TRANSACTION. Transaction It is a logical unit of work that must succeed or fail in its entirety. A transaction is an atomic operation which may.
1 IRU Concurrency, Reliability and Integrity issues Geoff Leese October 2007 updated August 2008, October 2009.
6 1 Lecture 8: Introduction to Structured Query Language (SQL) J. S. Chou, P.E., Ph.D.
11/7/2012ISC329 Isabelle Bichindaritz1 Transaction Management & Concurrency Control.
Database Security Outline.. Introduction Security requirement Reliability and Integrity Sensitive data Inference Multilevel databases Multilevel security.
INFO1408 Database Design Concepts Week 15: Introduction to Database Management Systems.
1 Chapter 6 Database Administration. 2 Introduction Database administration The process of managing a database Database administrator A person or an entire.
What have we learned?. What is a database? An organized collection of related data.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 16 Using Relational Databases.
Database Systems Recovery & Concurrency Lecture # 20 1 st April, 2011.
Concurrency Control Dr. Tariq Ahamad 1. Who needs ‘control’? large databases are usually shared – by many users, and resources it is efficient to allow.
Constraints Lesson 8. Skills Matrix Constraints Domain Integrity: A domain refers to a column in a table. Domain integrity includes data types, rules,
Database Management Systems, 2 nd Edition, R. Ramakrishnan and J. Gehrke1 Security Lecture 17.
1 Advanced Database Concepts Transaction Management and Concurrency Control.
Relational Database Management System(RDBMS) Structured Query Language(SQL)
Introduction to Databases Dr. Osama AL Rababah. Objectives In this capture you will learn: Some common uses of database systems. The characteristics of.
10 1 Chapter 10 - A Transaction Management Database Systems: Design, Implementation, and Management, Rob and Coronel.
Chapter 3: Relational Databases
Network Security Philadelphia UniversitylAhmad Al-Ghoul Module 7 Module 7 Data Base Security  MModified by :Ahmad Al Ghoul  PPhiladelphia.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 1 Database Systems.
18 September 2008CIS 340 # 1 Last Covered (almost)(almost) Variety of middleware mechanisms Gain? Enable n-tier architectures while not necessarily using.
Constraints Advanced Database Systems Dr. AlaaEddin Almabhouh.
SQL Basics Review Reviewing what we’ve learned so far…….
Database Security Advanced Database Dr. AlaaEddin Almabhouh.
Database Management.
Chapter 10 Transaction Management and Concurrency Control
A Guide to SQL, Eighth Edition
Introduction of Week 13 Return assignment 11-1 and 3-1-5
Designs for Data Integrity, validations, security and controls
Presentation transcript:

Database Integrity and Security HAP 709 – Healthcare Databases George Mason University Janusz Wojtusiak, PhD Fall, 2010

Goal This lecture covers two important topics in databases – How to ensure correctness of a database? – How to ensure security of a database?

Part 1: Integrity

Database Integrity Constraints require database to have specific properties Database is in consistent state if it satisfies all constraints Consistent database is a database in consistent state.

Example IDNameAge 243Smith4 445Jones Brown74 Patient table: Visit IDPatientDate /20/ /1/ /7/02 Visit table:

Example PatientIDNameDateOfBirthAge 1Smith11/20/7733 2Brown1/1/8630 3Lee12 4Smith5/7/9911 Patient table (as of 2010):

Example IDCompanyTotal 1AAAA LLC$200 2ABC$40 3SDS$2000 Order table: Item IDOrder IDCost 11$200 21$500 12$40 13$2000 Item table:

Reasons of Lost Integrity Computer failure – Hardware error – Software error – Network error Computation failure – Overflow, logical error, division by zero, etc. – User error Concurrency control failure – Multiple users updating the same records at the same time.

Recovery from Failure Catastrophic failure – Data is lost due to storage error – Recover from backup Non-catastrophic failure – Reverse/fix only changes that made database inconsistent – Redo operations using log (very slow) – Sometimes requires checking what is the correct state, checkpoints – Adding redundancy to database.

Preventing Inconsistency Constraints supported by RDBMS – Most RDBMS allow database designers to create constraints that prevent inserting incorrect data. Transactions – Transactions are used to make sure that a set of operations preserves integrity.

Preventing Inconsistency Consider the following table Patient IDMeasurement DateTemperature A May 19.2 A May A May A May This type of error can be very easily detected by checking reasonable range of temperature!

Constraints in SQL NOT NULL – A field must contain a value UNIQUE – Two or more records cannot have the same values for specified fields PRIMARY KEY – Combination of the above FOREIGN KEY – Value of a field must match value in other table.

Constraints in SQL CHECK – Enter specified conditions for validity of values – E.g. discounted price 0, … It is possible to create a DOMAIN – Define a set of possible values – Use when there are several fields with the same domain Constraints may not capture full correctness of database.

Transactions Transaction is a set of operations that preserve consistency of database … Transactions provide – Coherent sets of operations that can be used for recovery – Isolation between concurrent accesses to database. BeginOperation 1Operation nCommit Rollback

Part 2: Security

Security in Databases Users should be able to access or modify data they are allowed to Users should not be able to access or modify data they are not allowed to.

Security in Databases Security policy specifies what users are allowed to do Security mechanism enforces the policy – Mandatory Access Control – based on system- wide policies that cannot be changed by individual users – Discretionary access control – creator of an object gets full rights to it, and can assign rights to others.

Security in SQL – Giving Permissions GRANT command is used to provide others with permissions GRANT ON TO [WITH ] Users can grant rights to select, update, insert, delete, and so on Users can also grant all privileges.

Security in SQL – Removing Permissions REVOKE command is used remove permissions to database REVOKE ON FROM

Security in SQL - Views Views are an easy way to provide users with access to aggregated or some data, not entire table(s) Views are “stored select queries” that can have their own permissions CREATE VIEW AS Example: CREATE VIEW patients AS SELECT * PERSON WHERE p_type = ‘Patient’;

Examples in PostgreSQL