Database concepts

Relational databases

Have been a prevalent technology for decades. They’re mature, proven, and widely implemented. Competing database products, tooling, and expertise abound. Relational databases provide a store of related data tables. These tables have a fixed schema, use SQL (Structured Query Language) to manage data, and support ACID guarantees.

  • Data is stored in tables containing rows and columns
  • Uses multiple tables with relationships built between them

row represents an instance of a data entity

key represents a relationship between individual data entities

column represents a data attribute on a table

No-SQL databases refer to high-performance, non-relational data stores. They excel in their ease-of-use, scalability, resilience, and availability characteristics. Instead of joining tables of normalized data, NoSQL stores unstructured or semi-structured data, often in key-value pairs or JSON documents. No-SQL databases typically don’t provide ACID guarantees beyond the scope of a single database partition. High volume services that require sub second response time favor NoSQL datastores.

Non-relational databases do not use tabular schema of rows and columns and instead use a optimized storage model particualr to the type of data

  • For example
    • JSON
    • key/value pairs
    • GRAPH

NoSQL refers to a data store that does not use SQL for queries but instead uses other languages. In addition a NonSQL database is seen as being non-relational.

OLTP

Online Transaction Processing

  • Used to record day-to-day business activities and interactions as they occur
    • For example, orders taken, services performed, and payments made
  • Data is highly normalized with the schema enforced on write
  • Usually use a relational data store
  • Heavy write requirements as opposed to read
  • Changes made are rolled back automatically if the transaction is not completed
    • Known as atomicity
    • Ensures no transaction is left in a partially completed state
    • The shopping basket on an online shop

References

https://docs.microsoft.com/en-us/dotnet/architecture/cloud-native/relational-vs-nosql-data

https://docs.microsoft.com/en-us/azure/architecture/data-guide/big-data/non-relational-data

https://docs.microsoft.com/en-us/learn/modules/explore-core-data-concepts/2-data-formats

Last modified July 21, 2024: update (e2ae86c)