Answer the question
In order to leave comments, you need to log in
Quick search in the database. What to choose?
Hello dear!
It is necessary to develop a program to work with a constantly growing database. The algorithm of the program is very simple: if the string does not exist in the database, then add it to the database.
The question is that the database is planned to be very large, about a million records and constantly accessing it to check the existence of a particular line. The base does not exist yet, but it is planned that it will be simple in structure, approximately "key-value" ...
I will write in C#.
It would be interesting to know in what format it is best to store the database (XML, JSON, etc. except SQL) and what search algorithm to use so that this business works quickly.
Answer the question
In order to leave comments, you need to log in
Don't like SQL - use NoSQL like MongoDB . There, at the same time, indexes are supported and all that. You can organize a tree. Or you can use a metric space for custom hashes of strings. It's as you wish.
Look towards the organization of the tree.
Each tree node is a letter in a string.
The best way to store a tree is binary sequences.
A large (really) amount of structured data -> DB
Well, there are already indexes, HP and other performance improvement stories
other than SQL
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question