In: Computer Science
Complete the following questions with proper citations; there is a 150-word minimum per question. Questions: Describe the difference between database structural integrity and semantic data integrity. Describe the preferred method of implementing referential integrity in a relational database. Explain two ways that views can be used to implement data security. What is a cascading REVOKE, and what effect can it have on database security?
Structural Intregrity Constraints
Structural integrity constraints are the most basic constraints that are inherent in nature and shown by entities in the database.
Structural constraints for relational systems are as follows:
(i) Domain type integrity constraints
(ii) Domain range integrity constraints
(iii) Nonnull integrity constraints
(iv) Unique key integrity constraints
(v) Referential integrity constraints
Semantic Integrity Constraints
There are vaious database states in which various constraints are there which are related not only to the legal instances of data and realistic requirement but also with facts specific to database. these constraints are known as semantic integirity constraints.
E.g. 1: An employees boss is necessarily affiliated with that employee's organization or company.
E.g. 1:
E.g. 2: Boss salary is always less than subordinate emlooyee's salary.
E.g 3: Each student is assigned some course and have some mentor.
Preferred method for establishing referential integrity:
The attribute that has been taken for referential key should be
chosen it with the entity whose cardinality in m.
Well views are not part of physical schema so the changes made in
data in the underlaying tables is reflected whenever the views are
envoked.
With the help of view the data present in tables are shown in
limits as per requirement and authentication of user.
Views can combine various tables in one and do not need to carry required data everytime. Mostly views are computing the output at the time of their invocation because only view definition is changed in the database. So the database is not exposed to the external word every time.
Many times permissions are granted to specific user (depending upon its authentication) which can later be revoked once some external event occurs (Like time expired or all allowed attempts tried) then all the permission granted in the hirarchy will be expired i.e. revoked.