SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
nirzagarg
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Computer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdfComputer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdf
SayantanBiswas37
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
vexqp
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Klinik kandungan
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
nirzagarg
 
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
nirzagarg
 
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
gajnagarg
 
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
HyderabadDolls
 
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
gajnagarg
 

Kürzlich hochgeladen (20)

Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
 
20240412-SmartCityIndex-2024-Full-Report.pdf
20240412-SmartCityIndex-2024-Full-Report.pdf20240412-SmartCityIndex-2024-Full-Report.pdf
20240412-SmartCityIndex-2024-Full-Report.pdf
 
Dubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls DubaiDubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls Dubai
 
Computer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdfComputer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdf
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
 
Kings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about themKings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about them
 
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
 
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
 
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
 
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
 
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book nowVadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
 
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
 
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
 
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
 
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham Ware
 

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