Prisma's Data Guide

Learn how databases work, how to choose the right one, and how to use databases with your applications to their full potential.

Introduction to databases

Learn the basics of what databases are, why they are so important for most software, and how they work. Start from the fundamentals to give yourself a solid foundation.

What are databases?Comparing database types: how database types evolved to meet different needsIntroduction to database schemas

Data Modeling

A crash course in (relational, although not ignoring others) designing data models. Parts are published as they're written, and concentrating first on situating databases and data modeling problems in an organization and systems design context, as well as covering some of the less-prominent areas of database functionality. Published in partnership with Dian Fay.

Intro (Don't Panic)Know Your Problem SpaceTables, Tuples, TypesCorrectness and ConstraintsMaking ConnectionsFunctional UnitsIn Vivo: Information Ecosystems

Database types

Each style of database has its own strengths and weaknesses. Learn more about common database types to help choose which one is best for you.

Relational databases

Relational databases are great at handling highly structured data and making it accessible with flexible querying. Discover why the relational paradigm has stood the test of time.

Comparing SQL, query builders, and ORMsWhat are database migrations?Strategies for deploying database migrationsUsing the expand and contract pattern for schema changes

PostgreSQL

PostgreSQL is a feature rich object-relational database that offers incredible power and flexibility while maintaining standards compliance. Learn how to configure and use PostgreSQL to take advantage of its best features.

The benefits of PostgreSQLGetting to know PostgreSQL5 ways to host PostgreSQL databasesSetting up a local PostgreSQL databaseConnecting to PostgreSQL databasesAuthentication and authorization  •  An introduction to authorization and authentication in PostgreSQL  •  Managing roles and role attributes in PostgreSQL  •  Configuring PostgreSQL user authentication  •  Managing privileges in PostgreSQL with grant and revokeHow to create and delete databases and tables in PostgreSQLAn introduction to PostgreSQL data typesAn introduction to PostgreSQL column and table constraintsInserting and modifying data  •  How to insert and delete data in PostgreSQL  •  How to update existing data in PostgreSQL  •  How to use `INSERT ON CONFLICT` to upsert data in PostgreSQL  •  Importing and exporting data in PostgreSQL  •  Understanding and using transactions in PostgreSQLReading and querying data  •  How to perform basic queries with `SELECT` in PostgreSQL  •  How to filter query results in PostgreSQL  •  Using joins to combine data from different tables in PostgreSQLShort guides  •  How to use single and double quotes in PostgreSQL

MySQL

MySQL is one of the most popular relational databases in the world, offering fast performance and production-ready power. Learn how to take advantage of MySQL's features for your project or website.

5 ways to host MySQL databasesSetting up a local MySQL databaseConnecting to MySQL databasesAuthentication and authorization  •  An introduction to authorization and authentication in MySQL  •  How to manage users and authentication in MySQL  •  How to use `GRANT` and `REVOKE` to manage privileges in MySQL  •  How to manage privileges with roles in MySQLHow to create and delete databases and tables in MySQLAn introduction to MySQL data typesAn introduction to MySQL column and table constraintsInserting and modifying data  •  How to insert and delete data in MySQL  •  How to update existing data in MySQL  •  How to use `ON DUPLICATE KEY UPDATE` to upsert data in MySQL  •  Importing and exporting data in MySQL  •  Understanding and using transactions in MySQLReading and querying data  •  How to perform basic queries with `SELECT` in MySQL  •  How to filter query results in MySQL  •  Using joins to combine data from different tables in MySQL

SQLite

SQLite is a collection of a library, file format, and command line utility that provides self-contained relational database capabilities in local environments. Learn how to care for your application's data using SQLite's versatile, reliable data management capabilities.

Setting up a local SQLite databaseImporting and exporting data in SQLite

Microsoft SQL Server

Microsoft SQL Server is a powerful and mature relational database system that integrates well with the Microsoft ecosystem and other environments. Learn how to take advantage of the benefits offered by Microsoft SQL Server to power your next application.

Setting up a local SQL Server database

MongoDB

MongoDB is a popular document database that is often praised for its practicality and its ability to allow for rapid prototyping and development. Learn how to use MongoDB to its fullest to take advantage of the performance and features that developers have grown to rely on.

Setting up a local MongoDB database

Database tools

Tools dedicated to improving your interactions with databases.

Top 11 Node.js ORMs, Query Builders & Database Libraries in 2021Top 8 TypeScript ORMs, Query Builders, & Database Libraries: Evaluating Type Safety

Managing databases

Strategies and techniques for maintaining and managing databases in your environments.

Troubleshooting Database Outages and Connection IssuesHow to Spot Bottlenecks in PerformanceSyncing Development Databases Between Team Members