Chap-5 Database Security
Chap-5 Database Security
• Naive users
• Application Programmer
• Sophisticated users
• Specialized users
• DBA
Creating /Deleting Users
Create user command is used to create new user for
database.
Syntax
Create user <username> identified by password;
Example
Create user kavita identified by admin@12;
Deleting user
Drop command is used to delete the user.
Syntax
Drop user username;
example
Drop user kavita;
Database privileges(Grant and revoke command)
Syntax
Grant insert,select,update,delete on tablename to
username;
Example
Grant insert,select on emp to kavita
Revoke command
Revoke command is used to remove all given privilege's
or access from user.
Syntax
revoke select on tablename from user;
Example
Revoke select on emp from kavita;
Database Back up
• Database Failure
This failure usually refers to any kind of bugs or hardware
malfunction in the operating system or the database software. It
can bring the processing of transaction to a halt and can even
cause the loss of content residing on the volatile storage such as
main memory, cache memory, RAM, etc. Statement failure
Types of failure
1. System crash –hardware malfunctioning
2. Statement failure- SQL quires failed
3. Media failure- disk crash
4. Application software errors-Programming error
Causes of Failure
1. File corruption- due to corrupted file
2. File system Damage- operating system damaged
3. Database Hardware Failure
Database backup
Database backup is the process of backing up the operational state,
architecture and stored data of database software. It enables the creation of a
duplicate instance or copy of a database in case the primary database crashes, is
corrupted or is lost.
Types of Database Backup
1. Physical backup
creating multiple copies to another location or disks
2. Logical backup
Backup of logical data such as views ,procedure
functions and tables
Database recovery
Database recovery is the process of restoring
the database to a correct (consistent) state in the event of a
failure. In other words, it is the process of restoring
the database to the most recent consistent state that existed
shortly before the time of system failure.