Friday, February 7, 2014

Imitation micro-channel


            
The rookie is to graduate students, has recently made a similar micro-channel in a software. To achieve android client and back two functions.
When designing a database back-end services, feeling unable to start up.
Began to design a one Userinfo tables, fields are Id, name, pwd, imagePath, address, remark, sex and so on. But friends do not know so well designed. If you are adding a foreign key in Userinfo Friendid in. Design information table so that friends ah! Tables and fields and user information fields Friends Information Table is the same main problem is to add a buddy of information in the field UserInfo do not know.

And click on the android client friends list, you can show your friends details.
I explained clearly did not know! Hope you big cow to the point, bear with me.
Reply:
A user table
A middle table records friends user ID, is many to many relationship should be on it.

Intermediate table
ROW_ID, UID, FID, ADD_TIME
UID is the user ID, FID are friends user ID, ADD_TIME is to add time, add other attributes you can extend

Friends also in the user table inside.
Reply:
cited landlord songneng1993 reply:
the rookie is to graduate students, has recently made a similar micro-channel in a software. To achieve android client and back two functions.
When designing a database back-end services, feeling unable to start up.
Began to design a one Userinfo tables, fields are Id, name, pwd, imagePath, address, remark, sex and so on. But friends do not know so well designed. If you are adding a foreign key in Userinfo Friendid in. Design information table so that friends ah! Tables and fields and user information fields Friends Information Table is the same main problem is to add a buddy of information in the field UserInfo do not know.

And click on the android client friends list, you can show your friends details.
I explained clearly did not know! Hope you big cow to the point, bear with me.

Looks like a little idea of ​​it! Tencent did not know is how to create a back-end database. Today encountered similar problems kinda old fire, which is also a way to thank Daniel, after more advice ah
Reply:
It is this idea of ​​a floor general, the middle table records the relationship between friends. Friends of the data correspond directly to the user table to find
Reply:
reference to the third floor cclovescw reply:
is this idea of ​​a floor general, the middle table records the relationship between friends. Friends of the data correspond directly to the user list to find

Reply:
not learn android, but learned

No comments:

Post a Comment