Thank you. I do agree with you. I need to read up on it. I only work with
MySQL databases and queries and have never heard of it until today. Maybe
after I learn more about them, I will find them useful. Guess they must be
useful or it wouldn't be part of SQL.
From: Claudio Nanni [mailto:claudio.nanni@stripped]
Sent: Monday, February 09, 2009 3:59 PM
To: Steven Buehler
Subject: Re: MySQL View
I would suggest you the reading of a basic book about SQL and Databases, I
explain you why.
Views are a very fundamental concept in database theory that you would love
to study in deep.
This mailing list, though the most professional on MySQL, is not suitable to
explain such basic and important concepts.
Views and temporary tables are like completely different concepts, temporary
tables are not even a concept, but a 'tool' for
SQL developer, while views are (views!) 'snapshots' of data structured in a
way that phisically does not exist, are reorganization of
the database relations(read tables) to pull out only relevant information
for a part of an application and by which you can create infinite views
(sorry) of the database. If you like Excel, very roughly speaking, views are
excel functions, while the table data is the actual excel column containing
Steven, this is my humble opinion.
Please let me know what you think
2009/2/9 Steven Buehler <steve@stripped>
I just found something else out and did a test. So a view is a table in a
database that can be shared. The example I found was if you have multiple
people that need a database for something, but it still has to keep the
information separate, instead of having multiple databases, you can create
one with a VIEW statement. With the privileges setup correctly, each user
can only access the information in that database that they put in and not
other people's data. And it does actually create this on disk not in memory
so it doesn't get deleted between sessions, reboots, etc. Does that sound
From: Martin Gainty [mailto:mgainty@stripped]
Sent: Monday, February 09, 2009 11:26 AM
To: Steven Buehler; baron@stripped
Subject: RE: MySQL View
My current understanding of the delta between Views and Temporary Tables
Views are read only results from 1 or more tables ..in Oracle they are
stored in TEMP tablespace
Temporary Tables are tables which are created/updated/inserted and exist
only for the duration of your client session
Oracle calls these Global Temporary Tables
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official
business of Sender. This transmission is of a confidential nature and Sender
does not endorse distribution to any party other than intended recipient.
Sender does not necessarily endorse content contained within this
> From: steve@stripped
> To: baron@stripped
> CC: mysql@stripped
> Subject: RE: MySQL View
> Date: Mon, 9 Feb 2009 10:10:45 -0600
> > -----Original Message-----
> > From: baron.schwartz@stripped [mailto:baron.schwartz@stripped] On
> > Behalf Of Baron Schwartz
> > Sent: Monday, February 09, 2009 9:19 AM
> > To: Steven Buehler
> > Cc: mysql@stripped
> > Subject: Re: MySQL View
> > On Mon, Feb 9, 2009 at 9:41 AM, Steven Buehler <steve@stripped>
> > wrote:
> > > Ok, I just saw a post about using view's in mysql. I tried to look
> > it up
> > > and found how to use it, but my question is: what is a view and why
> > would
> > > you use it? Is it like a temporary table? Does it write a new
> > database to
> > > the disk or use memory?
> > A view is a piece of SQL whose result can be queried like a table. It
> > stores no data; the results are always generated as the query
> > executes. In some cases it does use a temporary table to hold the
> > result and then query against it; in other cases it merges the
> > original query's SQL and the view's SQL together and then executes the
> > resulting query.
> > Why use it? To abstract a complex bit of code away for simplicity.
> > To grant permissions in a certain way (you can grant access to the
> > view and deny access to the underlying table).
> > There's a lot of complexity to it though, in terms of how to use views
> > correctly and get good performance. I think the manual goes over it
> > in good detail, and our book High Performance MySQL 2nd Edition has
> > probably the best exploration of it otherwise.
> > Baron
> Baron, Thank You
> 1. The view is temporary then? So it kind of uses it "in place of" a
> temporary table?
> 2. Does it go away after the query or after the mysql_close?
> I am going to have to go to the book store and get your book too.
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=1
Windows LiveT: Keep your life in sync. See how it works.