SlideShare una empresa de Scribd logo
1 de 34
1. Planning: that is identifying information gap in an organization and
propose a database solution to solve the problem.
2. Analysis: Concentrates more on fact finding about the problem or the
opportunity.
 Feasibility analysis, requirement determination and
structuring, and selection of best design method are also
performed at this phase.
3. Design: in database designing more emphasis is given to this phase. The
phase is further divided into three sub-phases.
 Conceptual Design, Logical Design, Physical Design:
4. Implementation: the testing and deployment of the designed database
for use.
5. Operation and Support: administering and maintaining the operation
of the database system and providing support to users.
 is the process of coming up with different
kinds of specification for the data to be
stored in the database.
 is one of the middle phases we have in
information systems development
 Deals with describing how the data should be
perceived at different levels and finally how
it is going to be stored in a computer system.
 Sub-phases (Levels) of database design
 is the process of constructing a model of the
information used in an enterprise,
 independent of any physical considerations.
 is source of information for logical design
 Mostly uses ER Model to describe the data .
 refinement of the schema, which is
verification of Entities, Attributes, and
Relationships
 Conceptual design revolves around
discovering and analyzing organizational and
user data requirements
 The important activities are to identify
 Entities
 Attributes
 Relationships
 Constraints
 And based on these components develop the
ER model using
 ER diagrams
 Entity-Relationship modeling is used to
represent conceptual view of the database
 The main components of ER Modeling are:
 Entities
 Represented by Rectangle
 Attributes
 Represented by Oval
 Relationships
 Represented by Diamond
 Constraints
 Represent the constraint in the data
 is the process of constructing a model of the
information based on a specific data model,
 independent of DBMS and other physical
considerations.
 Normalization process
 Collection of Rules to be maintained
 Discover new entities in the process
 Revise attributes based on the rules and the
discovered Entities
 The first step before applying the rules in relational data
model is converting the conceptual design to a form
suitable for relational logical model, which is in a form of
tables.
 Converting ER Diagram to Relational Tables
 Three basic rules to convert ER into tables or relations:
 Rule 1: Entity Names will automatically be table names
 Rule 2: Mapping of attributes: attributes will be columns of
the respective tables.
 Atomic or single-valued or derived or stored attributes will be
columns
 Composite attributes: the parent attribute will be ignored and the
decomposed attributes (child attributes) will be columns of the
table.
 Multi-valued attributes: will be mapped to a new table where the
primary key of the main table will be posted for cross referencing.
 Rule 3: Relationships: relationship will be mapped by using a
foreign key attribute.
 Foreign key is a primary or candidate key of one relation used to
create association between tables.
Refinement: eliminates inconsistency,
ambiguity and redundancy.
 Identifies relations based on primary key
 Decompose relations with anomalies to produce
smaller, well-structured relations
1. Insertion Anomalies
2. Deletion Anomalies
3. Modification Anomalies
 Defines specific storage or access methods
used by database
 Tailored to a specific DBMS system –
 Includes estimate of storage space
 Physical design describes the base relation,
file organization, and indexes used to
achieve efficient access to the data, and any
associated integrity constraints and security
measures.
 Logical database design is concerned with
the what; physical database design is
concerned with the how.
 A good human computer interface
provides a unifying structure for finding,
viewing and invoking the different
components of a system.
 These are the means or methods by which
users interact with the system.
 Interface may be designed to allow:
 Command based interactions
 Menu based interaction
 Object based interaction: icons, symbols
 Natural language interaction
 Meaningful title
 Comprehensible instructions
 Logical grouping and sequencing of fields
 visually appealing layout of the form/report
 familiar field labels
 consistent terminology and abbreviation
 consistent use of color
 visible space and boundaries or data entry fields
 convenient cursor movement
 error correction for individual characters and entire
fields
 error massage for unacceptable fields
 optional field marked clearly
 explanatory massages for fields
 completion signal
17
 The two fundamental concepts that need to be
considered while designing database systems are:
 Maintaining the consistency of the database to all the
changes, and
 Protecting the database from unauthorized users.
18
 Integrity constraints ensure that the changes made
to the database by authorized users do not result in
a loss of data consistency.
 It is a predicate to the database that needs to be
declared at all time.
 Types of Constraints
 Key Constraints (Entity Integrity)
 Foreign Key Constraints (Referential Integrity)
 Domain Constraints (Domain Integrity)
 General Constraints (User Defined Integrity)
19
 A domain constraint is a predicate on an attribute A
of each tuple of a relation to be atomic value from
a domain set domain(A).
 Syntax:
