I am currently in the process of going through some PHP training with procedural code and will be doing a course in OOP with PHP right after that. The course will provide a solid starting point for me to build a social network project that I originally designed in a relational database format. The design of the site should be fairly simple as there are less than 10 templates to build the site, and then a few static pages to tie it all together.

But as I researched other social networks and sites with larges amount of constantly changing data, I began finding things about social graphs and such that make the sites much faster in handling millions of people all at once.

Since my site will be based mostly on user generated content (article submissions or possible wiki type submissions) and connections with others through groups/ common interest/ and individual friend relationships, I think a standard relational database may not be the most efficient means to operate as the site grows.

So I am trying to decide my growth plan. Should I continue to design my site relationally for now and worry about upgrading to something else as my site grows? Or should I start planning now to use a different database style or programming language?

If the later, What should I look into. NOSQL seems to be the direction I need to go, but there are several types of that as well so trying to figure out what I may need is difficult. Will it work with the PHP code I already have set up, or would it require a complete redesign?

Also, Does OOP design prompt for different database designs than a procedural design?

closed as too broad by mustaccio, Vérace, Andriy M, Tom V, Philᵀᴹ Jan 24 '16 at 9:35

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    NoSQL is indeed better suited to store unstructured data, but are your data unstructured? You should probably choose the database platform you are comfortable with. By the way, Facebook, if you've heard about that social network project, is built on MySQL, which attempts to be a relational database. – mustaccio Jan 23 '16 at 23:35
  • @ mustaccio They do but only for some of their data. See quora.com/…. – Treasa Jan 24 '16 at 0:17
  • Start simple. Don't worry about growth or performance till you desperately need to. For instance facebook started with MySQL for everything then only switched things up as they learned more and knew where improvements could be made. Keeping thing simple first provides luxury of getting actual users to start with where performance is acceptable and better knowledge of their usage and DB stats to know where and how to improve things when the time comes. – Turgs Jan 24 '16 at 5:38
  • Thats true. Thats what I was kind of thinking myself – Jon Cody Jan 25 '16 at 2:21

I work in an organisation that has implemented RDBMS and NoSQL databases (Hadoop). We're looking at getting rid of the RDBMS as it is not as flexible as it needs to be for constantly changing data. So NoSQL would be the way to go. And we use OOP. With OOP you can use a mixture of both databases as we are doing now. It does not have to stop at the RDBMS. It can still be used in part for some structured data such as customers. However, the more dynamic content will need something bigger.

In comparison, Google use big table. They were the first to come up with the NO SQL data stores. BigTable comes into play. It solves the problem of scaling petabytes of storage everyday. BigTable stores data in tables. A row is a URL name. A column can be the features of the web page A cell, contains the data which is time-stamped. The row ranges are broken up into partitions called tablets The tablets are distributed across multiple servers for load balancing.

Big data is the way to go and especially for user generated content with no structure. RDBMS is for structured data.
No SQL data stores for unstructured data.

Having used both with all kinds of different virtual environments and structured data I am confident that a mixture of both will help to meet your entire requirements.

  • So what exactly does user generated content with no structure mean? If I am allowing users to submit their own articles on various topics, there is some structure as the database would record who wrote it, The title, and information like that. Then other users may add comments and such. But, if I were to implement a wiki style system where users could go in and edit or add to someones work, that could make the database handling difficult. – Jon Cody Jan 24 '16 at 1:47
  • 3
    @Jon Even a wiki entry is just a big blob of HTML, with some related images etc. Not sure why RDMBS, NoSQL, or plain text files are better or worse for that scenario without a full understanding of the business requirements. – Aaron Bertrand Jan 24 '16 at 1:56
  • 1
    I was more so thinking about keeping track of revisions from multiple sources. If that would be considered unstructured content. Main thing i'm asking, What is an example of unstructured content? – Jon Cody Jan 24 '16 at 5:16
  • Hey - webopedia.com/TERM/U/unstructured_data.html might clarify this for you. Unstructured data is usually text, paragraphs, emails, messages - information that is not arranged into columns but can be searched. In an RDBMS, structured data is in tables and arranged in columns with Primary Keys and Foreign keys. Hope this helps – Treasa Jan 28 '16 at 20:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.