What databse is most similar to Map, where there are stored infinity “keys” and “values” per...












-2















I want to create user database for my application. It sounds simple but I do not know which database will be the best for this.



I want to let user set his own variables like "points = 5". He will have posibility to expand his indexes keys and values as much as he will want. All his data must be linked to his name.



Something like:



Josh -> "points":"5"
"health":"20"
...
"indexN":"valueN"

Joel -> "food":"5"
"feels":"good"

... -> ...


This database will be read from multiple servers so it can not be local like JSON, CSV, YAML or SQLite. The good solution is MySQL but structure of this database requires to create tables and columns inside of tables for individual type of row names:values.



It can be also stored like this in mysql with only 2 columns (Name, Value), and values may look like this:



1: "Joel", "'food':'5', 'feels':'good', "
2: "Josh", "'points':'5', 'health':'4', "


But is there any better way than stoarging data per user like this? Is there any database dedicated for needs like mine?










share|improve this question















closed as off-topic by Pradeep Simha, jmoerdyk, Phil, Raedwald, Basil Bourque Nov 13 '18 at 23:22


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – Pradeep Simha, jmoerdyk, Phil, Raedwald, Basil Bourque

If this question can be reworded to fit the rules in the help center, please edit the question.

















  • Bigtable: A Distributed Storage System for Structured Data

    – Elliott Frisch
    Nov 13 '18 at 22:08











  • Is there any open source database like this? I have my own dedicated servers and I want to use only them.

    – Albert451
    Nov 13 '18 at 22:23











  • Yes. See Apache Hadoop.

    – Elliott Frisch
    Nov 13 '18 at 22:27











  • redis hashes will do exactly what you want. hset and hget example here: redis.io/commands/hget and redis.io/topics/data-types-intro (look for hash example which describes your use case of a user's attributes)

    – maggu
    Nov 13 '18 at 23:04








  • 1





    Ask on the sister site, Software Recommendations Stack Exchange. List very specifically your criteria for choosing a database, and Answers appear to suggest a specific solution.

    – Basil Bourque
    Nov 13 '18 at 23:25
















-2















I want to create user database for my application. It sounds simple but I do not know which database will be the best for this.



I want to let user set his own variables like "points = 5". He will have posibility to expand his indexes keys and values as much as he will want. All his data must be linked to his name.



Something like:



Josh -> "points":"5"
"health":"20"
...
"indexN":"valueN"

Joel -> "food":"5"
"feels":"good"

... -> ...


This database will be read from multiple servers so it can not be local like JSON, CSV, YAML or SQLite. The good solution is MySQL but structure of this database requires to create tables and columns inside of tables for individual type of row names:values.



It can be also stored like this in mysql with only 2 columns (Name, Value), and values may look like this:



1: "Joel", "'food':'5', 'feels':'good', "
2: "Josh", "'points':'5', 'health':'4', "


But is there any better way than stoarging data per user like this? Is there any database dedicated for needs like mine?










share|improve this question















closed as off-topic by Pradeep Simha, jmoerdyk, Phil, Raedwald, Basil Bourque Nov 13 '18 at 23:22


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – Pradeep Simha, jmoerdyk, Phil, Raedwald, Basil Bourque

If this question can be reworded to fit the rules in the help center, please edit the question.

















  • Bigtable: A Distributed Storage System for Structured Data

    – Elliott Frisch
    Nov 13 '18 at 22:08











  • Is there any open source database like this? I have my own dedicated servers and I want to use only them.

    – Albert451
    Nov 13 '18 at 22:23











  • Yes. See Apache Hadoop.

    – Elliott Frisch
    Nov 13 '18 at 22:27











  • redis hashes will do exactly what you want. hset and hget example here: redis.io/commands/hget and redis.io/topics/data-types-intro (look for hash example which describes your use case of a user's attributes)

    – maggu
    Nov 13 '18 at 23:04








  • 1





    Ask on the sister site, Software Recommendations Stack Exchange. List very specifically your criteria for choosing a database, and Answers appear to suggest a specific solution.

    – Basil Bourque
    Nov 13 '18 at 23:25














-2












-2








-2








I want to create user database for my application. It sounds simple but I do not know which database will be the best for this.



I want to let user set his own variables like "points = 5". He will have posibility to expand his indexes keys and values as much as he will want. All his data must be linked to his name.



Something like:



Josh -> "points":"5"
"health":"20"
...
"indexN":"valueN"

Joel -> "food":"5"
"feels":"good"

... -> ...


This database will be read from multiple servers so it can not be local like JSON, CSV, YAML or SQLite. The good solution is MySQL but structure of this database requires to create tables and columns inside of tables for individual type of row names:values.



It can be also stored like this in mysql with only 2 columns (Name, Value), and values may look like this:



1: "Joel", "'food':'5', 'feels':'good', "
2: "Josh", "'points':'5', 'health':'4', "


But is there any better way than stoarging data per user like this? Is there any database dedicated for needs like mine?










share|improve this question
















I want to create user database for my application. It sounds simple but I do not know which database will be the best for this.



I want to let user set his own variables like "points = 5". He will have posibility to expand his indexes keys and values as much as he will want. All his data must be linked to his name.



Something like:



Josh -> "points":"5"
"health":"20"
...
"indexN":"valueN"

Joel -> "food":"5"
"feels":"good"

... -> ...


This database will be read from multiple servers so it can not be local like JSON, CSV, YAML or SQLite. The good solution is MySQL but structure of this database requires to create tables and columns inside of tables for individual type of row names:values.



It can be also stored like this in mysql with only 2 columns (Name, Value), and values may look like this:



1: "Joel", "'food':'5', 'feels':'good', "
2: "Josh", "'points':'5', 'health':'4', "


But is there any better way than stoarging data per user like this? Is there any database dedicated for needs like mine?







java sql database storage






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 14 '18 at 21:44







Albert451

















asked Nov 13 '18 at 22:06









Albert451Albert451

287




287




closed as off-topic by Pradeep Simha, jmoerdyk, Phil, Raedwald, Basil Bourque Nov 13 '18 at 23:22


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – Pradeep Simha, jmoerdyk, Phil, Raedwald, Basil Bourque

If this question can be reworded to fit the rules in the help center, please edit the question.







closed as off-topic by Pradeep Simha, jmoerdyk, Phil, Raedwald, Basil Bourque Nov 13 '18 at 23:22


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – Pradeep Simha, jmoerdyk, Phil, Raedwald, Basil Bourque

If this question can be reworded to fit the rules in the help center, please edit the question.













  • Bigtable: A Distributed Storage System for Structured Data

    – Elliott Frisch
    Nov 13 '18 at 22:08











  • Is there any open source database like this? I have my own dedicated servers and I want to use only them.

    – Albert451
    Nov 13 '18 at 22:23











  • Yes. See Apache Hadoop.

    – Elliott Frisch
    Nov 13 '18 at 22:27











  • redis hashes will do exactly what you want. hset and hget example here: redis.io/commands/hget and redis.io/topics/data-types-intro (look for hash example which describes your use case of a user's attributes)

    – maggu
    Nov 13 '18 at 23:04








  • 1





    Ask on the sister site, Software Recommendations Stack Exchange. List very specifically your criteria for choosing a database, and Answers appear to suggest a specific solution.

    – Basil Bourque
    Nov 13 '18 at 23:25



















  • Bigtable: A Distributed Storage System for Structured Data

    – Elliott Frisch
    Nov 13 '18 at 22:08











  • Is there any open source database like this? I have my own dedicated servers and I want to use only them.

    – Albert451
    Nov 13 '18 at 22:23











  • Yes. See Apache Hadoop.

    – Elliott Frisch
    Nov 13 '18 at 22:27











  • redis hashes will do exactly what you want. hset and hget example here: redis.io/commands/hget and redis.io/topics/data-types-intro (look for hash example which describes your use case of a user's attributes)

    – maggu
    Nov 13 '18 at 23:04








  • 1





    Ask on the sister site, Software Recommendations Stack Exchange. List very specifically your criteria for choosing a database, and Answers appear to suggest a specific solution.

    – Basil Bourque
    Nov 13 '18 at 23:25

















Bigtable: A Distributed Storage System for Structured Data

– Elliott Frisch
Nov 13 '18 at 22:08





Bigtable: A Distributed Storage System for Structured Data

– Elliott Frisch
Nov 13 '18 at 22:08













Is there any open source database like this? I have my own dedicated servers and I want to use only them.

– Albert451
Nov 13 '18 at 22:23





Is there any open source database like this? I have my own dedicated servers and I want to use only them.

– Albert451
Nov 13 '18 at 22:23













Yes. See Apache Hadoop.

– Elliott Frisch
Nov 13 '18 at 22:27





Yes. See Apache Hadoop.

– Elliott Frisch
Nov 13 '18 at 22:27













redis hashes will do exactly what you want. hset and hget example here: redis.io/commands/hget and redis.io/topics/data-types-intro (look for hash example which describes your use case of a user's attributes)

– maggu
Nov 13 '18 at 23:04







redis hashes will do exactly what you want. hset and hget example here: redis.io/commands/hget and redis.io/topics/data-types-intro (look for hash example which describes your use case of a user's attributes)

– maggu
Nov 13 '18 at 23:04






1




1





Ask on the sister site, Software Recommendations Stack Exchange. List very specifically your criteria for choosing a database, and Answers appear to suggest a specific solution.

– Basil Bourque
Nov 13 '18 at 23:25





Ask on the sister site, Software Recommendations Stack Exchange. List very specifically your criteria for choosing a database, and Answers appear to suggest a specific solution.

– Basil Bourque
Nov 13 '18 at 23:25












1 Answer
1






active

oldest

votes


















1














You can do this with a database like MySQL using 2 tables. The 2 tables schema would be something like this:



Table1
id

Table2
id
key
value


And populated with your data, it would look something like this:



Table1
id=Josh
id=Joel

Table2
id=Josh,key=points,value=5
id=Josh,key=health,value=20
id=Joel,key=points,value=5


This allows you to add a dynamic amount of key value pairs for the ids in Table1. This might not be the ideal solution, just one that would work in MySQL or other relational databases.






share|improve this answer
























  • For what table1 is need if table2 also has id? Also I do not want to put multiple records with same id. I want ID to be individual to select all the data with just one query or request.

    – Albert451
    Nov 13 '18 at 22:20













  • I assumed you would have more columns within Table1 that you didn't list, such as other user information. If that is literally all the data you need, then you would only need Table2. However, if there are keys that appear for all your users, I would put it in Table1 and only put keys in Table2 that are dynamically created.

    – Justin
    Nov 13 '18 at 22:23


















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














You can do this with a database like MySQL using 2 tables. The 2 tables schema would be something like this:



Table1
id

Table2
id
key
value


And populated with your data, it would look something like this:



Table1
id=Josh
id=Joel

Table2
id=Josh,key=points,value=5
id=Josh,key=health,value=20
id=Joel,key=points,value=5


This allows you to add a dynamic amount of key value pairs for the ids in Table1. This might not be the ideal solution, just one that would work in MySQL or other relational databases.






share|improve this answer
























  • For what table1 is need if table2 also has id? Also I do not want to put multiple records with same id. I want ID to be individual to select all the data with just one query or request.

    – Albert451
    Nov 13 '18 at 22:20













  • I assumed you would have more columns within Table1 that you didn't list, such as other user information. If that is literally all the data you need, then you would only need Table2. However, if there are keys that appear for all your users, I would put it in Table1 and only put keys in Table2 that are dynamically created.

    – Justin
    Nov 13 '18 at 22:23
















1














You can do this with a database like MySQL using 2 tables. The 2 tables schema would be something like this:



Table1
id

Table2
id
key
value


And populated with your data, it would look something like this:



Table1
id=Josh
id=Joel

Table2
id=Josh,key=points,value=5
id=Josh,key=health,value=20
id=Joel,key=points,value=5


This allows you to add a dynamic amount of key value pairs for the ids in Table1. This might not be the ideal solution, just one that would work in MySQL or other relational databases.






share|improve this answer
























  • For what table1 is need if table2 also has id? Also I do not want to put multiple records with same id. I want ID to be individual to select all the data with just one query or request.

    – Albert451
    Nov 13 '18 at 22:20













  • I assumed you would have more columns within Table1 that you didn't list, such as other user information. If that is literally all the data you need, then you would only need Table2. However, if there are keys that appear for all your users, I would put it in Table1 and only put keys in Table2 that are dynamically created.

    – Justin
    Nov 13 '18 at 22:23














1












1








1







You can do this with a database like MySQL using 2 tables. The 2 tables schema would be something like this:



Table1
id

Table2
id
key
value


And populated with your data, it would look something like this:



Table1
id=Josh
id=Joel

Table2
id=Josh,key=points,value=5
id=Josh,key=health,value=20
id=Joel,key=points,value=5


This allows you to add a dynamic amount of key value pairs for the ids in Table1. This might not be the ideal solution, just one that would work in MySQL or other relational databases.






share|improve this answer













You can do this with a database like MySQL using 2 tables. The 2 tables schema would be something like this:



Table1
id

Table2
id
key
value


And populated with your data, it would look something like this:



Table1
id=Josh
id=Joel

Table2
id=Josh,key=points,value=5
id=Josh,key=health,value=20
id=Joel,key=points,value=5


This allows you to add a dynamic amount of key value pairs for the ids in Table1. This might not be the ideal solution, just one that would work in MySQL or other relational databases.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 13 '18 at 22:18









JustinJustin

9781511




9781511













  • For what table1 is need if table2 also has id? Also I do not want to put multiple records with same id. I want ID to be individual to select all the data with just one query or request.

    – Albert451
    Nov 13 '18 at 22:20













  • I assumed you would have more columns within Table1 that you didn't list, such as other user information. If that is literally all the data you need, then you would only need Table2. However, if there are keys that appear for all your users, I would put it in Table1 and only put keys in Table2 that are dynamically created.

    – Justin
    Nov 13 '18 at 22:23



















  • For what table1 is need if table2 also has id? Also I do not want to put multiple records with same id. I want ID to be individual to select all the data with just one query or request.

    – Albert451
    Nov 13 '18 at 22:20













  • I assumed you would have more columns within Table1 that you didn't list, such as other user information. If that is literally all the data you need, then you would only need Table2. However, if there are keys that appear for all your users, I would put it in Table1 and only put keys in Table2 that are dynamically created.

    – Justin
    Nov 13 '18 at 22:23

















For what table1 is need if table2 also has id? Also I do not want to put multiple records with same id. I want ID to be individual to select all the data with just one query or request.

– Albert451
Nov 13 '18 at 22:20







For what table1 is need if table2 also has id? Also I do not want to put multiple records with same id. I want ID to be individual to select all the data with just one query or request.

– Albert451
Nov 13 '18 at 22:20















I assumed you would have more columns within Table1 that you didn't list, such as other user information. If that is literally all the data you need, then you would only need Table2. However, if there are keys that appear for all your users, I would put it in Table1 and only put keys in Table2 that are dynamically created.

– Justin
Nov 13 '18 at 22:23





I assumed you would have more columns within Table1 that you didn't list, such as other user information. If that is literally all the data you need, then you would only need Table2. However, if there are keys that appear for all your users, I would put it in Table1 and only put keys in Table2 that are dynamically created.

– Justin
Nov 13 '18 at 22:23



Popular posts from this blog

List item for chat from Array inside array React Native

Thiostrepton

Caerphilly