Hi,
Let me first give the features of views in a distributed database.
What is a View:-
Actually, Views are the mirror image of your tables. It is the
interface through which you will be interacting with your database
table(s).
Why Views:-
* To apply strict security privilege to your distributed database
system.
* To make the work more simple, making the system more user
frienldy.
Example:-
Say, You have four departments namely HR, Finance, Marketing and
Production in your organisation accessing the same database. In this
scenario, the HR dept mostly needs the information about the employees
personal details, their pay package etc. So, what you will do is you
will create a view on one/multiple tables with the limited columns,
which are essentail for the HR dept and give the privilege/access to
HR dept only. So, the marketing or production department had got
nothing to do with the personal details of the employees, or their pay
package or their career graph.
Similarly, for the other departments too, you will do the same
thing.You will create the view on the tables and limited columns in
them and set the privilege, so that only that particular should have
access and should only be manipulating it.
What are Indexes:-
This database object is responsible for quick process in your
database, whenever a query is made.
Why Indexes:-
This indexes actually holds the address of the rows in the table
and when you give the select query, it goes to this index object,
searches for the primary key, picks the address of the rows and then
directly jumps to that partiuclar rows as per the row
address.Otherwise nomrmaly, the search in the database table will be
from top to bottom. If you some 10000 rows in your table and the row
you all looking for is the 9999 row, then the search will be done from
1 row down to the row 9999( as in this case).so, naturally, the
process will be very slow. This problem can be solved by creating the
index for the particular table by refering the primary key(unique and
not null) of that table.
The database perfomance get improvised in the major way with these
indexes.
Hope, you got the concepts..
regards
Abdul Muqeeth. |