Have very limited experience with databases and trying to figure out the best method for creating a growing database of users and keeping track of their growing information when added.
For instance, I have 3 users - Apple, Banana, Cherry. And they all have a list of information associated with them.
Apple: [1/1/17, green, 3], [2/4/17, red, 5], [4/19/17, blue, 2]
Banana: [2/18/17, yellow, 6], [5/14/17, yellow, 5]
Cherry: [5/21/17, green, 12], [8/2/17, red, 5], [9/29/17, blue, 42],
[1/1/17, green, 3]
Before even getting into working with a growing list, how does this get applied to a database?
Do I create a main database, something like FruitDatabase, and then inside those databases have Apple, Banana, and Cherry as their own tables?
Or does each user get their own database and then their associated information get applied to their own table (that doesn't seem efficient)?
What if I later want to add up all of Apple's number (3+5+2), what's the best method of doing that? It doesn't seem like I can put an ArrayList into a database, do I just convert it into a string and separate the number with a comma? And if I want to add a new user, DragonFruit, is it more efficient to add it as a column or row?