Working With Data in Unqork
Estimated Reading Time: 3 minutes
Data storage refers to where you store data that is created or used by your application. In Unqork, there are several options for storing data. To achieve the best possible application performance, it's important to consider how and where you should store your data.
What You'll Learn
There are two options for storing data in Unqork. One option is to use the Unqork functionality to store your data. The other option is to use an external storage system.
Internal Unqork Storage
There are various ways to store your data in Unqork. For example, you can store data in submissions or Unqork's Data Collections. Below are examples of how to store your data internally.
Data Tables in Modules
Data Saved in a Component
External Data Storage
Unqork also lets you store data in any SOR (system of record) that can be accessed with an API. Doing so lets you access a third-party data source or maintain an external system to store your data.
It's important to identify what you need and which data storage methods to choose. When deciding how to store application data, consider the following questions:
How often will you need to update the data?
How often will you need to retrieve and read the data?
What SOR do you plan to use?
How quickly do you need to access the data?
What data size will you be storing?
How will you implement RBAC (role-based access control)?
Let's say that you consider storing data that only needs to be occasionally updated. The best option might be to hard-code the data in a Dropdown component. That way, you can avoid executing a query each time the page loads. Hard-coding the data into the component also improves performance by limiting the number of network calls.
Now, consider you want to store the same data externally. In this case, it might make sense to set up a process to periodically retrieve that data from an external location and send it to Unqork. For example, when reading a file from an SFTP server. By regularly reading the file and saving it in Unqork, you avoid the performance issues associated with reading the file every time you need it.
Saving data in Unqork lets Creators set up a schema and shape the data most effectively. It also allows for data indexing. However, if a third party keeps your data, changes it frequently and irregularly, it might make sense to store and maintain your data externally. But, if it’s published to a location on a specified cadence, you could save it in Unqork as a submission.
It’s always important to consider your SOR. If Unqork is your new SOR, consider creating a data migration plan to move legacy data into Unqork.