Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. View

View

Scheduled Pinned Locked Moved Database
databasequestionsql-serversysadmin
6 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dhyanga
    wrote on last edited by
    #1

    Hi, I am using dot net and sql server. I am sending my data from the database table to the pdf file. It looks using lots of tables to get data slowing down the program and so I tend to use the view instead of tables. Will it be the good idea to use view and if yes, i have few more questions. 1. When are we inserting data to the view. Is that when we are inserting data to the actual table or anytime ? 2. If I insert data in the view, will the data be there once i close my program?( I am assuming view as the cache table) 3. what is the difference between using view and actual table ? 4. How the use of view and table different? Thanks in advance

    suchita

    B S L 3 Replies Last reply
    0
    • D Dhyanga

      Hi, I am using dot net and sql server. I am sending my data from the database table to the pdf file. It looks using lots of tables to get data slowing down the program and so I tend to use the view instead of tables. Will it be the good idea to use view and if yes, i have few more questions. 1. When are we inserting data to the view. Is that when we are inserting data to the actual table or anytime ? 2. If I insert data in the view, will the data be there once i close my program?( I am assuming view as the cache table) 3. what is the difference between using view and actual table ? 4. How the use of view and table different? Thanks in advance

      suchita

      B Offline
      B Offline
      Blue_Boy
      wrote on last edited by
      #2

      SayamiSuchi wrote:

      1. When are we inserting data to the view. Is that when we are inserting data to the actual table or anytime ?

      You can't insert data into View.

      SayamiSuchi wrote:

      3. what is the difference between using view and actual table ?

      Difference between View and table[^] Check this[^]


      I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.cacttus.com

      D L 2 Replies Last reply
      0
      • D Dhyanga

        Hi, I am using dot net and sql server. I am sending my data from the database table to the pdf file. It looks using lots of tables to get data slowing down the program and so I tend to use the view instead of tables. Will it be the good idea to use view and if yes, i have few more questions. 1. When are we inserting data to the view. Is that when we are inserting data to the actual table or anytime ? 2. If I insert data in the view, will the data be there once i close my program?( I am assuming view as the cache table) 3. what is the difference between using view and actual table ? 4. How the use of view and table different? Thanks in advance

        suchita

        S Offline
        S Offline
        SilimSayo
        wrote on last edited by
        #3

        See this[^]

        1 Reply Last reply
        0
        • B Blue_Boy

          SayamiSuchi wrote:

          1. When are we inserting data to the view. Is that when we are inserting data to the actual table or anytime ?

          You can't insert data into View.

          SayamiSuchi wrote:

          3. what is the difference between using view and actual table ?

          Difference between View and table[^] Check this[^]


          I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.cacttus.com

          D Offline
          D Offline
          David Skelly
          wrote on last edited by
          #4

          Blue_Boy wrote:

          You can't insert data into View.

          According to this you can: Modifying Data Through a View[^]

          1 Reply Last reply
          0
          • B Blue_Boy

            SayamiSuchi wrote:

            1. When are we inserting data to the view. Is that when we are inserting data to the actual table or anytime ?

            You can't insert data into View.

            SayamiSuchi wrote:

            3. what is the difference between using view and actual table ?

            Difference between View and table[^] Check this[^]


            I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.cacttus.com

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            Blue_Boy wrote:

            You can't insert data into View.

            Actually, most modern databases support what is called "updatable views". If your view does not contain calculated columns and the base tables have a default defined on the columns not selected in the view, then the view must be updatable.

            1 Reply Last reply
            0
            • D Dhyanga

              Hi, I am using dot net and sql server. I am sending my data from the database table to the pdf file. It looks using lots of tables to get data slowing down the program and so I tend to use the view instead of tables. Will it be the good idea to use view and if yes, i have few more questions. 1. When are we inserting data to the view. Is that when we are inserting data to the actual table or anytime ? 2. If I insert data in the view, will the data be there once i close my program?( I am assuming view as the cache table) 3. what is the difference between using view and actual table ? 4. How the use of view and table different? Thanks in advance

              suchita

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              A "view" is a way of looking at data stored in table(s), therefore using a view instead of the underlying base table will not solve your performance issue. If your query is slow, consider these tips: 1. Index your base table(s). 2. Use a WHERE clause to filter only those rows that is needed. 3. Select only the required columns (don't use a * in the SELECT statement).

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups