2
I am creating an application in C#
that must have a database. At first I’m thinking of using Sqlite for simplicity. But for each data entered in my bank must have :
- Identifying (
int
,char
,bool
)... - Vector (which can be of size as 2.10000)
The problem is how to store this vector, and Sqlite does not accept vectors.
I have already researched some solutions, but I have doubts about these options and regarding their problems.
1 - Store as a string:
Is there a problem storing very large strings? Anyway my values are float
or double
, and converting to string
, I will easily be losing information, so I do not know if this is a good solution.
2 - Create new tables for each new entry:
So I would have a main table and for each new input I would need to create a new table. The solution may be interesting, but a database with many tables (10000 tables) could not be slow?
I would like one of these two options above if any of them can work well, or else indicate me an alternative to a database that I can place vectors as table elements.
Thanks Bigown. Just a question. If I did as you said, using only two tables, I would have a main table with the register (which could reach 10thousand lines), and a second table, related by the primary key. In this second table for each row of table 1, I would have (10thousand rows, which are the vectors). So I could have a table with 100,000,000 rows, with 6 or 7 columns. I won’t have a problem with this mass of data using Sqllite. He’ll figure it out?
– Antonio Rafael da Silva Filho
Not at all. Sqlite handles these volumes very well without hiccupping. Eventually creating some index can be useful. These optimizations are necessary in any DB in the most diverse situations. The pet is furry and for almost everything is not due to other solutions.
– Maniero