Question: I am building a database for microarray data. Each patient sample has over 1,000,000 features and I would like to store the patient samples as rows in an SQL table with each feature as a column. 

```
                 HuEX Microarray Data
+----+----------+----------+-----+------------------+
| ID | Feature1 | Feature2 | ... | Feature1,000,000 |
+----+----------+----------+-----+------------------+
| 1  |   2.3543 |  10.5454 | ... |          5.34333 |
| 2  |  13.4312 |   1.3432 | ... |         40.23422 |
+----+----------+----------+-----+------------------+

```

I know most relational database systems have limits on the number of columns in a table.

```
+------------+-----------------+
|       DBMS | Max Table Col # | 
+------------+-----------------+
| SQL Server |  1,024 - 30,000 |
|      MySQL |    65,535 bytes |
| PostgreSQL |     250 - 1,600 |
|     Oracle |           1,000 | 
+------------+-----------------+

```

Obviously these limitations are too low for my task. Is there anyway to increase the number of columns an SQL database table can have or is there another DBMS that can handle such high number of table columns?

**Update**

Note all the columns will have values for all the rows.

Answer: 
Don't.

Event if you can make it work, it will be very slow and unwieldly.

Instead, you should make a separate table with columns for `PatientID`, `Feature`, and `Value`.  

This table would have one row for each cell in your proposed table.

It also makes it possible to add additional information about each patient-feature pair.
This is actually a use case for an [Entity-Attribute-Value Model](http://en.wikipedia.org/wiki/Entity-attribute-value_model) (EAV), and may actually be better suited to *non* RDBMS/SQL solutions in some intense environments. (Relational database are workhorses though ... might as well use one until it's provably not sufficient ;-)

From the Wikipedia article:

> 
> 
> > 
> > Entity-attribute-value model (EAV) is a data model to describe entities where the number of attributes (properties, parameters) that can be used to describe them is potentially vast, but the number that will actually apply to a given entity is relatively modest. In mathematics, this model is known as a sparse matrix.
> > 
> > 
> > 
> 
> 
> 

Happy coding.