While making a website like facebook
we can follow two approach of database design so please suggest better Concern is Data Secuirty and Backup Management
Approach 1 Design a table that will hold all the data of the personal and some other table that will hold other keys like image etc the problem will come when there are 10 lakhs of entries in the table is it possible thereafter to take backup some hosting company wont allow to do so.
Approach 2 While the user signup assign the separate table to the users in that way user will reach to ten thousand rows in 5 years or so just a assumption
but that means million tables in the database if million user signup and that again a problem i believe
Please suggest better way if anyone can
Sites the size of Facebook have unique challenges specific to their setups. Facebook, Twitter, Google, etc. all maintain their own forks of database engines and often even write their own, and they'll be using different databases for different purposes. Very little of what they do is going to be applicable to anything you build.
Approach #1 is by far the better. With proper indexes and a good database design, MySQL can support billions of rows. It cannot as easily support millions of tables.