0

How to store the following data into a database to ignore the null values too pic

here is my database in postgres sql enter image description here, where the UUID is project_id and array2 is indicators and array4 is the value column in the database.

ismail khan
  • 287
  • 1
  • 3
  • 16
  • please show us your trying – OMR Mar 15 '21 at 18:22
  • i am going to save the data into a database where each indicator has its own value, but i dont know how to make a good logic for storing data into the database, please free to ask if u need view – ismail khan Mar 16 '21 at 04:13

1 Answers1

0

If you want to insert an array into the column, change the column type, indicator can be changed to char var [] which accepts an array type, there's also integer[].

If you want to insert each row, and there will be 4/8 row, change the input.

Or you can create 2 new tables with a foreign key that corresponds to project_id, that accept each array as a different row.

Zamzawi
  • 1
  • 1