Friday 15 June 2012

android - Database to use for storing profile information -



android - Database to use for storing profile information -

i'm making application android used store profile info of user( firstname, lastname, email, username, password ). store profile image of person. can think of applications whatsapp, viber tango. there many more it.

in order store , access info , efficiently, how should these info stored? i'm thinking storing info in relational database mysql. have fn,ln,email,username, password , link profile image columns of table. 1 more issue had in mind if user has 100 friends, should create new table per user his/her friends can separate , accessed single table or should run complex sql query returns list of friends of user?

thanks lot

i believe on right track. mysql fine selection storing info long on server can accessed application.

you need 2 tables: 1 store of users , map users friends.

your users table pretty straight forwards have laid out. other table (could named user_friends) have column containing id of friend made request, column containing id of friend accepted request, , other x amount of columns may need contain info friendship. record without id accepted friend can displayed pending request.

i create sure there can 1 record containing mapping of friends prevent duplicates well.

android sql database database-design relational-database

No comments:

Post a Comment