- Jul 11, 2004
- 21,867
- 7
- 81
I'm creating a simple Android application where a user can subscribe 'inventories' and then view the 'items' within each inventory. I want to persist the list of inventories and the items in each inventory so I won't need to go out to the server to view the information every time.
I've never done any work with SQL or any database system. I have looked at a few simple Android SQLite examples and understand the basic idea. These examples have a few hardcoded hard coded tables in the database, simpler than the behavior I want (I think... ).
My thinking is that I want one table for the list of inventories. Then when I subscribe to a new inventory, I'll dynamically add a new table for the items in that inventory. This is where I get lost.
Can I create tables on the fly?
Assuming I can, I'm guessing that one of the columns in my "inventory list" table will be a pointer to the "items" table for that inventory. Does that sound right?
Please advise. I could use any help or pointers I can get.
I've never done any work with SQL or any database system. I have looked at a few simple Android SQLite examples and understand the basic idea. These examples have a few hardcoded hard coded tables in the database, simpler than the behavior I want (I think... ).
My thinking is that I want one table for the list of inventories. Then when I subscribe to a new inventory, I'll dynamically add a new table for the items in that inventory. This is where I get lost.
Can I create tables on the fly?
Assuming I can, I'm guessing that one of the columns in my "inventory list" table will be a pointer to the "items" table for that inventory. Does that sound right?
Please advise. I could use any help or pointers I can get.
