AdvDB@Chapter 3
AdvDB@Chapter 3
Then
1. Analyze existing system deeply and develop NEW
system which looks like it or better using any favorite
tool ./But: You have to know sw they use for front end and1
Group project for IS Students
Contact the following governmental or private organizations
Awah Bank/Group – 2/
Amhara bank/Group – 3/
Then
1. Analyze existing system document and architecture
deeply and develop NEW document and system
architecture which looks like it or better./But: You have to 2
Chapter 3
3
Outline
Database integrity concepts and subsystem
Integrity constraints
Types of constraints
Database security
Database threats
Data Encryption
4
Pre--
5
Database integrity
When creating databases, attention needs to be given to data integrity
If the system enforces data integrity, it will prevent the user from
integrity that it must accept the customer only from Ethiopia or other only specific
input.
6
.
information. 7
Integrity Constraints
Constraints are the rules that force DBMSs to check that data satisfies the
semantics.
information.
Integrity constraints ensure that the data insertion, updating, and other
affected.
9
1. Domain constraints
domain.
For example, the Employee ID (EID) must be unique or the
10
11
2. Entity integrity constraints
The entity integrity constraint states that primary key value can't
be null.
This is because the primary key value is used to identify
individual rows in relation and if the primary key has a null value,
then we can't identify those rows.
A table can contain a null value other than the primary key field.
To ensure entity integrity, it is required that every table have a
primary key.
Neither the PK nor any part of it can contain null values. This is
because null values for the primary key mean we cannot identify
some rows.
For example, in the EMPLOYEE table, Phone cannot be a primary
key since some people may not have a telephone.
12
.
• The NOT NULL constraint enforces a column to NOT accept NULL values.
• This enforces a field to always contain a value, which means that you cannot
insert a new record, or update a record without adding a value to this field.
EXAMPLE:
NOT NULL on CREATE TABLE
Age int
);
NOT NULL on ALTER TABLE
ALTER TABLE Persons MODIFY Age int NOT NULL;
13
.
14
3. Referential Integrity
Constraints
Referential integrity requires that a foreign key must have
these tables.
Customer(CustID, CustName)
16
Remember
• ID
• AGE
• Name
• Dept
• Phone no
• 10
• 14
• Information system
• 0921333333
18
4. Key constraints/Unique Constraint/
Keys are the entity set that is used to identify an entity within its entity set
uniquely.
A primary key can contain a unique and null value in the relational table.
The UNIQUE constraint ensures that all values in a column are different.
Both the UNIQUE and PRIMARY KEY constraints provide a guarantee for
However, you can have many UNIQUE constraints per table, but only one
19
.
Security concentrate on database objects (tables, views, rows), access to them, and
Note that not all data is sensitive, so not all requires great effort at protection.
THREATs are putting your assets at risk. These include things such as power failure and
employee fraud.
intentional or unintentional
• Database security requires the mechanisms, that protect a database against the
21
Security attackers
In database security attackers are divided into three segments
that are –
Administrator
• An admin is an authorized person who has permission to
control the system but misuses his/her privileges against
the security policies to get the important information.
Insider
• An insider is also a member of trusted committee in an
organization but did misuse of his/her authority and want to
get some sensitive or any other important information
Intruder
• An intruder is not a part of an organization.
• Actually he/she is unauthorized person who access the
personal data of an organization and want to get the
22
sensitive information.
Database Security Properties
mechanisms.
categories:
24
Identification, Authentication
25
Authorization, Access Controls
information.
control authorizations.
28
Auditing
auditing.
29
Database threats
30
Top Database Security Threats?
2. Privilege abuse
6. SQL injection
7. Denial of service
31
Threats Identification and Authentication
Access control
Inference control
Flow control
Encryption
32
..
33
Database Access control
34
Categories of access control
35
Discretionary access control/DAC/
37
.
38
Mandatory access control/MAC/
39
.
40
.
41
..
42
.
43
Mandatory Access Control and Role-Base Access Control for Multilevel
Security
..
44
45
.
46
Implementation of security system
47
---Security
48
Data Encryption
renders the data unreadable by any program without the decryption key
This security issue used to protect sensitive data (such as credit card
network.
49
Encryption Process
50
Types of encryption
Symmetric encryption
52
Asymmetric encryption
• One of the keys is typically known as the private key and the other is
• The private key is kept secret by the owner and the public key is either
large.
• Data encrypted with the recipient’s public key can only be decrypted
53
Implementing Encryption
54
Database Security and the DBA
organization
system. 55
..
1. Account creation
2. Privilege granting
3. Privilege revocation
authorization 56
Access Protection, User Accounts, and Database Audits
system, the individual or group must first apply for a user account.
The DBA will then create a new account id and password for the user if
The user must log in to the DBMS by entering account id and password
57
To keep a record of all updates applied to the database and of the
particular user who applied each update, we can modify system
log, which includes an entry for each operation applied to the
database that may be required for recovery from a transaction
failure or system crash.
58