- Home /
Profiles with sqlite?
First off, I'm not sure even how to ask this question, so bear with me. I need a way to save a profile based on multiple items, multiple names, a date and place saved in multiple tables inside a SQLite database. I want to be able to go back and see what items were used in previous instances and who used them. Setting up a new table would not work as I don't want: a. the same information repeated over and over, b. I want the full list of items belonging to the names rather than just the first one.
If anyone is able to help, I would certainly appreciate it. This is going to be an android app. Please let me know if this question requires further clarification. Thanks!
This question seems to be a database design question and is not much related to Unity. Of course, pretty much any technology could be integrated and used in Unity, however you don't seem to have a Unity specific problem but a design problem which is only relevant to SQLite. So technically the question is off-topic. Though we would like to help you, but the information provided is way to generic.
What's an "item"? What fields / properties does it have?
What do you mean by "names"? And what's the relation to the items?
For what purpose do you need the date / place information? What's the relation between a "place / date" combination and an "item" or a "name"?
If an item should be bound to a place / date, can the same item from different places / dates have different values? Or is the item information more or less constant and unique?
In a relational database (like SQL / SQLite) relations can be "1-to-1", "1-to-n" or "n-to-m". If you want any useful answer you should add this information to your question above. It's easier to understand what you want to do when you describe the purpose of each entity and what's your final goal. Putting data into a database isn't the actual goal. The database is just a tool to accomplish a task.
Apart from that you might want to look up Database Normalization.
Thanks Bunny83! An item is a piece of equipment with an ID and a Description. Names are the members of the $$anonymous$$m with an ID and name. The date is when an event takes place. I wanted to use the date/name of event as an ID so the user could select which event and choose the equipment needed for that "mission."
Does that help a little? I will take a look at the link. A this point I'm wondering if xml or json would suit the purpose a little better. Take what is needed from the different tables and put it into a save-able form so it can be loaded later either to be looked at (That's what we used on that "mission") or to prepare for a new "mission."
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Sqlite database and Android 1 Answer
Making a bubble level (not a game but work tool) 1 Answer
Run return method on new thread? 2 Answers