164
Views
5
Comments
Structure over Entity in the output of a SELECT SQL query
Question

What is the main advantage/s of using Structure instead of Entity in the output of a SELECT SQL query? Will the query retrieve fewer attributes and less data?

2025-10-18 11-13-53
Ramesh subramanian

Hi Kevin Nikko Mendoza,

Below here..

Reusability: Structured components and modules in OutSystems can be reused across multiple applications, reducing development time and effort.


Consistency: A structured approach ensures that all applications within an organization are developed using a consistent approach, resulting in applications that look and function similarly.


Scalability: OutSystems applications that are developed using a structured approach can be easily scaled up or down to meet changing business requirements.


Maintenance: Applications developed using a structured approach are easier to maintain, as changes can be made to a specific module or component without affecting the rest of the application.


Collaboration: A structured approach in OutSystems encourages collaboration among developers, as they can work together to build and test components and modules that can be used across multiple applications.


Documentation: A structured approach in OutSystems also promotes better documentation, which is essential for maintaining applications over time. When components and modules are clearly documented, it is easier to understand how they work and how to modify them if necessary.

Overall, using structure in OutSystems can result in more efficient development processes, better application consistency and scalability, and easier maintenance and collaboration among developers. 

Thanks,

Ramesh


UserImage.jpg
Kevin Nikk

Right. 

Will the query retrieve fewer attributes and less data? 

2023-04-16 15-25-31
Krishnanand Pathak


Hi @Kevin Nikko Mendoza 

It will retrieve only those attributes which you define after select clause.

Attributes after select clause should be same as you defined in output structure.

But it will not affect data(Number of records or rows). That means you will get all records that satisfies the query 

With those attributes that are defined after select clause.


Regards

Krishnanand Pathak 

2022-07-03 17-24-08
Sourabh sharma

Hi @Kevin Nikko Mendoza 

A Structure is a compound data type used to encapsulate groups of related attributes.ReadMore

Structure is query to database to fetch custom attributes instead of calling all attributes which cause the application performance

While developing your application, you may find it interesting to have a variable holding a collection of variables with different data types grouped together and use it in the logic. For example, to assign the values returned by an action where you don't have to create one output for each value. ReadMore

Note: When you use structure in SQL you must to take care about the sequence of the attributes to the main entity

Must Read This!!

So lets conclude after reading above links ..

Instead of fetching all attributes call those only which are required which can increase the performance of you application!!

Here is the Example 

With Structure :

The same done without structure, 

If you want to fetch fewer need to make structure !! 

Hope you got !!!

Kind regards

Sourabh Sharma



Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.