Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flexible way/database to keep a very large amount of data

I have a very large SQLite database (~10MB). Currently I'm using this database with a custom PHP interface at localhost, but I'm looking for a different storage and a different interface as well. The data inside does not change too often, so reading data has the priority.

I'm not very happy with the current setup, because the database schema is "custom" and I don't want to need to change it in the future (because maybe I will find a "better way"). I think it's not standard and that this may bother me in the future.

My question is: what is a good way to store data that is very flexible? I'm looking for a standard data storage that I will to fill just one time. Is SQLite still the best choice?

What is inside this database:

I'm going to describe in general how's the structure.

  • Table A is full of questions;
  • Table B is full of answers. Each question has different answers;
  • Tables from C are full of data regarding answer X of question Y. Each answer has a lot of different metadata available.

What is extremely important:

  • fast queries;
  • portability through *NIX without having to install a lot of software;
  • not too complex queries, bit still I will need some joins;
  • don't have to change the schema every two months.

What is not important:

  • frequent updates (I update the database once a year, more or less).

I thought of going with files and folders, but I'm not sure it's the best thing.

like image 910
Donovan Avatar asked Dec 29 '25 00:12

Donovan


1 Answers

Your problem can be well modelled as a Graph Problem. What about a Graph Based Database like Orient DB or Neo4j? In a portion of Graph there can be 2 nodes: One for the question say A, one for the answer say B and the edge connecting them can have your table c data or metadata. Each answer node can have multiple incoming edges from several question nodes and there can be multiple answers to a single question. You dont require any schema, the databases I have mentioned are NoSQL databases. Search would be extremely fast as even they can be integrated with Lucene Search Engine for full text searches and I believe since you have Q&A so you would require Full Text Searches.

Here is an example: enter image description here

like image 83
Yavar Avatar answered Dec 31 '25 14:12

Yavar