So pretty much the idea is to minimze the code needed to recode when there needs to be a change in the amount of indexes in the obj.

As currently i will only be using one table, at least i think. I have only one obj to insert into the database. So everything is reflecting on that obj (self.data)

So i tried making executemany execute as many as there are indexes in self.data, however i could not figure out the same thing to do with self. table_form. I am not sure if it is even possible? ACtually i have came up with something that might implement into it?

metulburr wrote:So i tried making executemany execute as many as there are indexes in self.data, however i could not figure out the same thing to do with self. table_form. I am not sure if it is even possible? ACtually i have came up with something that might implement into it?

I'm not sure I get what you mean. If you're talking about specifying the columns dynamically, then no, you wouldn't use executemany for that; instead, you'd generate the CREATE TABLE string and execute that once (as I think you're talking about doing). Normally though, you wouldn't dynamically generate tables anyway -- you'd specify a schema and use it (much as you are doing now).