Local Storage Flashcards

1
Q

What is the primary purpose of Local Storage Entities in OutSystems mobile apps?
A) To store data temporarily for quick retrieval.
B) To persist data on the device for offline access.
C) To manage user sessions and authentication.
D) To handle complex business logic.

A

B) To persist data on the device for offline access.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Where are Local Storage Entities created in Service Studio?
A) In the “Entities” section of the Data Tab.
B) In the “Local Storage” section of the Data Tab.
C) In the “Logic” section of the Application.
D) In the “User Interface” section of the Application.

A

B) In the “Local Storage” section of the Data Tab.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a common naming convention for Local Storage Entities?
A) “local_” followed by the entity concept.
B) “db_” followed by the entity concept.
C) “temp_” followed by the entity concept.
D) “cache_” followed by the entity concept.

A

A) “local_” followed by the entity concept.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the default CRUD actions available in a Local Storage Entity?
A) Create, Read.
B) Update, Delete.
C) Create, Read, Update, Delete.
D) Create, Retrieve, Update, Delete.

A

C) Create, Read, Update, Delete.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the recommended approach for defining the ID attribute in a Local Storage Entity?
A) Use a simple text string.
B) Use a long integer with auto-increment.
C) Use the “Customer Identifier” data type if synchronizing with a database.
D) Use a unique identifier generated by the platform.

A

C) Use the “Customer Identifier” data type if synchronizing with a database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How can you create a Local Storage Entity from an existing Database Entity?
A) Use the “Copy and Paste” functionality to duplicate the entity.
B) Use the “Create Local Storage Entity from Database Entity” option.
C) Use the “Convert to Local Storage Entity” option.
D) Manually create a new entity and copy the attributes.

A

B) Use the “Create Local Storage Entity from Database Entity” option.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which of the following is a good practice when designing a Local Storage Entity?
A) Include as many attributes as possible from the corresponding database entity.
B) Only include the attributes strictly necessary for offline functionality.
C) Use complex data types for greater flexibility.
D) Use the “Static” entity type for more efficient data storage.

A

B) Only include the attributes strictly necessary for offline functionality.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the primary purpose of the “CreateOrUpdateAll” action?
A) To delete all records in the entity.
B) To create a new record in the entity.
C) To update an existing record in the entity.
D) To efficiently create or update multiple records in the entity.

A

D) To efficiently create or update multiple records in the entity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which two new Entity Actions are specific to Local Storage Entities?
A) “GetAll” and “DeleteAll”.
B) “CreateOrUpdate” and “DeleteAll”.
C) “CreateOrUpdateAll” and “DeleteAll”.
D) “SyncFromDatabase” and “SyncToDatabase”.

A

C) “CreateOrUpdateAll” and “DeleteAll”.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How are Local Storage Entity actions executed?
A) They are executed on the server-side.
B) They are executed on the client-side in a client action flow.
C) They are executed automatically when the application starts.
D) They are executed when the user interacts with a specific screen.

A

B) They are executed on the client-side in a client action flow.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the primary purpose of Aggregates in OutSystems?
A) To store data in local storage.
B) To handle user authentication and authorization.
C) To query data from entities and display it on screens or in actions.
D) To design user interfaces.

A

C) To query data from entities and display it on screens or in actions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which type of entity can be used as a source in a Local Storage Aggregate?
A) Database Entities only.
B) Local Storage Entities only.
C) Both Database Entities and Local Storage Entities.
D) Static Entities.

A

B) Local Storage Entities only.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the main difference between Database Aggregates and Local Storage Aggregates?
A) Local Storage Aggregates are faster.
B) Local Storage Aggregates support data previews.
C) Local Storage Aggregates are only available on the client-side.
D) Local Storage Aggregates cannot be used to filter or sort data.

A

C) Local Storage Aggregates are only available on the client-side.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the purpose of the “Filters” section in an Aggregate?
A) To define the order in which data is displayed.
B) To specify the source entities from which the data is retrieved.
C) To create joins between entities.
D) To filter the data based on specific conditions.

A

D) To filter the data based on specific conditions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the purpose of the “Sources” section in an Aggregate?
A) To define the attributes to be displayed in the output.
B) To specify the source entities from which the data is retrieved.
C) To create joins between entities.
D) To filter the data based on specific conditions.

A

B) To specify the source entities from which the data is retrieved.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the primary purpose of calculated attributes in an Aggregate?
A) To display data from a different entity.
B) To filter the data based on specific conditions.
C) To calculate a new value based on existing attributes.
D) To define the order in which data is displayed.

A

C) To calculate a new value based on existing attributes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the purpose of the “Sorting” section in an Aggregate?
A) To define the order in which data is displayed.
B) To specify the source entities from which the data is retrieved.
C) To create joins between entities.
D) To filter the data based on specific conditions.

A

A) To define the order in which data is displayed.

12
Q

How can you aggregate records in an Aggregate?
A) Use the “GroupBy” function.
B) Use aggregation functions like “Sum”, “Average”, “Count”.
C) Define multiple “OrderBy” clauses.
D) Create calculated attributes.

A

A) Use the “GroupBy” function.
B) Use aggregation functions like “Sum”, “Average”, “Count”.

13
Q

What is the effect of hiding columns in an Aggregate?
A) It hides the columns from the data source.
B) It prevents the columns from being displayed in the output.
C) It affects the logic of the aggregate.
D) It changes the data type of the column.

A

B) It prevents the columns from being displayed in the output.

14
Q

When are Local Storage Aggregates triggered on a Screen?
A) When the user interacts with a specific widget.
B) When the Screen is initialized.
C) When a client action is executed.
D) When a data action is executed.

A

B) When the Screen is initialized.

15
Q

How do multiple Local Storage Aggregates on a Screen execute?
A) Sequentially, one after the other.
B) Asynchronously, in parallel.
C) Only one executes at a time.
D) They are not executed until the user interacts with the screen.

A

B) Asynchronously, in parallel.

15
Q

Where can Local Storage Aggregates be used on a Screen?
A) Only in data actions.
B) Only in client actions.
C) In data actions, client actions, and as a Screen-level aggregate.
D) Only in screen-level aggregates.

A

C) In data actions, client actions, and as a Screen-level aggregate.

16
Q

How does the Screen’s lifecycle change when using Local Storage Aggregates?
A) It is faster because data is fetched locally.
B) It is slower because data is fetched locally.
C) It remains the same, with the AfterFetch event handling data updates.
D) The Screen’s lifecycle is not affected.

A

C) It remains the same, with the AfterFetch event handling data updates.

17
Q

What event is triggered when a Local Storage Aggregate finishes fetching data?
A) “OnFetchStart”
B) “OnFetchComplete”
C) “AfterFetch”
D) “DataReady”

A

C) “AfterFetch”

18
Q

What is the purpose of the “OnDemandFetch” setting for Local Storage Aggregates?
A) It ensures that data is always fetched when the Screen initializes.
B) It allows you to trigger the aggregate manually only when needed.
C) It prevents the aggregate from fetching data when the screen is inactive.
D) It automatically clears the data from the local storage after a certain amount of time.

A

B) It allows you to trigger the aggregate manually only when needed.

19
Q

What is the recommended practice for storing sensitive data in Local Storage?
A) Store all sensitive data locally for easier access.
B) Only store the minimal subset of sensitive data needed for offline functionality.
C) Use encryption to protect sensitive data stored locally.
D) Both B and C.

A

D) Both B and C.

19
Q

Can you use both Local Storage Aggregates and Database Aggregates on the same Screen?
A) Yes, they can be used together.
B) No, only one type of aggregate can be used on a Screen.
C) You can use them together, but they will interfere with each other.
D) You can use them together, but they will not be triggered simultaneously.

A

A) Yes, they can be used together.

20
Q

What is the difference between “Fetch at Start” and “Fetch Only on Demand” for Local Storage Aggregates?
A) “Fetch at Start” triggers the aggregate immediately, while “Fetch Only on Demand” triggers it when the user interacts with a specific widget.
B) “Fetch at Start” triggers the aggregate only when a data action is executed, while “Fetch Only on Demand” triggers it when the user interacts with a specific widget.
C) “Fetch at Start” triggers the aggregate when the Screen initializes, while “Fetch Only on Demand” requires an explicit trigger.
D) “Fetch at Start” triggers the aggregate when a client action is executed, while “Fetch Only on Demand” triggers it when the user interacts with a specific widget.

