Thanks to everybody for the replies. I got some nice pointers.
I know my design is nasty, but that is because I am learning...Putting
object orientation in the mix, I have this question:
I have an object, person, which is assosiated with some statistical
data. Say for each person object, I need
Thanos Panousis [EMAIL PROTECTED] wrote
data. Say for each person object, I need an object variable called
hairColor. This haircolor variable has to be filled through an SQL
query, so the object must have some way to access a database cursor.
The cool thing would be that all person objects
Thanos Panousis wrote:
I have an object, person, which is assosiated with some statistical
data. Say for each person object, I need an object variable called
hairColor. This haircolor variable has to be filled through an SQL
query, so the object must have some way to access a database cursor.
I checked the SQLAlchemy and SQLObject projects, but they are not
really relevant to what I am doing(moreover they are more than I can
chew just yet:).
I managed to get a class variable to hold a cursor via something like
class person:
cursor = MySQLdb.connect(stuff).cursor()
BUT when I
Thanos Panousis [EMAIL PROTECTED] wrote in
I managed to get a class variable to hold a cursor via something
like
class person:
cursor = MySQLdb.connect(stuff).cursor()
BUT when I make a function inside my class called myConnect, where I
do error checking and so on, I can't make it
Alan Gauld wrote:
Thanos Panousis [EMAIL PROTECTED] wrote
I am developing a network management system that relies heavily on a
MySQL database. The logic of the program is unavoidably coupled with
query results I get from various tables.
That's pretty unusual, it normally indicates a non OO
John Clark [EMAIL PROTECTED] wrote
MySQL database. The logic of the program is unavoidably coupled
with
query results I get from various tables.
That's pretty unusual, it normally indicates a non OO design.
Database persistance has always been a frustration of mine in OO
design -
John Clark wrote:
I know that there is a text book
out there called Database Access Patterns, can anyone provide a
recommendation or a critique of the book? Are there other (better)
references I should be consulting in designing the database interaction
layer of my application?
I like
Kent Johnson [EMAIL PROTECTED] wrote
I like Martin Fowler's Patterns of Enterprise Application
Architecture.
I agree, except the title can be slightly misleading. Just to make it
clear, the book is about application architecture for larger scale
applications (not really enterprise scale
Hello list,
I am developing a network management system that relies heavily on a
MySQL database. The logic of the program is unavoidably coupled with
query results I get from various tables.
This is OK as long the mysql server has 100% uptime, but it hardly
does. Say that I have to make at least
Thanos Panousis wrote:
Hello list,
I am developing a network management system that relies heavily on a
MySQL database. The logic of the program is unavoidably coupled with
query results I get from various tables.
This is OK as long the mysql server has 100% uptime, but it hardly
does.
Well, the best thing to do is to just keep on asking until the server
is up. Sending emails and other logging can be done inside whatever
wrapper function.
So if wrappers is a good way to go, how should I pursue this? Just
making my own wrapper functions or subclassing from MySQLdb?
Is it really
Thanos Panousis [EMAIL PROTECTED] wrote
I am developing a network management system that relies heavily on a
MySQL database. The logic of the program is unavoidably coupled with
query results I get from various tables.
That's pretty unusual, it normally indicates a non OO design.
This is OK
13 matches
Mail list logo