What is the difference between base table and view?

Answer Posted / sunanda

Views:
1. This is one type of relation which is not a part of the
physical
database.
2. It has no direct or physical relation with the database.
3. Views can be used to provide security mechanism.
4. Modification through a view (e.g. insert update delete)
generally
not permitted

Base Relation:
1. A base relation is a relation that is not a derived relation.
2. While it can manipulate the conceptual or physical
relations stored
in the data.
3. It does not provide security.
4. Modification may be done with a base relation.

We can assign the view a name & relate it the query
expression as
Create View <View Name> as <Query Expression>
Let EMPLOYEE be the relation. We create the table EMPLOYEE
as follows:-

Create table EMPLOYEE
(Emp_No integer of null
Name char (20)
Skill chars (20)
Sal_Rate decimal (10 2)
DOB date
Address char (100) )
For a very personal or confidential matter every user is not
permitted to see the Sal_Rate of an EMPLOYEE. For such users
DBA can
create a view for example EMP_VIEW defined as:-

Create view EMP_VIEW as
(Select Emp_No Name Skill DOB Address
From EMPLOYEE)

Is This Answer Correct ?    13 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I understand Join always perform better than subqueries. Then what is the advantage/use of Subqueries/correlated subqueries etc.,in DB2 programming.Please explain.

1651


What is the latest version of ibm db2?

740


In case if at some point of time db2 is down, would that impact the pre-compilation process of a db2-cobol program?

579


What is ibm db2 used for?

601


What is the result of open cursor statement?

638






Explain package in db2 and its advantages?

597


Mention the various locks that are available in db2.

616


How do you find the maximum value in a column in db2?

650


How to take backup of table in db2?

601


What is the role of the data page in the db2 database?

588


What is check constraint in db2?

608


How many databases are there?

592


What are the contents of a dclmgen?

628


Explain the contents that are a part of dclgen.

660


What is runstats utility in db2?

569