Friday, August 7, 2009

Database (ugh)

I am in the process of learning database access in Python. It really isn't that bad, it just seems that my brain is opposed to absorbing the info.

The good news is that I have a database, and there is a table defined for all of the asteroids. I have info entered in for 2 of the asteroids, and my small test program is now able to read the field names from the table, read the fields, and put them into a 2 dimensional list. This is the same structure that the current CSV parsing function uses, so if I can build a DB access function to put the data into the same structure, I won't have to change anything else in the program to make it work.

The other good thing is that once I can read the DB in code, I will then make it so I can write the DB in code. At that point, it would be almost trivial to make a solar system editor that lets me drag and drop asteroids into the scene, and get them added to the database on the fly.

Work continues tomorrow...

No comments:

Post a Comment