android - How to store json array elements into one table in sqlite db -
i want store data 1 table through 1 pojo class.so understanding can relate 2 seprate tables.but per requirement have save in 1 table. don't want save in 2 seprate tables.how achieve ? (i need logic here.. i'm not expecting code leve)
edit part
as can see, there no common parameter relate data in future seperate table
{ "createdate": 1339957800000, "modifydate": 1341197519000, "createdby": "aaa", "modifiedby": "ddd", "status": "a", "description": "ffff", "parentid": null, "sourceid": null, "source_field1": null, "source_field2": null, "source_field3": null, "source_field4": null, "source_field5": null, "parentkey": null, "parentvalue": null, "genericmasterview": { "key": "mod_one", "value": "195" } },
first suggestion create table 2 column 1 key , other value key contain unique string key represent ur data , value contain json feed string
other suggestion create table keys columns key genericmasterview accommodate in 2 column genericmasterview_key , genericmasterview_value parse json , enter records in database. hope help.
Comments
Post a Comment