I am looking to develop a piece of software which will probably store hundred of thousands or even millions of datasets with 3 to 5 datasets to look up per ID.Is there any way to build something like this efficient, fast and scalable in regards of lookup time using PHP and MySQL?I thought about trees for easier lookup, but Im not sure this will really work, as my IDs wont be numeric but most probably strings which have no relation at all.Think of the datasets as some kind of thesaurus where one input might have several other datasets linked.E9NQin0usg < == > zHVauTqpzF                   Th0a647ALJ                   pEwIW0MrNX                   vEfdqNMqkW                   8t5LfEm1EaNormally I would build something like this with PHP/MySQL:table_inID | value1  | E9NQin0usgtable_outID | type | value1  | alt1 | zHVauTqpzF2  | alt2 | Th0a647ALJ3  | alt4 | pEwIW0MrNX4  | alt5 | vEfdqNMqkWtable_in_outID_IN | ID_OUT1     | 11     | 21     | 31     | 4And then query the _in_out table for matching pairs and do more lookup in the _out table to get information about the type of the alternative.I think this might be inefficient as my _in_out table will grow quite a lot, as each new dataset on the _in table will create up to 5 datasets in the _out and obviously the _in_out table. So I wonder if there is a way to build this faster and more efficient.
Efficient structure for storing/handling lots of datasets
php;mysql