Jump to content

Talk:View (SQL)

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Storage overhead

[edit]

The statement, "Views do not incur any extra storage overhead" is not entirely correct. A view does not require as much space as a/the table(s) that it represents, but it requires space to store the view definition. In Microsoft SQL Server, a view's text/definition is stored in the table syscomments and takes one row per every 4000 bytes of text in the definition of said view. Other databases would have to store the view definition somewhere, so it is a small, but a non-zero number, regarding the amount of space that a view takes. We have views that can contain four or five rows of data for our ERP system.

I think the point the article was making was that a view can provide columns from multiple tables but does not require the actual storage space to hold that result set. Wwphx 19:44, 27 August 2007 (UTC)wwphx[reply]

Right, but I agree that it sounds funny. I'll try to make it more correct without making it confusing. —Preceding unsigned comment added by 64.81.170.62 (talk) 22:40, 1 January 2008 (UTC)[reply]

Indicate advantages and disadvantages of views; help in understanding the concept's relevancy

Views compared to selects

[edit]

The section about the advantages of views is rather strange. The most common method of getting data out of a database is using a SELECT statement.

  • Views can represent a subset of the data contained in a table
    • so can a select
  • Views can join and simplify multiple tables into a single virtual table
    • so can a select
  • Views can act as aggregated tables, where the database engine aggregates data (sum, average etc) and presents the calculated results as part of the data
    • So can a select
  • Views can hide the complexity of data; for example a view could appear as Sales2000 or Sales2001, transparently partitioning the actual underlying table
    • so can a select
  • Views take very little space to store; the database contains only the definition of a view, not a copy of all the data it presents
    • selects actually take less space to store
  • Depending on the SQL engine used, views can provide extra security
  • Views can limit the degree of exposure of a table or tables to the outer world
    • should this really be part of the database and not part of the application?

After all this, the only advantages of selecting from a view instead of just flat out selecting is that the view may provide additional security, which should arguably be handled by the application and not the database. It would appear that the 'advantage' list is rather biased. —Preceding unsigned comment added by 74.202.89.125 (talk) 19:45, 12 August 2009 (UTC)[reply]

[edit]

Hello fellow Wikipedians,

I have just modified one external link on View (SQL). Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:

When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at {{Sourcecheck}}).

This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}} (last update: 5 June 2024).

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

Cheers.—InternetArchiveBot (Report bug) 11:09, 21 July 2016 (UTC)[reply]