S
S
sarapulov_k2019-10-22 13:00:09
Database
sarapulov_k, 2019-10-22 13:00:09

What is the best database to use to store 100M records or more?

MainTable, roughly the following structure:
-id
-category(~ 100 chars)
-title (~ 200 chars)
-key (based on title, no spaces, latin+numbers+hyphen+underscore)
-content (body of post, maybe large 10-100 thousand characters)
-date
category+key- unique
MetaTable value (for storing additional information):
-meta_id
-id
-meta_key
-meta_value
The MainTable is expected to store up to 100 million, therefore MetaTable can have more.
In the "width" the database can still expand, threw off the sketch, but in principle it displays the schema. She is very simple.
For each category there will be approximately 50-300 thousand records.
What is the best DB to use to store a lot of data in such a structure?
And I also want to ask if it is worth using the category + key composite key instead of ID. In theory, this should then help in participation by the category column (both in MainTable and MetaTable)?
I would like to get advice from those who have already encountered similar tasks and links to manuals that can help you figure out how to store a large amount of data

Answer the question

In order to leave comments, you need to log in

5 answer(s)
S
Stalker_RED, 2019-10-22
@Stalker_RED

For each category there will be approximately 50-300 thousand records.
then it is logical to put the category in a separate table. Read some textbook about database design and normal form , or something.
100 million records is not a lot, and almost any DBMS will do.

A
Artem Cherepakhin, 2019-10-22
@AltZ

Добрый день. СУБД под ваши нагрузки и правда можете выбирать любую. Лишь бы секционирование таблиц поддерживало. Postgres- очень хороший выбор. Есть нюанс Postgres, в некоторых случаях, может зависит от прямоты рук(т.е. как вы составите sql запрос). Как и у любой другой БД, есть свои особенности, с которыми вы можете встретиться, а можете не встретиться.
Ключ category+key вместо ID - не очень хорошая идея. Хотя бы поскольку только category имеет 100 символов, еще и key в придачу явно не пустой. Т.к. это первичный ключ по ним будет построен индекс. Ну и представьте, как будут выглядеть листовые блоки в индексах- при поиске в индексе нужного ключа придется по-битово сравнить 100 символов. Не критично, но идея не очень.
If the category is repeated, normalize the table (Ie, put the category values ​​in a separate table (entity)) and store the foreign key (key id) in the MainTable table.
I don't see the point in the key field.

R
Ronald McDonald, 2019-10-22
@Zoominger

in storing large amounts of data

Pfff, you have a children's base.
Well put MSSQL, business something.
You can Postgre, also not bad.

X
xmoonlight, 2019-10-22
@xmoonlight

Are you making a search engine for yourself?)
Then it's better to use cassandra.apache.org

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question