Regarding Column in a table.


Actually, i m working on Reactive web App. In that i have created one table which gives list of items now it has many columns including one Column of Binary Data type. In, that binary data column, i would like to upload image.Now, when i m trying to insert new column in a table with type Binary data,it shows an error that the table can have only one binary data column.  So, could anyone plz help me that how should i get overcome from this thing.

Rank: #69

Hello Rohit.

The problem is that Binary data is heavy. Ideally, you have an Entity you the general data and then an extended table, with the same id, that saves the binary for that entry.

If you have two mandatory binaries, you create two entities, you for each type.

Take a look on the Database course to have an idea



A good practice in outsystems is to place the binaries in a separate table and not in the table to which the binary relates, to make accessing the information in the main table faster ... imagine that you have a table that has the data of a Employee, and you have the picture of the Employee, instead of saving the binary in that same table, you create a table with a ratio of 1 to 1 or 1 to N, using this example, it would depend on whether the employee could have more than one picture or not.

Example (1-1):

if you want to add several files, and if they are all of the same concept, create a table 1 - N (for the example given above, it would mean that 1 Product could have 1 or more images), if the concept is different, imagine that a concept it was Product Image and another Concept would be the Product Logo, so you create another table for that second concept. And so when you want to consult the data in the table, you can and quickly, without floors with the torque in the view state unnecessarily.


I fully agree with Miguel

Best Regards