473,397 Members | 1,974 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

General Database Question - Tables in Classes

Hopefully this will make some sense.. I have a database that has around 50
tables - I thought about putting each table in a class and the data
connection in a class then I could manage the (tables) classes with one data
connection. The business logic would open the database class then whatever
table class is needed, the close the tables and the connection.

The other way would be to open a data connection in each class. Since
mutiple tables could be open at the same time I would have one data
connection instead of multiple data connections at the same time. If I were
to open one connection for each (table) class, lets say 30 and I had 10 hits
on the web page at the same time, (30 * 10) I could have a possible 300 data
connections (with tables) open at one time. Any rough ideas would be greatly
appreciated.

class1 (open & close database connection)
class2 (table1)
class3 (table 2)
class4 (table 3)
class5 (business logic)
class6 (business logic)

class5: (most tables are needed) (business logic)
-- instances class1 (open)
-- instances class2
-- instances class3
-- instances class4
-- close all classes (tables and connection)

class6: (only 2 tables are needed) (business logic)
-- instances class1 (open)
-- instances class2
-- instances class3
-- close all classes (tables and connection)

Other way:
-- business logic class
-- class2 (open data connection & table)
-- class3 (open data connection & table)
-- class3 (open data connection & table)
-- close classes
Jun 8 '06 #1
0 1304

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Johnson | last post by:
Here's what I was doing, it is obviously stupid because i have exceeded the "too many fields defined error" I have to create a database driven application that allows students to update the...
9
by: Big Slim | last post by:
I'm working on a web application that makes heavy use of CSS, but I would like users to have a degree of control over some of the classes and attributes. To accomplish this, I want to store my CSS...
3
by: Lauren Quantrell | last post by:
A general design question: Assuming I can figure out a way to link some local tables in an .MDB file to my Access2000 .ADP database (any help on this is appreciated as well), I'm wondering which...
5
by: Samuel R. Neff | last post by:
I'd like some opinions on whether or not to use IDisposable for classes that require clean-up but when the clean-up is not related to unmanaged resources or other disposable objects. The most...
1
by: jason | last post by:
Hello everyone, I have some general questions about the DataTable object, and how it works. Moderately new to C#, I have plenty of texts describing the language, but not so much to reference...
35
by: Terry Jolly | last post by:
Web Solution Goal: Have a global database connection Why: (There will be 30+ tables, represented by 30+ classes) I only want to reference the database connection once. I put the connection...
0
by: Jim Stools | last post by:
Forget the re-post I had my clock set 12 hours earlier Hopefully this will make some sense.. I have a database that has around 50 tables - I thought about putting each table in a class and the...
4
by: Jim Stools | last post by:
Forget the re-post I had my clock set 12 hours earlier Hopefully this will make some sense.. I have a database that has around 50 tables - I thought about putting each table in a class and the...
7
by: bhipwell via AccessMonster.com | last post by:
Hello, I have developed an employee benefits database that currently contains over 3000 employees and 70+ companies. Having started the database as a really simple solution for our clients, the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.