469,271 Members | 1,435 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

Database server connection

I am trying to using mysql as back-end for an application(web) running
on the window 2X, one thing I am not sure is that once I establish the
connection between database server and application, should I keep this
connection open while application is running, or only open it when
there is a requet to qury records from database?

Thanks for your help.
Jul 20 '05 #1
3 1748
On 22 Sep 2004 20:24:42 -0700, in mailing.database.mysql
pe*******@hotmail.com (Leon) wrote:
| I am trying to using mysql as back-end for an application(web) running
| on the window 2X, one thing I am not sure is that once I establish the
| connection between database server and application, should I keep this
| connection open while application is running, or only open it when
| there is a requet to qury records from database?
|
| Thanks for your help.


Using the normal web pages the connection is automatically closed once
the server completes it's processing and sends the file to the user.

The basic rule is open connection, get data, close connection.
---------------------------------------------------------------
jn****@yourpantsbigpond.net.au : Remove your pants to reply
---------------------------------------------------------------
Jul 20 '05 #2
Jeff North <jn****@yourpantsbigpond.net.au> wrote in message news:<i0********************************@4ax.com>. ..
On 22 Sep 2004 20:24:42 -0700, in mailing.database.mysql
pe*******@hotmail.com (Leon) wrote:
| I am trying to using mysql as back-end for an application(web) running
| on the window 2X, one thing I am not sure is that once I establish the
| connection between database server and application, should I keep this
| connection open while application is running, or only open it when
| there is a requet to qury records from database?
|
| Thanks for your help.


Using the normal web pages the connection is automatically closed once
the server completes it's processing and sends the file to the user.

The basic rule is open connection, get data, close connection.
---------------------------------------------------------------
jn****@yourpantsbigpond.net.au : Remove your pants to reply
---------------------------------------------------------------

Thanks.
On my web application, the database server has no idea about
front-end request and response, the server only deals with my
mid-tiler database interface.
Jul 20 '05 #3
On 23 Sep 2004 07:11:15 -0700, in mailing.database.mysql
pe*******@hotmail.com (Leon) wrote:
| Jeff North <jn****@yourpantsbigpond.net.au> wrote in message news:<i0********************************@4ax.com>. ..
| > On 22 Sep 2004 20:24:42 -0700, in mailing.database.mysql
| > pe*******@hotmail.com (Leon) wrote:
| >
| > >| I am trying to using mysql as back-end for an application(web) running
| > >| on the window 2X, one thing I am not sure is that once I establish the
| > >| connection between database server and application, should I keep this
| > >| connection open while application is running, or only open it when
| > >| there is a requet to qury records from database?
| > >|
| > >| Thanks for your help.
| >
| > Using the normal web pages the connection is automatically closed once
| > the server completes it's processing and sends the file to the user.
| >
| > The basic rule is open connection, get data, close connection.
|
| Thanks.
| On my web application, the database server has no idea about
| front-end request and response, the server only deals with my
| mid-tiler database interface.


That's fine but you still need to observe the basic rule regardless of
the number of tiers. Think of it this way, would you open every EXE
program on your machine and then expect it to run efficiently?

For example, a connection is between the server and a table or query.
You would need to create connections for all your tables and queries.
On top of that you would need to create connections for the different
methods of manipulating the data (SELECT, UPDATE, DELETE) - per user.
I think your web admin might have more that a few nasty words to say
to you. :-)
---------------------------------------------------------------
jn****@yourpantsbigpond.net.au : Remove your pants to reply
---------------------------------------------------------------
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by peter | last post: by
3 posts views Thread by markaelkins | last post: by
1 post views Thread by dave | last post: by
7 posts views Thread by News | last post: by
3 posts views Thread by Martin B | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.