Support the ongoing development of Laravel.io →
Database Architecture
Last updated 1 year ago.
0

Just my opinion, MySql.

0

+1 for MySQL, you want to maintain the relationship so go with a relational database - a graph database neo4j(??) might be appropriate depending on your requirements

Useful info:

http://neo4j.com/developer/graph-db-vs-nosql/

0

for friendship/relationship a graph database is apparently more suitable then a mysql etc

0

Thanks... Looks like i should use mysql :) I just fear that the product is offline after 100.000 User and 1.000.000 Messages. I have no clue when this will happen that i would be offline... How big can a database of mysql be... or should i dont mind, because when it is getting that big i get an investor and a team? I just dont want to crash the system in a phase where i grow ... I talk to my hoster parallel. The biggest machine could be with 32 Cores and 128 GB Memory and 10 TB ... would this work for 100k users and 1,2 or 3 million messages. My selects are not complex. Only get the user who is logged in. And get by id the messages from the message table (where user_id ...) and then look who is the user who send this message (foreach message get the user who send this and then look to another table to look if he is my friend).

0

Choosing between different RDBMS or NoSQL databases isn't your main concern here. Your main problem is probably the scalability of database as you already mentioned it will be high traffic, using DDBMS (Distributed Database Management System) such as MySQL Cluster, Oracle Database, etc, sounds much reasonable to me.

Consider using shared nothing architecture parallel/distributed database, start up different database instances and 1 indexed catalog database, using algorithm to equally distributed to each node. Good thing about shared nothing architecture is that you just add more computer(node) when you need more horse power,

Finally, index frequently used field, and optimize your queries (as well as examine the DBMS query plan) will give your extra boost when doing queries.

Hope it helps.

Last updated 8 years ago.
0

i suggest you use a graph database, things like, "you and 4 other like this" and rendering friendships can become tedious with mysql. I suggest ditching mysql in the first place and using object store dbs such as Mongo and Neo4J. Mongo will store use accounts and other data while Neo4j can be used to store likes, comments and other entities. You will obviously need a wrapper to combine these two ifyou're using both. Social networks and mysql is a total nono. i've been there many times.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.