Hi all,
I am a newbie to database programming.
I am trying to create an application with an open source database and python. This database contains a lot of tables and I use the data from these tables extensively in the code.

I find that I am having to use a representation of the tables inside the code to effectively interact with the tables. For example, say the table contains user_id, user_name, user_address as three columns; in such a case, inside the code to read the output of 'SELECT * FROM USERDB', I now have to create an enumerated type - enum userbdtype (id, name, address) - to read information from the database adapter data that returns the information.

Is there a better way to do this? I feel this is prone to error - say if I change my database schema, I will have to go to every place in the code and change it. I did a little bit of digging and found the following link - http://database-programmer.blogspot....ictionary.html. Is this the definitive mechanism to do this? I am asking this because I feel that the performance of the program might suffer because I have to do dual search now every time.

If anybody could help me on this I would be much obliged.