Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Principles of Database Systems With Internet and Java Applications Today’s Topic Chapter 15: Reliability and Security in Database Servers Instructor’s.

Similar presentations


Presentation on theme: "1 Principles of Database Systems With Internet and Java Applications Today’s Topic Chapter 15: Reliability and Security in Database Servers Instructor’s."— Presentation transcript:

1 1 Principles of Database Systems With Internet and Java Applications Today’s Topic Chapter 15: Reliability and Security in Database Servers Instructor’s name and information goes here Please see the notes pages for more information.

2 2 Chapter 15 Reliability and Security n Backup and Recovery –When and why n Security –How and who n Distributed Databases –What and where

3 3 Causes of Failure, Possibilities of Recovery n Database server –computer crashes –server program crashes –disk drive corruption n Client failure –computer crashes –client program crashes n Network failure –connection fails, often temporary n Transaction failure –executes rollback (voluntary) –executes illegal operation (server created) –deadlock –introduces errors into the database

4 4 Backups, Checkpoints, Transaction Logs n Backup is a copy of the state at a specific time n Checkpoint is an incremental backup of changes since a full backup n Database can be restarted after failure –At backup state –At checkpoint n Transaction log records all actions of transactions –Redo log records new values of all objects –Undo log records old values of all objects –Read/write logs, to check for interference

5 5 Recovery from failure n Primary technique, restart from consistent backup/checkpoint n Reprocessing –ask all committed transactions to execute again n Roll Forward –Back to consistent backup state –Apply redo transaction log n Roll Back –Remove the effect of each transaction with undo log –Can be used to cancel the effects of rogue transactions

6 6 Automatic recovery n Database server maintains control file –Contains ID of last committed transaction –Multiple copies in multiple locations –Small but of crucial importance n Server restart using control file and transaction logs –Bring database back by restoring all committed transactions –Remove effects of uncommitted transactions

7 7 Security in Relational Database Systems n Account security for validation of users –Database accounts –Operating system accounts n SQL statements for security –create user –alter user –create profile –create role –grant privileges to users, roles

8 8 Stored Procedures n Define numberRented function –create function numberRented (accId int) return int as select sum(*) from Rental where Customer.accountId = accId; n Define checkIn procedure –create procedure checkIn (vidId int, cost double) as begin insert into PreviousRental … n Grant privileges to procedures –grant update on PreviousRental to checkIn –grant checkIn to clerk –revoke update on PreviousRental to public n User in the clerk role can update the table, no one else can

9 9 Client-Server Systems OS net AP 1 AP 2 OS net AP 3 AP 2 OS net AP 2 OS net OS dm DBMS Os net = Network Communications portion of Operating System Os dm = Data management portion of Operating System Database

10 10 Distributed Database Systems Os net = Network Communications portion of Operating System Os dm = Data management portion of Operating System DDBMS = Distributed Database System Database Database Database DDBMS AP 1 AP 2 OS net OS dm DDBMS AP 1 AP 2 OS net OS dm DDBMS AP 2 AP 3 OS net OS dm

11 11 Distributed Databases n Single schema with multiple servers –Not one application connecting to multiple servers –An application connects to a single server n Fragmentation of tables –Horizontal, rows in different servers –Vertical, columns in different servers –Replicated, some rows or columns in multiple servers n Distributed Transactions –Two phase commit –Discussion in class


Download ppt "1 Principles of Database Systems With Internet and Java Applications Today’s Topic Chapter 15: Reliability and Security in Database Servers Instructor’s."

Similar presentations


Ads by Google