CREATE DOMAIN <domain_name> <data_type>
CONSTRAINT <constraint_name> CHECK <constraint>
 The CHECK statement can also be
 directly applied to a column without defining a domain,
 in a table definition as a tuple based constraint
CHECK (<logical_expression>)
20
 Constraint for salary
CREATE DOMAIN BasicSalary NUMERIC(9, 2)
CONSTRAINT SalaryRange CHECK (VALUE>=150.00 AND
VALUE<=6000.00)
Salary NUMERIC(9, 2) CHECK (Salary>=150.00 AND
Salary<=6000.00)
 Domain Constraint
CREATE TABLE Employees (
:
CONSTRAINT EmpDate_Constraint CHECK (EmpDate <= GETDATE())
)
21
 User defined constraint is an assertion defined by
the user requirement.
 Domain and Referential integrity constraints.
 The syntax for general assertion is:
CREATE ASSERTION <assertion_name> CHECK <predicate>
Example
CREATE ASSERTION NumberOfTeamMembers CHECK (8 >=
ALL (SELECT EmpId FROM EmpTeams GROUP BY TeamId)
22
 Triggers are statements that the database
management system executes automatically in
response to a modification to the database.
Triggers need to specify:
 The event that will cause or initiate the trigger
execution,
 Condition to be specified for the trigger execution to
proceed, and
 The action to be taken in response.
action
condition
event
?




 

23
 The trigger events are:
 INSERT, DELETE, UPDATE and SELECT.
 The actions for the triggers may be taken:
 After successful completion of the operation (event): AFTER
 Before the execution of the operation (event): BEFORE (INSTEAD OF)
 Syntax
CREATE TRIGGER <trigger_name>
ON {<table>|<view>}
{FOR | AFTER | INSTEAD OF} {[INSERT] | [UPDATE] | [DELETE] |
[SELECT]}
AS
<SQL_Statement>
24
 Create a trigger that inserts the employee id to the
fulltime employee table if the employee is a
fulltime employee otherwise in the part-time
employee table
CREATE TRIGGER EmployeeType
ON [Employees]
AFTER INSERT
AS
If (SELECT empType From inserted) = 1
INSERT INTO [fulltimeEmployees] (empId)
SELECT empId FROM inserted
ELSE
INSERT INTO [parttimeEmployees] (empId)
SELECT empId FROM inserted
25
 Database security refers to protection of the database from malicious
access such as:
 Unauthorized reading of data,
 Unauthorized modification of data, and
 Unauthorized destruction of data.
 Some of the threats to the database because of malicious access are:
 Loss of integrity,
 Loss of availability,
 Loss of confidentiality
 Security measure levels
 Database System,
 Operating System,
 Network,
 Physical,
 Human
26
 Database system security can be implemented with
the use of:
 Account and Role Creation,
 Privilege granting,
 Privilege revocation, and
 Security level assignment
27
 Authorization levels in a database system can be
set at broad categories as:
 Data Level Authorization
 Read
 Insert
 Update
 Delete
 Schema Level Authorization
 Index
 Resource
 Alter
 Drop
28
 The syntax for privilege granting is as follows:
GRANT <privilege_list> ON {<table>|<view>}
TO <account_list> [WITH GRANT OPTION]
 <privilege_list> is possible data level authorization for
the table or view stated as:
{SELECT | INSERT | UPDATE | DELETE | ALL}
 To grant access to a specific column in a table:
GRANT REFERENCES (<column>) ON {<table>|<view>}
TO <account_list> [WITH GRANT OPTION]
29
 The syntax for privilege revoking is as follows:
REVOKE <privilege_list> ON {<table>|<view>}
FROM <account_list> [RESTRICT | CASCADE]
 To revoke grant option from an account:
REVOKE GRANT OPTION FOR <privilege_list> ON
{<table>|<view>}
FROM <account_list>
30
 The syntax to deny a privilege from an account list
is:
DENY <privilege_list> ON {<table>|<view>}
TO <account_list> [CASCADE]
31
 Terminologies
 Plain text
 Cipher text
 Key
 Encryption
 Decryption
 
P
K
C
encryption
P 



 

 
P
K
C
decryption
P 



 

32
 Cryptography:
 rendering plain information unintelligible, and
 restoring the encrypted information to intelligible form
 Symmetric Key Algorithms
 DES (Data Encryption Standard)
 IDEA (International Data Encryption Algorithm)
 Asymmetric Key Algorithms
 RSA (Rivest, Shamir and Adleman)
 DSA (Digital Signature Algorithm )
 Cryptanalysis : Breaking cipher
33
 Authentication is a process of verifying the
identity of a user who is claimed to be.
 There are two ways of authenticating a user:
 Use of Password.
 User Account
 Password
 Challenge Response
 Challenge generated by the server
 Encrypted by the user with the private key of the user
 Decrypted by the server with the public key of the user
Chapter Five Physical Database Design.pptx

Más contenido relacionado

Similar a Chapter Five Physical Database Design.pptx

It 302 computerized accounting (week 2) - sharifah
It 302   computerized accounting (week 2) - sharifahIt 302   computerized accounting (week 2) - sharifah
It 302 computerized accounting (week 2) - sharifah
alish sha
 
Advanced Database Systems CS352Unit 4 Individual Project.docx
Advanced Database Systems CS352Unit 4 Individual Project.docxAdvanced Database Systems CS352Unit 4 Individual Project.docx
Advanced Database Systems CS352Unit 4 Individual Project.docx
nettletondevon
 
Software engg. pressman_ch-10
Software engg. pressman_ch-10Software engg. pressman_ch-10
Software engg. pressman_ch-10
Dhairya Joshi
 

Similar a Chapter Five Physical Database Design.pptx (20)

Introduction to database with ms access.hetvii
Introduction to database with ms access.hetviiIntroduction to database with ms access.hetvii
Introduction to database with ms access.hetvii
 
Introduction to database with ms access(DBMS)
Introduction to database with ms access(DBMS)Introduction to database with ms access(DBMS)
Introduction to database with ms access(DBMS)
 
It 302 computerized accounting (week 2) - sharifah
It 302   computerized accounting (week 2) - sharifahIt 302   computerized accounting (week 2) - sharifah
It 302 computerized accounting (week 2) - sharifah
 
Fundamentals of database system - Database System Concepts and Architecture
Fundamentals of database system - Database System Concepts and ArchitectureFundamentals of database system - Database System Concepts and Architecture
Fundamentals of database system - Database System Concepts and Architecture
 
Week 2 Characteristics & Benefits of a Database & Types of Data Models
Week 2 Characteristics & Benefits of a Database & Types of Data ModelsWeek 2 Characteristics & Benefits of a Database & Types of Data Models
Week 2 Characteristics & Benefits of a Database & Types of Data Models
 
Data models
Data modelsData models
Data models
 
Database administration
Database administrationDatabase administration
Database administration
 
Final
FinalFinal
Final
 
Adeshhazra_DBMS_ca1_bca4thsem.pdf
Adeshhazra_DBMS_ca1_bca4thsem.pdfAdeshhazra_DBMS_ca1_bca4thsem.pdf
Adeshhazra_DBMS_ca1_bca4thsem.pdf
 
Database fundamentals
Database fundamentalsDatabase fundamentals
Database fundamentals
 
CHAPTER FOUR buugii 2023.docx
CHAPTER FOUR buugii 2023.docxCHAPTER FOUR buugii 2023.docx
CHAPTER FOUR buugii 2023.docx
 
LectDBS_1.pdf
LectDBS_1.pdfLectDBS_1.pdf
LectDBS_1.pdf
 
Advanced Database Systems CS352Unit 4 Individual Project.docx
Advanced Database Systems CS352Unit 4 Individual Project.docxAdvanced Database Systems CS352Unit 4 Individual Project.docx
Advanced Database Systems CS352Unit 4 Individual Project.docx
 
Db lecture 2
Db lecture 2Db lecture 2
Db lecture 2
 
[PHPUGPH] PHP Roadshow - MySQL
[PHPUGPH] PHP Roadshow - MySQL[PHPUGPH] PHP Roadshow - MySQL
[PHPUGPH] PHP Roadshow - MySQL
 
Relational Database Management System part II
Relational Database Management System part IIRelational Database Management System part II
Relational Database Management System part II
 
Software engg. pressman_ch-10
Software engg. pressman_ch-10Software engg. pressman_ch-10
Software engg. pressman_ch-10
 
data base
data basedata base
data base
 
Database aggregation using metadata
Database aggregation using metadataDatabase aggregation using metadata
Database aggregation using metadata
 
RDBMS
RDBMSRDBMS
RDBMS
 

Último

Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
amitlee9823
 
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
amitlee9823
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
MarinCaroMartnezBerg
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter Lessons
JoseMangaJr1
 

Último (20)

Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Predicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science ProjectPredicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science Project
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptx
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
ELKO dropshipping via API with DroFx.pptx
ELKO dropshipping via API with DroFx.pptxELKO dropshipping via API with DroFx.pptx
ELKO dropshipping via API with DroFx.pptx
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter Lessons
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptx
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptx
 
Sampling (random) method and Non random.ppt
Sampling (random) method and Non random.pptSampling (random) method and Non random.ppt
Sampling (random) method and Non random.ppt
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
 

Chapter Five Physical Database Design.pptx

  • 1.
  • 2. 1. Planning: that is identifying information gap in an organization and propose a database solution to solve the problem. 2. Analysis: Concentrates more on fact finding about the problem or the opportunity.  Feasibility analysis, requirement determination and structuring, and selection of best design method are also performed at this phase. 3. Design: in database designing more emphasis is given to this phase. The phase is further divided into three sub-phases.  Conceptual Design, Logical Design, Physical Design: 4. Implementation: the testing and deployment of the designed database for use. 5. Operation and Support: administering and maintaining the operation of the database system and providing support to users.
  • 3.  is the process of coming up with different kinds of specification for the data to be stored in the database.  is one of the middle phases we have in information systems development  Deals with describing how the data should be perceived at different levels and finally how it is going to be stored in a computer system.
  • 4.  Sub-phases (Levels) of database design
  • 5.  is the process of constructing a model of the information used in an enterprise,  independent of any physical considerations.  is source of information for logical design  Mostly uses ER Model to describe the data .  refinement of the schema, which is verification of Entities, Attributes, and Relationships
  • 6.  Conceptual design revolves around discovering and analyzing organizational and user data requirements  The important activities are to identify  Entities  Attributes  Relationships  Constraints  And based on these components develop the ER model using  ER diagrams
  • 7.  Entity-Relationship modeling is used to represent conceptual view of the database  The main components of ER Modeling are:  Entities  Represented by Rectangle  Attributes  Represented by Oval  Relationships  Represented by Diamond  Constraints  Represent the constraint in the data
  • 8.  is the process of constructing a model of the information based on a specific data model,  independent of DBMS and other physical considerations.  Normalization process  Collection of Rules to be maintained  Discover new entities in the process  Revise attributes based on the rules and the discovered Entities
  • 9.  The first step before applying the rules in relational data model is converting the conceptual design to a form suitable for relational logical model, which is in a form of tables.  Converting ER Diagram to Relational Tables  Three basic rules to convert ER into tables or relations:  Rule 1: Entity Names will automatically be table names  Rule 2: Mapping of attributes: attributes will be columns of the respective tables.  Atomic or single-valued or derived or stored attributes will be columns  Composite attributes: the parent attribute will be ignored and the decomposed attributes (child attributes) will be columns of the table.  Multi-valued attributes: will be mapped to a new table where the primary key of the main table will be posted for cross referencing.  Rule 3: Relationships: relationship will be mapped by using a foreign key attribute.  Foreign key is a primary or candidate key of one relation used to create association between tables.
  • 10. Refinement: eliminates inconsistency, ambiguity and redundancy.  Identifies relations based on primary key  Decompose relations with anomalies to produce smaller, well-structured relations 1. Insertion Anomalies 2. Deletion Anomalies 3. Modification Anomalies
  • 11.  Defines specific storage or access methods used by database  Tailored to a specific DBMS system –  Includes estimate of storage space
  • 12.  Physical design describes the base relation, file organization, and indexes used to achieve efficient access to the data, and any associated integrity constraints and security measures.  Logical database design is concerned with the what; physical database design is concerned with the how.
  • 13.
  • 14.  A good human computer interface provides a unifying structure for finding, viewing and invoking the different components of a system.  These are the means or methods by which users interact with the system.  Interface may be designed to allow:  Command based interactions  Menu based interaction  Object based interaction: icons, symbols  Natural language interaction
  • 15.  Meaningful title  Comprehensible instructions  Logical grouping and sequencing of fields  visually appealing layout of the form/report  familiar field labels  consistent terminology and abbreviation  consistent use of color  visible space and boundaries or data entry fields  convenient cursor movement  error correction for individual characters and entire fields  error massage for unacceptable fields  optional field marked clearly  explanatory massages for fields  completion signal
  • 16.
  • 17. 17  The two fundamental concepts that need to be considered while designing database systems are:  Maintaining the consistency of the database to all the changes, and  Protecting the database from unauthorized users.
  • 18. 18  Integrity constraints ensure that the changes made to the database by authorized users do not result in a loss of data consistency.  It is a predicate to the database that needs to be declared at all time.  Types of Constraints  Key Constraints (Entity Integrity)  Foreign Key Constraints (Referential Integrity)  Domain Constraints (Domain Integrity)  General Constraints (User Defined Integrity)
  • 19. 19  A domain constraint is a predicate on an attribute A of each tuple of a relation to be atomic value from a domain set domain(A).  Syntax: CREATE DOMAIN <domain_name> <data_type> CONSTRAINT <constraint_name> CHECK <constraint>  The CHECK statement can also be  directly applied to a column without defining a domain,  in a table definition as a tuple based constraint CHECK (<logical_expression>)
  • 20. 20  Constraint for salary CREATE DOMAIN BasicSalary NUMERIC(9, 2) CONSTRAINT SalaryRange CHECK (VALUE>=150.00 AND VALUE<=6000.00) Salary NUMERIC(9, 2) CHECK (Salary>=150.00 AND Salary<=6000.00)  Domain Constraint CREATE TABLE Employees ( : CONSTRAINT EmpDate_Constraint CHECK (EmpDate <= GETDATE()) )
  • 21. 21  User defined constraint is an assertion defined by the user requirement.  Domain and Referential integrity constraints.  The syntax for general assertion is: CREATE ASSERTION <assertion_name> CHECK <predicate> Example CREATE ASSERTION NumberOfTeamMembers CHECK (8 >= ALL (SELECT EmpId FROM EmpTeams GROUP BY TeamId)
  • 22. 22  Triggers are statements that the database management system executes automatically in response to a modification to the database. Triggers need to specify:  The event that will cause or initiate the trigger execution,  Condition to be specified for the trigger execution to proceed, and  The action to be taken in response. action condition event ?       
  • 23. 23  The trigger events are:  INSERT, DELETE, UPDATE and SELECT.  The actions for the triggers may be taken:  After successful completion of the operation (event): AFTER  Before the execution of the operation (event): BEFORE (INSTEAD OF)  Syntax CREATE TRIGGER <trigger_name> ON {<table>|<view>} {FOR | AFTER | INSTEAD OF} {[INSERT] | [UPDATE] | [DELETE] | [SELECT]} AS <SQL_Statement>
  • 24. 24  Create a trigger that inserts the employee id to the fulltime employee table if the employee is a fulltime employee otherwise in the part-time employee table CREATE TRIGGER EmployeeType ON [Employees] AFTER INSERT AS If (SELECT empType From inserted) = 1 INSERT INTO [fulltimeEmployees] (empId) SELECT empId FROM inserted ELSE INSERT INTO [parttimeEmployees] (empId) SELECT empId FROM inserted
  • 25. 25  Database security refers to protection of the database from malicious access such as:  Unauthorized reading of data,  Unauthorized modification of data, and  Unauthorized destruction of data.  Some of the threats to the database because of malicious access are:  Loss of integrity,  Loss of availability,  Loss of confidentiality  Security measure levels  Database System,  Operating System,  Network,  Physical,  Human
  • 26. 26  Database system security can be implemented with the use of:  Account and Role Creation,  Privilege granting,  Privilege revocation, and  Security level assignment
  • 27. 27  Authorization levels in a database system can be set at broad categories as:  Data Level Authorization  Read  Insert  Update  Delete  Schema Level Authorization  Index  Resource  Alter  Drop
  • 28. 28  The syntax for privilege granting is as follows: GRANT <privilege_list> ON {<table>|<view>} TO <account_list> [WITH GRANT OPTION]  <privilege_list> is possible data level authorization for the table or view stated as: {SELECT | INSERT | UPDATE | DELETE | ALL}  To grant access to a specific column in a table: GRANT REFERENCES (<column>) ON {<table>|<view>} TO <account_list> [WITH GRANT OPTION]
  • 29. 29  The syntax for privilege revoking is as follows: REVOKE <privilege_list> ON {<table>|<view>} FROM <account_list> [RESTRICT | CASCADE]  To revoke grant option from an account: REVOKE GRANT OPTION FOR <privilege_list> ON {<table>|<view>} FROM <account_list>
  • 30. 30  The syntax to deny a privilege from an account list is: DENY <privilege_list> ON {<table>|<view>} TO <account_list> [CASCADE]
  • 31. 31  Terminologies  Plain text  Cipher text  Key  Encryption  Decryption   P K C encryption P          P K C decryption P       
  • 32. 32  Cryptography:  rendering plain information unintelligible, and  restoring the encrypted information to intelligible form  Symmetric Key Algorithms  DES (Data Encryption Standard)  IDEA (International Data Encryption Algorithm)  Asymmetric Key Algorithms  RSA (Rivest, Shamir and Adleman)  DSA (Digital Signature Algorithm )  Cryptanalysis : Breaking cipher
  • 33. 33  Authentication is a process of verifying the identity of a user who is claimed to be.  There are two ways of authenticating a user:  Use of Password.  User Account  Password  Challenge Response  Challenge generated by the server  Encrypted by the user with the private key of the user  Decrypted by the server with the public key of the user