Database server connection

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Leon

    #1

    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.
  • Jeff North

    #2
    Re: Database server connection

    On 22 Sep 2004 20:24:42 -0700, in mailing.databas e.mysql
    penghao98@hotma il.com (Leon) wrote:
    [color=blue]
    >| 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.[/color]

    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.
    ---------------------------------------------------------------
    jnorth@yourpant sbigpond.net.au : Remove your pants to reply
    ---------------------------------------------------------------

    Comment

    • Leon

      #3
      Re: Database server connection

      Jeff North <jnorth@yourpan tsbigpond.net.a u> wrote in message news:<i0r4l01if 8pj68bo4vi3hm7m 0hqp1krfgv@4ax. com>...[color=blue]
      > On 22 Sep 2004 20:24:42 -0700, in mailing.databas e.mysql
      > penghao98@hotma il.com (Leon) wrote:
      >[color=green]
      > >| 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.[/color]
      >
      > 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.
      > ---------------------------------------------------------------
      > jnorth@yourpant sbigpond.net.au : Remove your pants to reply
      > ---------------------------------------------------------------[/color]


      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.

      Comment

      • Jeff North

        #4
        Re: Database server connection

        On 23 Sep 2004 07:11:15 -0700, in mailing.databas e.mysql
        penghao98@hotma il.com (Leon) wrote:
        [color=blue]
        >| Jeff North <jnorth@yourpan tsbigpond.net.a u> wrote in message news:<i0r4l01if 8pj68bo4vi3hm7m 0hqp1krfgv@4ax. com>...
        >| > On 22 Sep 2004 20:24:42 -0700, in mailing.databas e.mysql
        >| > penghao98@hotma il.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.[/color]

        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. :-)
        ---------------------------------------------------------------
        jnorth@yourpant sbigpond.net.au : Remove your pants to reply
        ---------------------------------------------------------------

        Comment

        Working...