Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

What Should be database structure to create excel sheet like view? mean should tables store in json format or create tables for cells,rows and columns

Hi Everyone,

i want to create a board and all board will contain groups and each groups have tables(Rows and Columns), so should i save tables(Rows and Columns) as a json format or create separate table for rows,columns and cells etc?

i watn to create a system like monday.com

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Depends on what kind of database you are using, if its a document database then JSON is the natural way, in a SQL database, the better way would be to have a table representing the rows, and having a separate table representing column mapping, this will give you the flexibility to add columns at will.

For example:-

Row Table

| id | details       |
|----|---------------|
| 1  | row_1_details |
| 2  | row_2_details |

Column Table

| id | column_name | column_value | row_id |
|----|-------------|--------------|--------|
| 1  | col_1       | skjdjks      | 1      |
| 2  | col_2       | jslkds       | 1      |
| 3  | col_1       | dhkshd       | 2      |
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading