If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Reg: Synchronising the columns in DB with variables used inside coding

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-12-08, 13:09
raj_dbnewbie raj_dbnewbie is offline
Registered User
 
Join Date: Oct 2008
Posts: 1
Reg: Synchronising the columns in DB with variables used inside coding

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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On