Is it possible to store 100,000+ columns in a database table?

I want to store Genetic variants of patients in a database. Number of patients are around 1000 but for each patient there are more than 100,000 Genetic variants. Can anyone advice me how to design this table. Is it possible to do this in MongoDB ? The data will look something like this. Any help will be highly appreciated

enter image description here

>Solution :

If you want to use a relational database. You should create a table for just patients and a separate table that has a foreign key pointing to the user and another column for the genetic variation. Instead of having a column per RS_***, those should be a row. So for example User A will have 100,000 rows in Table B each row being RS_{insert_index}.

Leave a Reply