Examen 3. Presentacion 6 Flashcards
(40 cards)
Semantic Data Control Involves
View management
Security control
Integrity control
Semantic Data Control Objective
Ensure that authorized users perform correct operations on the
database, contributing to the maintenance of the database
integrity.
View – virtual relation
generated from base relation(s) by a query
not stored as base relations
CREATE VIEW SYSAN(ENO,ENAME)
AS SELECT ENO,ENAME
FROM EMP
WHERE TITLE= “Syst. Anal.”
View – virtual relation Example
ELECT ENAME, PNO, RESP
FROM SYSAN, ASG
WHERE SYSAN.ENO = ASG.ENO
Views can be manipulated as base relations
SELECT ENAME, PNO, RESP
FROM SYSAN, ASG
WHERE SYSAN.ENO = ASG.ENO
Queries expressed on views
SELECT ENAME,PNO,RESP
FROM EMP, ASG
WHERE EMP.ENO = ASG.ENO
AND TITLE = “Syst. Anal.”
Queries expressed on base relations
CREATE VIEW ESAME
AS SELECT *
FROM EMP E1, EMP E2
WHERE E1.TITLE = E2.TITLE
AND E1.ENO = USER
To restrict access
CREATE VIEW SYSAN(ENO,ENAME)
AS SELECT ENO,ENAME
FROM EMP
WHERE TITLE=”Syst. Anal.”
Updatable
CREATE VIEW EG(ENAME,RESP)
AS SELECT ENAME,RESP
FROM EMP, ASG
WHERE EMP.ENO=ASG.ENO
Non-updatable
View Management in Distributed DBMS
Views might be derived from fragments.
View definition storage should be treated as database
storage
Query modification results in a distributed query
View evaluations might be costly if base relations are
distributed
Materialized View
Stored as a database relation, possibly with indices
Deferred mode
DDBMS: No need to access remote, base relations
Data warehouse: to speed up OLAP
Materialized View updating
Resembles data replication but there are differences
View expressions typically more complex
Replication configurations more general
When to Refresh a View Modes
Immediate mode, Deferred mode
Deffered Mode times
Lazily: just before evaluating a query on the view
Periodically: every hour, every day, etc
Forcedly: after a number of predefined updates
Deferred mode
Through separate refresh transactions
Triggered at different times with different trade-offs
Immediate mode
As part of the updating transaction, e.g. through 2PC
View always consistent with base data and fast queries
But increased transaction time to update base data
How to Refresh a View
Full computing from base data
Incremental computing by applying only the changes to
the view
Data Security
Data protection
Access control
Data protection
Prevents the physical content of data to be understood by unauthorized users
Uses encryption/decryption techniques
Access control
Only authorized users perform operations they are allowed to on database objects
Types of access control
Discretionary access control (DAC)
Multilevel access control (MAC)
DAC’sMain actors
Subjects (users, groups of users) who execute operations
Operations (in queries or application programs)
Objects, on which operations are performed