mysql - The couchdb equivalent of a relational database model -
mysql - The couchdb equivalent of a relational database model -
i new @ utilize of couchdb, have background in backend programming , relational databases.
i want "migrate knowledge" mysql couchdb. although found lot of info installation , getting started tutorials, having problem "translate" relational model couchdb document storage. , know, need reset way of thinking...
i want matter best way possible, started basic exercise. have simple relational model actual in utilize software application. simplicity purposes, toned downwards number of fields.
case
we have stack of cards. each card has own properties (id, name, imgpath, etc). each user can have random collection of cards picked stack in own cards collection.
mysql
in mysql there 3 tables:
users [id, name, password] cards [id, name, value1, value2, imgpath, etc] usercards [userid, cardid]other relevant information:
we have more 10k users , growing. it's mobile app, speed much relevant. we (now) utilize different db.scheme per user, each assigned own userrights per scheme. (once decision made regarding security).couchdb questions
what efficient way of storing users , cards in couchdb document model? (so how "translate" tables?)
is efficient/more secure create database/scheme each of users or store in 1 database?
obviously there lot more tables , fields involved in real life application itself, need solid starting point , i, hopefully, can go there.
thank in advance help!
what efficient way of storing users , cards in couchdb document model? (so how "translate" tables?)
store user docs in built-in_users
db store cards in separate bucket (db) implement mapping cards2user view is efficient/more secure create database/scheme each of users or store in 1 database?
it depends on application needs:
if need command read access card need db-per-user approach.
if need command write access 1 db cards recommendation.
user accounts stored in users db united nations both cases.
mysql database couchdb
Comments
Post a Comment