Pinto90
Pinto90

Reputation: 31

Document and Graph database choices

I have needs for my system:
1) Friends - need to calculate distance between users upto N degrees, find work related common items between users. Can't scale this onmysql well. So the choice i assume is a Graph database?

2) I have user profile fields, about 120 fields with 80% of them being 1:M fields, so in mysql this means about 96 tables to store the 1:M. If i need to pull all user info then i need to reach all these tables. So a solution here is a document database, colunm database or key value database?

Currently I have seen OrientDB which can act as a document and graph database. Can this be used for the above needs or are there better DB options for this?

Thanks.

EDIT: Req for Profile is User fields: IT is career social network so lots of portfolia like fields which are 1:M. So if there are 120 fields with 96 of them being 1:M how best to store it? Exqample is Companies you worked at. Schools you studied at. Magazines you read. Articles you have written, etc. Each of these are 1:M and there are 96ish fields like this = 96 Mysql tables. I cannot combine because some of these have unique metadata. I need to search on the fields and allow for quick read to keep user experience good.

For graphing: It is about connecting people. For launch I am only using one feature that is when yu view someone the system will say how many degrees seperate you from the person. Rest of 'social' features are for post launch. Eitherways in MySQL I cant do this well enough to scale. IF I have 100 friends and each person as 100 friends and so forst how to best find my way around these people, i assume a graph DB.

Platform is codeignitor PHP / Mysql for core DB.

Upvotes: 3

Views: 759

Answers (2)

Manuel Salvadores
Manuel Salvadores

Reputation: 16525

Sounds like a great scenario for RDF databases - AKA triple stores. If your data is about people's connection ... why don't you model it with the FOAF vocabulary in RDF. Then you can use one of the many triple stores. If you need scalability I recommend 4store - a distributed RDF database written in C. 4store will distribute your data in cluster and you'll be able to query it with SPARQL

Definitely an option to consider in your case.

Upvotes: 0

KoW
KoW

Reputation: 784

Calculate distance between nodes sounds a lot like graph database. OrientDB looks very impressive, I personally have played around with Neo4j, which you might have a look at.

To give a definitive answer, you would have to provide more of your requirements.

Upvotes: 1

Related Questions