+ Reply to Thread
Results 1 to 3 of 3

Thread: Views

  1. #1
    Moderator kiran2710's Avatar
    Join Date
    Jul 2006
    Posts
    2,157
    Rep Power
    81

    Views

    View
    “It is a oracle data base object”
    Definition:
    “A view is a window through which one can see the contents of a database table as well as can manipulate the contents of the table.”
    Note:
    • The view is derived from a single table
    • In Oracle 8 and higher versions manipulation of view is also possible though it is derived from multiple database tables, by using a data base trigger called “instead of”.
    • A view looks like a table with some restrictions, so a view is also known as a virtual table.
    • A view occupies no storage space, because view contains no data of their own, i.e. view always depends on database table or tables where the actual data resides.
    Advantages of Views:
    • These are used provide security to the database tables by hiding some part of the data of a table by defining some projections and restrictions.
    • These are used to define the complex queries in the compiled version.
    • 1,900 views are there in the data base dictionary.
    Syntax:


    SQL> create View
    As

    SQL> create view
    (<Col>, , , -----------)
    As
    Select , ------ from , , ----------
    --------------------------------
    --------------------------------;
    Note:
    • The “ ORDER BY” clause is invalid in the views of definition query, but the same “ORDER BY” clause can be used while querying the view.
    • This (the above rule) is valid up to Oracle 8, but in 8i we can use “ORDER BY” clause in the view definition also.
    Examples:
    Create a view to display only the information of employees who arte managers to others.

    SQL> create view v1
    As
    Select * from emp
    Where
    Empno in (select distince MGR from emp);

    Create a view to display employee number, employee name, salary, TA (10%), DA (20%), HRA (30%), gross, LIC (1%), PF (2%), net deduction, net allowance, gross and net of all employees.

    SQL> cre

    Using and displaying the View:
    SQL> select * from emp_sal_info;


    Create a view to display the empno, ename,salary, deptno, dname, grade, experience, experience in terms of *** of all the employees.

    SQL> create view Emp_Details
    As
    Select empno, ename, sal, dept.deptno, dname, grade, months_between (sysdate, hiredate)/12, LPAD(‘*’, months_between (sysdate, hiredate)/12, ‘*’)
    From emp, dept, salgrade
    Where
    Emp.deptno=dept.deptno and sal between losal and hisal;


    Create a view to display the deptno, max salary, total salary, and average salary, number of employees with labels.

    SQL> create view Emp_sal_details
    As
    Select max (sal) maximum salary, avg(sal) Average Salary, Count (empno) number of employees, Sum(sal) total salary, deptno from emp
    Group by deptno;

    Create a view to display the employee details in the following format.

    Smith is drawing a salary of 1800 working as CLERK, who joined on Wednesday 02-03-1982.

    SQL> create view v1
    As
    Select ename || ‘is drawing a salary of Rs.’ || ‘, is working as ‘ || job ||’ || to_char )hiredate, ‘day’, DDTH month yyyy’) from emp;


    Question1:

    Is it possible to create without having a base table?

    No.

    If you try to create a view without a bas3e table you will get an error message like “table or view does not exist”
    This is because; a view is logical presentations of a table.
    A view uses the scope of the data, which is present in the underlying table.

    Question2:
    Is it possible to create an index on the columns of a view?

    No.
    A view is a virtual table only it contains no data. Only queries will be present in a view.
    if you try this you will get error like “ A view is not appropriate here.”


    SQL> create index x on v (Sal);



    Last edited by kiran2710; 22-06-07 at 08:00 PM.



    Kiran








  2. #2
    Senior Member nandhini_7's Avatar
    Join Date
    Apr 2007
    Location
    chennai
    Age
    28
    Posts
    137
    Rep Power
    9

    Re: Views

    hi
    Could u please tell me the exact diff b/w Windows2000 and Windowsxp

  3. #3
    Moderator kiran2710's Avatar
    Join Date
    Jul 2006
    Posts
    2,157
    Rep Power
    81

    Re: Views

    Not much. Microsoft has added a host of new features to both versions of Windows XP, but nothing that appears to be absolutely compelling for business users. One of the new features called "Fast User Switching" allows to to run two separate logged in sessions at once. This allows a user to do everyday work such as e-mail using a non-privileged user account, and then run an Administrative session at the same time without rebooting or resorting to the "Run As" command. This also allows you to quickly log onto any users workstation and make administrative changes without logging them off. The remote assistance feature of XP can also help reduce support costs by allowing your Help Desk staff to interact with a user's PC over the network. XP's built in ZIP compression support can also save your company a lot of money in licensing fees if you are currently using a third party utility such as WinZIP.

    check dis links..

    SolutionBase: Understanding Windows XP Professional networking

    http://www.winsupersite.com/showcase...p_home_pro.asp



    Kiran








+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. ORACLE placement paper 35
    By sridhar in forum ORACLE Placement Papers
    Replies: 0
    Last Post: 09-02-07, 08:26 PM
  2. VB - Explain the types of Views in List view Control.
    By preethisingh in forum vb / asp.net Interview / Technical Questions
    Replies: 0
    Last Post: 24-01-07, 12:29 PM
  3. List the built-in routines for the controlling canvas views during run-time?
    By bhavana in forum Oracle Interview / Technical Questions
    Replies: 0
    Last Post: 23-01-07, 07:13 PM
  4. Which of the two views should objects according to possession?
    By bhavana in forum Oracle Interview / Technical Questions
    Replies: 0
    Last Post: 23-01-07, 06:58 PM
  5. Explain about content canvas views?
    By bhavana in forum Oracle Interview / Technical Questions
    Replies: 0
    Last Post: 23-01-07, 06:53 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Content Relevant URLs by vBSEO 3.5.1 PL1