I'd like to create a DB to store different rows type. It will be kind of event list with time stamp. So I'd like to have an
Event table with relations to other tables - each table will be a row type (
Is this a good approach? Possible drawbacks:
- as a result I'll have to take care that every row in
Eventexactly 1 FK
not nullas it can relate to exactly 1 event
- when adding new event type I'll have to upgrade*
- when I'll have many event types the result will be that a row in
Eventtable will have mostly
nullcolumns and only 1 will be
Location tables has unique columns which are not put in the image above, e.g.
Position has 'latitude'/'longitude',
* By upgrade, I mean when I need to add new type to Event table I'll require rewrite whole Event table - as I'm working on Android it'll require using method SQLiteOpenHelper->onUpgrade.