Examen 3. Presentacion 6 Flashcards
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