Subject | RE: To Helen RE: [firebird-support] Selectable "select * from table" procedure |
---|---|
Author | Miel Hostens |
Post date | 2008-12-12T19:40:48Z |
Helen,
I will give some more explanation and thanks again for your support, I
appreciate that very much!
My situation: i have set up a remote database (server) - local database +
application protocol in which data is stored on the local machine with
opportunity to share/sync the data on central database. Lets suppose that
the central database collects all information from different
veterinarian-groups. I want it to be possible to do a select on different
tables in which the user passes : 1. the tables he wants to sync with his
local database, 2. the time since his last sync so he receives only the
information he has to receive.
I thought about this for a long time. In MySQL there was a nice way of doing
this, you pass table, user, lastsync, to selectable procedure in which the
query is executed on remote database and only the needed data is
returned,... The database is becoming very big so i need the best, fastest
performance (as everyone wants)
So what i want in my application: You pass table, user, lastsync and
database returns data
I think i will take a look at the derived tables, will be the best I guess?
The stored procedure way is to difficult because more and more tables are
getting into the dataset and this would take too long to make all of these
procedures
The view, indeed no possibility,
I do get the basic of what you are saying about the different application
layers, my main goal was to let the database-server do as much as possible
while the local database/application only passes table/user/last sync
Miel
Van: Miel Hostens [mailto:mielhostens@...]
Verzonden: donderdag 11 december 2008 19:04
Aan: firebird-support@yahoogroups.com
Onderwerp: To André RE: [firebird-support] Selectable "select * from table"
procedure
Dear André,
i have set up a remote database - local database + application protocol in
which data is stored on the local machine with opportunity to share data on
central database. Lets suppose that the central database collects all
information from different veterinarian-groups. I want it to be possible to
do a select on different tables in which the user passes : 1. the tables he
wants to sync with his local database, 2. the time scince last sync so he
receives only the information he can.
I thought about this for a long time. In MySQL there was a nice way of doing
this, you pass table, user, lastsync, to selectable procedure in which the
query is executed on remote database and only the needed data is
returned,... The database is becoming very big so i need the best, fastest
performance
So what i want in my application: You pass procedure/view/query with
user,lastsync and database returns data
You get my situation?
Miel
_____
To: firebird-support@yahoogroups.com
From: Knappstein@...
Date: Thu, 11 Dec 2008 11:57:24 +0100
Subject: Re: [firebird-support] Selectable "select * from table" procedure
m> In mysql there is something like a selectable stored procedure, eg.
m> Begin
m> Select * from table x
m> where x.ID = @PARAM;
m> End
m> You can call this procedure via DOTNET, pass paremeters en fill a
m> dataset with it easily
I don't think that in Firebird it is possible to make a stored proc
with a dynamic list of output parameters.
But also I cannot think of a situation where it would be really good
practice to do so. Maybe you can describe this situation a bit; I am
just curious.
I only am used to call "Select stored procedures" if the application
logic needs to be separated from the database logic, and that - to me
- only makes sense if you need a dedicated subset of fields in the
table, probably even pre-filtered rows.
In my opinion a "select * customers" written in your code is about the
same as a "select * from SP_Customers" written in your code, where the
SP should run a tiny bit slower but your code is as dirty as with the
raw select * from table.
That said, all that works for MySQL data provider in .net should also
work with FBProvider. Using params for queries and stored procs
certainly does very well.
ciao,
André
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
beta Eigenheim- und Grundstücksverwertungsgesellschaft mbH
Hafenweg 4
59192 Bergkamen-Rünthe
Telefon: +49 2389 9240 0
Telefax: +49 2389 9240 150
e-mail: info@...
Amtsgericht Hamm Nr. B 420 || USt-IDNr.: DE 125215402
Geschäftsführer: Achim Krähling, Dirk Salewski, Matthias Steinhaus
[Non-text portions of this message have been removed]
I will give some more explanation and thanks again for your support, I
appreciate that very much!
My situation: i have set up a remote database (server) - local database +
application protocol in which data is stored on the local machine with
opportunity to share/sync the data on central database. Lets suppose that
the central database collects all information from different
veterinarian-groups. I want it to be possible to do a select on different
tables in which the user passes : 1. the tables he wants to sync with his
local database, 2. the time since his last sync so he receives only the
information he has to receive.
I thought about this for a long time. In MySQL there was a nice way of doing
this, you pass table, user, lastsync, to selectable procedure in which the
query is executed on remote database and only the needed data is
returned,... The database is becoming very big so i need the best, fastest
performance (as everyone wants)
So what i want in my application: You pass table, user, lastsync and
database returns data
I think i will take a look at the derived tables, will be the best I guess?
The stored procedure way is to difficult because more and more tables are
getting into the dataset and this would take too long to make all of these
procedures
The view, indeed no possibility,
I do get the basic of what you are saying about the different application
layers, my main goal was to let the database-server do as much as possible
while the local database/application only passes table/user/last sync
Miel
Van: Miel Hostens [mailto:mielhostens@...]
Verzonden: donderdag 11 december 2008 19:04
Aan: firebird-support@yahoogroups.com
Onderwerp: To André RE: [firebird-support] Selectable "select * from table"
procedure
Dear André,
i have set up a remote database - local database + application protocol in
which data is stored on the local machine with opportunity to share data on
central database. Lets suppose that the central database collects all
information from different veterinarian-groups. I want it to be possible to
do a select on different tables in which the user passes : 1. the tables he
wants to sync with his local database, 2. the time scince last sync so he
receives only the information he can.
I thought about this for a long time. In MySQL there was a nice way of doing
this, you pass table, user, lastsync, to selectable procedure in which the
query is executed on remote database and only the needed data is
returned,... The database is becoming very big so i need the best, fastest
performance
So what i want in my application: You pass procedure/view/query with
user,lastsync and database returns data
You get my situation?
Miel
_____
To: firebird-support@yahoogroups.com
From: Knappstein@...
Date: Thu, 11 Dec 2008 11:57:24 +0100
Subject: Re: [firebird-support] Selectable "select * from table" procedure
m> In mysql there is something like a selectable stored procedure, eg.
m> Begin
m> Select * from table x
m> where x.ID = @PARAM;
m> End
m> You can call this procedure via DOTNET, pass paremeters en fill a
m> dataset with it easily
I don't think that in Firebird it is possible to make a stored proc
with a dynamic list of output parameters.
But also I cannot think of a situation where it would be really good
practice to do so. Maybe you can describe this situation a bit; I am
just curious.
I only am used to call "Select stored procedures" if the application
logic needs to be separated from the database logic, and that - to me
- only makes sense if you need a dedicated subset of fields in the
table, probably even pre-filtered rows.
In my opinion a "select * customers" written in your code is about the
same as a "select * from SP_Customers" written in your code, where the
SP should run a tiny bit slower but your code is as dirty as with the
raw select * from table.
That said, all that works for MySQL data provider in .net should also
work with FBProvider. Using params for queries and stored procs
certainly does very well.
ciao,
André
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
beta Eigenheim- und Grundstücksverwertungsgesellschaft mbH
Hafenweg 4
59192 Bergkamen-Rünthe
Telefon: +49 2389 9240 0
Telefax: +49 2389 9240 150
e-mail: info@...
Amtsgericht Hamm Nr. B 420 || USt-IDNr.: DE 125215402
Geschäftsführer: Achim Krähling, Dirk Salewski, Matthias Steinhaus
[Non-text portions of this message have been removed]