Database Model - Class, objects and interaction



Hello,

I'm relative new to OOP and I'm curious about what is the best way to
model and implement (OOPL) a class that will be used to take care of
database connection, queries and results.

The idea is to have a single connection to a database or a pool of
them, but inside a single object (right?) is a singleton the best
design patter to follow? or is there a special patter for this?

Several objects will need at some point to store or retrieve
information from the database, how should this interaction be done?
just calling a method (of the database object) to store/retrieve
information from it?

Thanks & BR!
.



Relevant Pages

  • Re: Help ! -> Distributed BL and Database Access
    ... I have one server located in a remote part of the country ... method the data within the object will be comitted to the database. ... reference to the database connection and then send it to the client (by ... value - to move the work off onto the client). ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: [PHP] uh oh, I defined a resoruce
    ... I don't agree that "Global variables are evil." ... going to use only for a database connection, IMO, is perfectly fine. ... By specific globals I mean that I have a "namespaced" entry such as ...
    (php.general)
  • Re: [PHP] uh oh, I defined a resoruce
    ... I don't agree that "Global variables are evil." ... going to use only for a database connection, IMO, is perfectly fine. ... By specific globals I mean that I have a "namespaced" entry such as ...
    (php.general)
  • Re: Database connections and try catch finally?
    ... You never know when you'll get an exception doing database IO. ... > finally statement when opening a database connection, ... > conn = new SqlConnection; ... > SqlConnection conn = new SqlConnection; ...
    (microsoft.public.dotnet.framework.adonet)
  • Why Opening a Database Connection Is Very Slow?
    ... I would like to know why this takes a long time to open a database ... connection to a SQL Server 2000 database in a server. ... I find that I may take 2 minutes or so to open a database connection. ... Dim sConnString As String ...
    (microsoft.public.pocketpc.developer)