Subject Re: [firebird-support] Data of multiple years and opening stocks & balances
Author Venus Software Operations
Thanks Milan for the further explanation. I was hoping that Views were
static of sorts, run it once and it would give immediate results unless
the view parameters were changed or maybe the data it queried on has
changed.

Apart from the advantages you mentioned over SP it looks to me that it's
dataset is regenerated every time it is called (even with the same view
parameters) just like calling the SP would. Please correct me if I
understood this wrong.

Thanks and regards
Bhavbhuti


On 07/03/2011 06:47, Milan Babuskov wrote:
>
> Venus Software Operations wrote:
> > On 04/03/2011 03:07, Milan Babuskov wrote:
> >> You can define a VIEW (or a stored procedure) that calculates the
> values
> >> dynamically. One day, if data gets to big, you can rename the
> >> view/procedure, create table using the same name and fill it in
> >> initially using insert...select. This way you don't have to change the
> >> application code. I had something like that in one of my databases,
> >> here's an example:
> >>
> > Thanks a lot Milan for this idea.
> >
> > I am happy to go the View way too, if you can tell me how a view works,
> > does it calculate once and update itself occasionally if the data it is
> > dependent on changes. Or is it as same as running a SP or doing SQL-PT
> > from the application, calculated everytime it is accessed, just more
> > convenient.
>
> It's similar to stored procedure.
>
> Main advantage of view is that is can use indexed on underlying tables
> while a stored procedure cannot. In the example procedure I gave in
> previous message, if you wish to query only WHERE SKU = 1111, a
> procedure would not use index on underlying tables unless you make SKU
> an input parameter and specify SKU inside the procedure. If you wish to
> make arbitrary WHERE clauses, then using VIEW is a better idea.
>
> Main advantage of procedure is that you can program it to do something
> else then just returning rows from a table.
>
> --
> Milan Babuskov
>
> ==================================
> The easiest way to import XML, CSV
> and textual files into Firebird:
> http://www.guacosoft.com/xmlwizard
> ==================================
>
>

--


Thanking you.

Yours Faithfully,
For Venus Software Operations
----
Bhavbhuti Nathwani
___________________________________________
Softwares for Indian Businesses at: http://www.venussoftop.com

venussoftop@...
venussoftop@...
___________________________________________

Please note: We reserve complete rights for policy changes in the future and the same will be applicable immediately as and when made. Attachments may get corrupted before reaching you, in such a situation please let us know and we will resend you the same at the earliest. We do not take any responsibility for data loss of any type and kind. Data safety remains the sole the responsibility of the users of our softwares.
___________________________________________

Internet email confidentiality:

This message may contain information that may be privileged or confidential. If you are not the addressee nor are you responsible for the delivery of the message to the addressee indicated in this email, then you may not copy or deliver this email to anyone and you should notify the sender by reply email and then destroy this message.

Please reply email immediately to this message with REMOVE in the subject, if you or your employer do not consent to email of this kind.

Opinions, conclusions and other information in this message that do not relate to the official business of my firm shall be understood as neither given nor endorsed by my company.