SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: mySQL Views?

  1. #1
    SitePoint Guru phantom007's Avatar
    Join Date
    May 2008
    Posts
    752
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Question mySQL Views?

    Hi

    This tutorial explains what VIEWS are and how are they created.

    My Question is that why do we need VIEWS for? Why cannot we use the normal SELECT command and fetch records directly from the main table instead of creating a VIEW first and then display records?


    Thanx

  2. #2
    SitePoint Evangelist
    Join Date
    Aug 2007
    Posts
    566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My Question is that why do we need VIEWS for
    You don't need them.

    I've seen 2 usage of views:
    1) to give read access to certains datas for third party without giving full access on the db nor giving the schema details
    2) on complicated queries, a DBA craft the view, and the developers can use that view without worrying about the 12 tables that are joined and the conditions of those joins.

    For me, it's mostly case 2 now, as I work as DBA in a team of 3, and chew up some work for the winform/asp teams when they need to have access to something a bit more complicated that "select x from tbl where y=z"

  3. #3
    SitePoint Guru phantom007's Avatar
    Join Date
    May 2008
    Posts
    752
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    That answered my query


    Thanx


Bookmarks

Posting Permissions

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