aseemk / node-neo4j-template

A template app for using Neo4j from Node.js.
http://node-neo4j-template.herokuapp.com/
216 stars 92 forks source link

data modelling #5

Closed sapkal-manish closed 10 years ago

sapkal-manish commented 11 years ago

hi fork,

I am developing social networking website. I am using mysql as primary database and jeo4j (in-memory store) for maintainig relations between my website users. I am developing this website in node.js

I have read this blog (https://github.com/aseemk/node-neo4j-template/blob/master/models/user.js) and trying to do as mentioned in blog/document. But I am not getting, how do I do?

I have data modelling in mysql as follows :

table : UserMst ( UserID (PrimaryKey), UserName, FullName, EMail, MobileNo etc...) table : Friends ( FriendID (PrimaryKey), UserID, FriendID )

Now, when some user come on website through login process, I have to check wather it is exist in neo4j (I have UserID). If He/she doesn't exist in jeo4j then insert it with it basic details (eg. UserID, UserName, FullName, EMail, MobileNo) or get it's stored information.

after that I am going to fetch his/her friend detail from mysql. Now I have to insert that all friends in neo4j if they not exist and then join/link each other.

I have tried to do above senario as mentioned in diffrent blogs, but I have not getting success.

Can anyone sugess/guid me How do I do this?

aseemk commented 10 years ago

Sorry I never responded to this, @sapkal-manish.

This is too complex of a question to be answered easily, and this issue is not the right place to do it. If you're still having issues like this, Stack Overflow or the mailing list are the best places to ask.