📘
Notes
  • Welcome
  • Domain Name System (DNS)
  • Developer Road Maps
  • App Security
  • Terminal Shortcuts/Commands
  • Technical Vocab
  • Kubernetes
  • Database Migrations
  • How to Write UML Diagrams
  • Linux
  • Testing in Software
  • Front-end / UI / UX
    • Redux
    • Notes on Design
    • HTML
    • CSS
    • React
  • Backend / Infrastructure
    • Terraform
    • Content Delivery Network (CDN)
    • Elasticsearch
    • npm
      • how to fix npm vulnerabilities
    • AWS Serverless Computing
    • Databases
      • Object Relational Mapper (ORM)
      • Database Migration
      • Relational Database Management System
    • TCP/IP
    • Web Servers
      • Go
      • HyperText Transfer Protocol (HTTP)
        • Request / Response
          • REST API
          • GraphQL / Apollo
        • Postman
    • Docker / Containers
    • Caches
      • Redis
    • MVC (Model-View-Controller)
  • General Career Advice
    • Software Engineering @Google
  • Technical Books
    • Designing Data-Intensive Systems
    • 30 Days of React
    • The Art of Game Design: A Book of Lenses
  • Data Structures / Algorithms
    • Sorting
    • Tries
  • Courses
    • Full Stack Open
    • iOS App Dev
Powered by GitBook
On this page
  • Goals
  • Terms:
  • Further Resources
  1. Backend / Infrastructure

Databases

PreviousAWS Serverless ComputingNextObject Relational Mapper (ORM)

Last updated 3 years ago

  • MySQL

  • PostgreSQL

  • MariaDB

  • Oracle DB

  • SQL Server (Microsoft)

  • SQLite

  • Amazon RDS

SQL (Structured Query Language) is a programming language used to communicate with data stored in a relational database management system. SQL syntax is similar to the English language, which makes it relatively easy to write, read, and interpret.

  • Amazon DynamoDB

  • MongoDB

  • Couchbase

  • Google Cloud Firestore

  • Redis

The term document in NoSQL databases refers to a set of key-value pairs, typically represented in JSON, XML, or a binary form of JSON.

Goals

  • to design a performant and future-proof database

  • eliminate redundant data

  • maintain accuracy and integrity

  • provide quick access

steps:

  1. identify the purpose of the database

    • how do clients want to access the data?

    • gather structure of data included, and list types

    • break down information into smallest useful pieces

    • avoid including the same data point in more than one table

  2. organize data into tables

    • each row in the table is a record

    • assign the appropriate data type to each column

      • char - specific length of text

      • varchar - texxt of variable lengths

      • text - large amount of texts

      • int - positive or negative whole number

      • float, double - stores floating point numbers

      • blob - binary data

      • auto-number (automatically generates unique number in each row, can be used as a key)

  3. determine keys + relationships

    • primary key - a unique id for an entry, one of a kind, used for identifying and querying a specific record

    • primary keys cannot be null nor empty

    • composite key - primary key that is multiple fields

  4. normalize databases

Types of Database Relationships

Terms:

data definition language

database management system

database performance level

storage space

cardinality - quantify of elements that interact between two related tables

one to one relationship - there's only one instance of A for every instance of B

Further Resources

https://www.lucidchart.com/pages/database-diagram/database-design
one to one relationship
one to many relationship