A

C) “Fetch at Start” triggers the aggregate when the Screen initializes, while “Fetch Only on Demand” requires an explicit trigger.

21
Q

What is the benefit of designing a lightweight Local Storage Entity?
A) It reduces the risk of security vulnerabilities.
B) It speeds up data retrieval.
C) It minimizes storage space usage.
D) Both B and C.

A

D) Both B and C.

22
Q

How can you prevent fetching unnecessary data from a database to local storage?
A) Use the “CreateOrUpdateAll” action to ensure only necessary data is stored.
B) Use the “DeleteAll” action to remove any unnecessary data from the local storage.
C) Use filters and aggregations to only retrieve the necessary data from the database.
D) Use the “Fetch Only on Demand” setting for Local Storage Aggregates.

A

C) Use filters and aggregations to only retrieve the necessary data from the database.

22
Q

Why is referential integrity not automatically guaranteed in Local Storage?
A) Local storage is a relational database.
B) Local storage is not a relational database.
C) Local storage is not optimized for performance.
D) Local storage is not designed for data synchronization.

A

B) Local storage is not a relational database.

23
Q

What is the default delete rule for attributes referencing other entities in Local Storage?
A) “Cascade”
B) “Restrict”
C) “Set Null”
D) “Ignore”

A

D) “Ignore”

23
Q

What is the relationship between Local Storage and database Entities?
A) Local Storage Entities are a replacement for database entities.
B) Local Storage Entities are a subset of database entities.
C) Local Storage Entities are separate from database entities, but can be used together for offline functionality.
D) Local Storage Entities and database entities cannot be used together.

A

C) Local Storage Entities are separate from database entities, but can be used together for offline functionality.

24
Q

How can you overcome the lack of data preview for Local Storage Entities in Service Studio?
A) Use the “Debug” mode to inspect the data directly.
B) Use external tools to examine the local storage data.
C) Create a custom data preview feature in your application.
D) Both B and C.

A

D) Both B and C.

25
Q

What is the recommended approach for creating initial data in Local Storage?
A) Use the “Bootstrap” functionality from Excel.
B) Use forms in the application to manually create data.
C) Sync data from the server database to the local storage.
D) Both B and C.

A

D) Both B and C.

26
Q

How can you ensure that your Local Storage data is synchronized with the database?
A) Use the “CreateOrUpdateAll” action to update the local storage with the latest data.
B) Use the “DeleteAll” action to clear the local storage and refetch data from the database.
C) Use a dedicated synchronization mechanism that handles data transfer and updates between the server and the device.
D) Use the “Fetch Only on Demand” setting for Local Storage Aggregates.

A

C) Use a dedicated synchronization mechanism that handles data transfer and updates between the server and the device.

27
Q

Why is it essential to optimize local storage for performance?
A) It improves the user experience, especially for offline scenarios.
B) It reduces the strain on the server resources.
C) It saves battery life and data usage.
D) All of the above.

A

D) All of the above.

28
Q

What is a common approach for defining relationships between Local Storage Entities?
A) Use foreign key constraints.
B) Use a shared ID attribute across entities.
C) Use the “CreateOrUpdateAll” action to update related records.
D) Use a dedicated synchronization mechanism.

A

B) Use a shared ID attribute across entities.
C) Use the “CreateOrUpdateAll” action to update related records.

29
Q

What is a potential downside of relying heavily on Local Storage for data management?
A) It can lead to data inconsistencies if not properly managed.
B) It can slow down the application performance.
C) It increases the risk of data loss.
D) All of the above.

A

D) All of the above.

29
Q

How can you ensure that your Local Storage data is reliable and accurate?
A) Use the “Fetch Only on Demand” setting for Local Storage Aggregates.
B) Use a dedicated synchronization mechanism to keep data in sync with the database.
C) Implement regular data backups to protect against data loss.
D) Both B and C.

A

D) Both B and C.

30
Q

Regarding Local Storage entities, which of the following options is true?

Local Storage Entities can only be used while offline.

Data can be bootstrapped from Excel.

Local Storage Entities are persisted in the device’s storage.

The Delete Rule property of referenced attributes can be set to Protect or Delete.

A

Local Storage Entities are persisted in the device’s storage.
Each device will have its own version of the local storage.

31
Q
A