I need to store data that can be variable, e.g. (data1=’test1′,data2=’test2′).
Is json the best way to do this ? or there is a better way?
Creating a table to contain the value, can’t be done since the keys are dynamic.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I would do it in JSON, yes. Just be sure to have a column data size that’s long enough to accomodate your JSON strings.
You might want to have a look at
MongoDBand other non-structured databases one day though, they’re the more elegant way to do that.