Source data

Updated: 11/16/2019 by Computer Hope

In computer programming, source data or data source is the primary location from where data comes. The data source is a database, a dataset, a spreadsheet or even hard-coded data. When data is displayed, it is retrieved from its data source. The software processes this data internally, performing additional calculations if necessary, formats it, and updates the application window.

Computer applications can have multiple data sources defined, depending on its function. Applications like Oracle, SalesForce.com, and SAP all use databases as data sources. A common type of database is an SQL database, but some applications can use other types of databases, like Microsoft Access.

General database types

For maximum data integrity, a SQL database, such as MySQL, PostgreSQL, or MariaDB, is usually preferred. At the sacrifice of some performance, it provides maximum data and transaction integrity.

For speed and scalability, a NoSQL data store, such as Redis or MongoDB, may perform better. These databases may not perform well with many concurrent writes, but they can read data at high speed.

A lightweight version of MySQL, SQLite, is easy to set up and use, and provides excellent performance for smaller web applications.

Combining database types in one application

Multiple database systems may be deployed to work in conjunction with one another, for different purposes. For example, an online marketplace may store confidential user information and purchase history in a SQL database. The SQL database can receive many concurrent queries, handling millions of concurrent requests (all happening within a short, overlapping time frame). SQL database systems generally feature robust data integrity, guaranteeing that every transaction's outcome agrees with concurrent changes to other data.

The same application might use a different database for less critical information, such as the comments in a user feedback section. A Redis instance could be set up to store and quickly retrieve this data as JSON objects, increasing web performance.

Using a spreadsheet as a database

For lightweight applications, it's possible to use a spreadsheet as a database. For example, you can create a Google Sheets document on a Google Account connected to GCP, and deploy it is a web application. The spreadsheets in this page can receive read and write requests by HTTPS, or make calls to the Google Sheets API. Interactions with a Google Sheet incur a compute resource usage, and can be tracked in the GCP dashboard.

For mission-critical applications, however, a database is always preferred.

Data, Programming terms, Source