I am creating a social networking site with features similar to Facebook. I want to start by designing a schema for my database. I decided to create each table for each user who registers on our site .. Am I right?
If a million users register on my site, a million tables will be created. How to continue optimization? Please suggest me methods to overcome this, and some links or books to learn about such concepts will be helpful.
Thanks at Advance.
This is not how you want to do it.
, , (, 'users'), . .
'users'
, - :
TABLE users - username AS VARCHAR(255) - password AS VARCHAR(255) (use a hashed password, of course) - ...
, , , , users .
users
. , ( , ). , , , , .
, .
, , ( ), ( ).
NAME
SURNAME
AGE
{NAME:"John", SURNAME:"Smith", AGE:"32"}
, . , USER. , : , , , .., : NAME, SURNAME, AGE, ADDRESS .. . , .
USER
ADDRESS
@ Nathan Usman asks, but wouldn’t this be a very complicated scheme if we wanted to record this user's daily transactions, like likes, messages he added or purchases he made in the past, or the number of friends he has? how many sub-tables do we need to do in this case, is it effective?
Source: https://habr.com/ru/post/1789355/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1789350/raphael-js-to-make-a-map-with-tooltips-on-hover&usg=ALkJrhjsPb4sjnAmMAIEVh0yCQesEXkuNAListBox and DataTrigger - c #In Windows 7, my VB6 application cannot see the “System” DSN, but it does not have a problem finding the “User” DSN - windows-7Converting a list of identifiers to a list of objects with ORM, like Hibernate - collectionsкак оптимизировать макет в графике, чтобы удалить ненужные пересечения ребер? - graphRouting error with Rails 3 with members - ruby-on-railsСостав объектов - oopIs calling virtual functions indirectly from the constructor always undefined behavior? - c ++How to use Script -fu to select a dash line, as in the "Stroke Path" - "Stroke Line" - gimpКак подкласс array.array и его производный конструктор не принимает параметров в python? - pythonAll Articles