I'm preparing a python application that works with databases I'm planning to use sqlite 15000 There are objects, and each object has some attributes. Every day I need to add some data to each object. (Probably make a column with date, as its name).
However, I would like to easily delete the data that is too old but it is very difficult to delete columns using Sqlite (and it may be slow because I need to copy the required column And then delete the old table)
Is there a better way to organize this data apart from creating a column for each date? Or should I use any other than sqlite?
This would probably be easier to separate your data into two tables like:
Create a table object (ID primary key, ...); Table extra_data (objectid INTEGER, date DATETIME, create ...) Foreign key (object) reference object (ID)); In this way, when you have to delete all your entries from a date, it will be easy:
Delete additional data from WHERE date = crack; I will try to change tables all the time, usually indicating a bad design.
Comments
Post a Comment