{
  "schemaVersion": 1,
  "name": "Prisma's Data Guide",
  "url": "https://www.prisma.io/dataguide",
  "description": "Learn how databases work, how to choose the right one, and how to use databases with your applications to their full potential.",
  "sourceRevision": "b8cd4bed8534b92cc247adfcce5032e5cd69c6ca",
  "sourceRevisionSource": "git",
  "dirty": false,
  "contentRevision": "536a7286aafed8d596b792e7eaea0bc86bbb679c1b30f3cee2edd6808713db85",
  "articles": [
    {
      "path": "/",
      "title": "Prisma's Data Guide - Articles to make databases more approachable",
      "description": "Learn how databases work, how to choose the right one, and how to use databases with your applications to their full potential.",
      "type": "CollectionPage",
      "authors": [],
      "url": "https://www.prisma.io/dataguide",
      "markdownUrl": "https://www.prisma.io/dataguide/index.md",
      "faqs": []
    },
    {
      "path": "/intro/what-are-databases",
      "title": "What are databases?",
      "description": "Learn the fundamentals of databases to gain better insight into what Prisma abstracts and how to think of the database layer generally.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/intro/what-are-databases",
      "markdownUrl": "https://www.prisma.io/dataguide/intro/what-are-databases.md",
      "faqs": [
        {
          "question": "What are persistent data structures?",
          "answerMarkdown": "Databases store data either on disk or in-memory. On disk storage is generally said to be _persistent_, meaning that the data is reliably saved for later, even if the database application or the computer itself restarts."
        },
        {
          "question": "What does a database administrator do?",
          "answerMarkdown": "[Database administrators](https://www.prisma.io/dataguide/intro/what-are-databases#dbas-database-administrators), or DBAs, are individuals who are responsible for keeping data systems running smoothly. They are responsible for planning new systems, installing and configuring software, setting up database systems for other parties, and managing performance."
        },
        {
          "question": "What is a database abstraction layer?",
          "answerMarkdown": "A [database abstraction layer](https://www.prisma.io/dataguide/intro/database-glossary#database-abstraction-layer) is an application programming interface which unifies the communication between a computer application and a database."
        },
        {
          "question": "What is database management?",
          "answerMarkdown": "Database management refers to the actions taken to work with and control data to meet necessary conditions throughout the data lifecycle.\n\nSome database management tasks include performance monitoring and tuning, storage and capacity planning, backup and recovery data, data archiving, data partitioning, replication, and more."
        },
        {
          "question": "What is a database management system?",
          "answerMarkdown": "[Database management systems (DBMS)](https://www.prisma.io/dataguide/intro/database-glossary#database-management-system) are software systems used to store, retrieve, and run queries on data. They serve as an interface between end-users and a database to perform [CRUD](https://www.prisma.io/dataguide/intro/what-are-databases#interacting-with-databases-to-manage-your-data) operations."
        }
      ]
    },
    {
      "path": "/intro/comparing-database-types",
      "title": "Comparing database types: how database types evolved to meet different needs",
      "description": "Many types of databases exist, each with their own benefits. In this guide, we compare the different types of databases and what each of them offer.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/intro/comparing-database-types",
      "markdownUrl": "https://www.prisma.io/dataguide/intro/comparing-database-types.md",
      "faqs": []
    },
    {
      "path": "/intro/intro-to-schemas",
      "title": "Introduction to database schemas",
      "description": "Schemas are the way that you configure your database to represent your data within the system.  Here we define what they are with a few examples.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/intro/intro-to-schemas",
      "markdownUrl": "https://www.prisma.io/dataguide/intro/intro-to-schemas.md",
      "faqs": []
    },
    {
      "path": "/intro/database-glossary",
      "title": "Glossary of common database terminology",
      "description": "Database terminology can be difficult to understand.  This glossary was designed to help you learn important terminology by providing definitions and context in one place.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/intro/database-glossary",
      "markdownUrl": "https://www.prisma.io/dataguide/intro/database-glossary.md",
      "lastUpdated": "2026-10-01",
      "faqs": []
    },
    {
      "path": "/intro",
      "title": "Introduction to databases",
      "description": "Introduction to databases",
      "type": "CollectionPage",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/intro",
      "markdownUrl": "https://www.prisma.io/dataguide/intro.md",
      "faqs": []
    },
    {
      "path": "/datamodeling/intro-dont-panic",
      "title": "Intro (don't panic)",
      "description": "Intro (Don't Panic)",
      "type": "TechArticle",
      "authors": [
        "Dian Fay"
      ],
      "url": "https://www.prisma.io/dataguide/datamodeling/intro-dont-panic",
      "markdownUrl": "https://www.prisma.io/dataguide/datamodeling/intro-dont-panic.md",
      "faqs": []
    },
    {
      "path": "/datamodeling/know-your-problem-space",
      "title": "Know your problem space",
      "description": "Data models rarely represent singular categories of isolated facts; more often they represent systems, and the relations and interactions of even a few components are as important to an accurate and useful representation of the system as are the components themselves.",
      "type": "TechArticle",
      "authors": [
        "Dian Fay"
      ],
      "url": "https://www.prisma.io/dataguide/datamodeling/know-your-problem-space",
      "markdownUrl": "https://www.prisma.io/dataguide/datamodeling/know-your-problem-space.md",
      "faqs": []
    },
    {
      "path": "/datamodeling/tables-tuples-types",
      "title": "Tables, tuples, types",
      "description": "Calling tables the \"basic building block\" of relational databases is a little reductive. While it's hard to miss the mark by much in drawing up a list of each datum you're interested in and declaring this an integer, that a date, and so forth, effective relational database design depends first and foremost on well-thought-out and well-formulated table designs. ",
      "type": "TechArticle",
      "authors": [
        "Dian Fay"
      ],
      "url": "https://www.prisma.io/dataguide/datamodeling/tables-tuples-types",
      "markdownUrl": "https://www.prisma.io/dataguide/datamodeling/tables-tuples-types.md",
      "faqs": []
    },
    {
      "path": "/datamodeling/correctness-constraints",
      "title": "Correctness and constraints",
      "description": "Learn more about storing meaningful, useful, correct data and how correctness can be logically defined and enforced",
      "type": "TechArticle",
      "authors": [
        "Dian Fay"
      ],
      "url": "https://www.prisma.io/dataguide/datamodeling/correctness-constraints",
      "markdownUrl": "https://www.prisma.io/dataguide/datamodeling/correctness-constraints.md",
      "lastUpdated": "2026-10-01",
      "faqs": [
        {
          "question": "What is the definition of a tuple?",
          "answerMarkdown": "A tuple is a finite, ordered list of elements. In the relational model, a tuple is one row of a relation: it holds one value for each of the relation's attributes.\n\nProgramming languages such as Python also use the name for a data structure: a fixed-length sequence of values that can't be modified after it's created."
        },
        {
          "question": "What is a named tuple?",
          "answerMarkdown": "A typical tuple uses numerical indexes to access its members.\n\nA named tuple differs in that its members are assigned names in addition to the numerical index. This can be beneficial in instances where a tuple has a lot of fields and is constructed far from where it is being used."
        },
        {
          "question": "What is a tuple in a database?",
          "answerMarkdown": "In the context of a relational database, a tuple can be thought of as a single record or row of that database.\n\nFor example, in a customer database a row might include a customer’s first name, last name, phone number, email, and shipping address. All of this information together can be thought of as a tuple."
        },
        {
          "question": "What is a foreign key in a database?",
          "answerMarkdown": "A `FOREIGN KEY` is a field or collection of fields in one table that often refers to the `PRIMARY KEY` of another table.\n\nIn PostgreSQL, it can also reference columns covered by a non-deferrable unique constraint or a non-partial unique index; those columns need not be `NOT NULL`."
        },
        {
          "question": "Why do relational databases use primary keys and foreign keys?",
          "answerMarkdown": "Relational databases use primary and foreign keys to establish connections between tables in a database. These keys facilitate access to one table from another within a database.\n\nPrimary keys can also be generally useful for uniquely addressing individual records even without any foreign keys."
        }
      ]
    },
    {
      "path": "/datamodeling/making-connections",
      "title": "Making connections",
      "description": "Learn about using foreign keys to describe relationships which in turn define the structure of the database",
      "type": "TechArticle",
      "authors": [
        "Dian Fay"
      ],
      "url": "https://www.prisma.io/dataguide/datamodeling/making-connections",
      "markdownUrl": "https://www.prisma.io/dataguide/datamodeling/making-connections.md",
      "faqs": []
    },
    {
      "path": "/datamodeling/functional-units",
      "title": "Functional units",
      "description": "Databases are, by definition, very good at processing and manipulating information. Learn more about functional units, workflows, and more.",
      "type": "TechArticle",
      "authors": [
        "Dian Fay"
      ],
      "url": "https://www.prisma.io/dataguide/datamodeling/functional-units",
      "markdownUrl": "https://www.prisma.io/dataguide/datamodeling/functional-units.md",
      "faqs": [
        {
          "question": "What is a stored procedure in a database?",
          "answerMarkdown": "A stored procedure is a prepared piece of SQL code that you can save and reference to be used when needed.\n\nIt is particularly useful for SQL queries that you are writing often because you can just call the stored procedure and execute it rather than re-writing the query.\n\nThe basic syntax can look something like this:\n\n```sql\nCREATE PROCEDURE procedure_name\nAS\ncommon_sql_statement;\n```\n\nYou can then call the procedure using an execute statement:\n\n```sql\nEXEC procedure_name\n```"
        },
        {
          "question": "What are database functions?",
          "answerMarkdown": "Database functions are a set of SQL statements that perform a specific task. They are efficient ways to packages lines of SQL code that you can reference rather than rewriting the actual SQL.\n\nDatabase functions are a good way to promote reusability in your code. [Functions and procedures](https://www.prisma.io/dataguide/datamodeling/functional-units#functions-vs-procedures) both allow for better reusability in code, but they have some differences that are good to know when modelling your database."
        },
        {
          "question": "What is database generated column?",
          "answerMarkdown": "A [generated column](https://www.prisma.io/dataguide/datamodeling/functional-units#defaults-and-generation) is a database column that is computed based on a predefined expression or from other columns.\n\nIt is a way of storing data without actually sending it through the `INSERT` or `UPDATE` clause in SQL."
        },
        {
          "question": "What are the default databases in SQL?",
          "answerMarkdown": "Depending on your choice of database provider, you will notice default databases that come with your instance.\n\nMost RDBMs ship default databases that store required information by the server. These can include metadata tables, other system information, or templates."
        },
        {
          "question": "What is a trigger in a database?",
          "answerMarkdown": "A database trigger is procedural code that is automatically executed in response to certain events or criteria on a table or database."
        }
      ]
    },
    {
      "path": "/datamodeling/in-vivo",
      "title": "In vivo: information ecosystems",
      "description": "Users, applications, scripts, and even other databases feed information into and extract information from databases. Discover how these ecosystems work.",
      "type": "TechArticle",
      "authors": [
        "Dian Fay"
      ],
      "url": "https://www.prisma.io/dataguide/datamodeling/in-vivo",
      "markdownUrl": "https://www.prisma.io/dataguide/datamodeling/in-vivo.md",
      "faqs": []
    },
    {
      "path": "/datamodeling",
      "title": "Data modeling",
      "description": "A crash course in (relational, although not ignoring others) designing data models.",
      "type": "CollectionPage",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/datamodeling",
      "markdownUrl": "https://www.prisma.io/dataguide/datamodeling.md",
      "faqs": []
    },
    {
      "path": "/types/relational-vs-document-databases",
      "title": "Comparing relational and document databases",
      "description": "In this article, we examine the differences between relational databases and document databases.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/types/relational-vs-document-databases",
      "markdownUrl": "https://www.prisma.io/dataguide/types/relational-vs-document-databases.md",
      "faqs": []
    },
    {
      "path": "/types/relational/what-is-an-orm",
      "title": "What is an ORM?",
      "description": "What are ORMs and how are they useful? In this guide, we'll explain what ORMs are and why they are helpful for many projects.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/types/relational/what-is-an-orm",
      "markdownUrl": "https://www.prisma.io/dataguide/types/relational/what-is-an-orm.md",
      "faqs": []
    },
    {
      "path": "/types/relational/comparing-sql-query-builders-and-orms",
      "title": "Comparing SQL, query builders, and ORMs",
      "description": "In this article, we examine the differences between working with raw SQL, using query builders, or using an ORM.",
      "type": "TechArticle",
      "authors": [
        "Daniel Norman",
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/types/relational/comparing-sql-query-builders-and-orms",
      "markdownUrl": "https://www.prisma.io/dataguide/types/relational/comparing-sql-query-builders-and-orms.md",
      "faqs": [
        {
          "question": "What is a visual SQL query builder?",
          "answerMarkdown": "A visual SQL query builder is a graphical user interface for creating SQL queries.\n\nTypically, query builders are relatively light-weight, focus on easing data access and data representation, and do not attempt to translate the data into a specific programming paradigm."
        },
        {
          "question": "What is an online SQL query builder?",
          "answerMarkdown": "An online SQL query builder is a cloud-based tool that helps quickly build SQL queries without the need to know how to write SQL.\n\nTypically, query builders are relatively light-weight, focus on easing data access and data representation, and do not attempt to translate the data into a specific programming paradigm."
        },
        {
          "question": "What is the active record pattern?",
          "answerMarkdown": "The [active record pattern](https://en.wikipedia.org/wiki/Active_record_pattern) attempts to encapsulate the database's data within the structure of objects within your code. Objects contain methods to save, update, or delete from the database and changes to your objects are meant to be easily reflected in the database.\n\nActive record implementations allow you to manage your database by creating and connecting classes and instances within your code."
        },
        {
          "question": "What is the data mapper pattern?",
          "answerMarkdown": "The [data mapper pattern](https://en.wikipedia.org/wiki/Data_mapper_pattern) attempts to act as an independent layer between your code and your database that mediates between the two.\n\nIt focuses on trying to decouple and translate between them while letting each exist independently. This can help separate your business logic from database-related details that deal with mappings, representation, serialization, etc."
        },
        {
          "question": "What is a native query?",
          "answerMarkdown": "A native query is a database query made up of SQL statements that can be directly executed in a database using a database client."
        }
      ]
    },
    {
      "path": "/types/relational/what-are-database-migrations",
      "title": "What are database migrations?",
      "description": "Discover how database migrations allow developers to make controlled, repeatable changes to database structures.",
      "type": "TechArticle",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/types/relational/what-are-database-migrations",
      "markdownUrl": "https://www.prisma.io/dataguide/types/relational/what-are-database-migrations.md",
      "faqs": []
    },
    {
      "path": "/types/relational/migration-strategies",
      "title": "Strategies for deploying database migrations",
      "description": "Learn about the advantages and disadvantages of various techniques for deploying schema changes to your database.",
      "type": "TechArticle",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/types/relational/migration-strategies",
      "markdownUrl": "https://www.prisma.io/dataguide/types/relational/migration-strategies.md",
      "faqs": []
    },
    {
      "path": "/types/relational/expand-and-contract-pattern",
      "title": "Using the expand and contract pattern for schema changes",
      "description": "In this article, we introduce the expand and contract pattern to help migrate data and clients to a new schema.",
      "type": "TechArticle",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/types/relational/expand-and-contract-pattern",
      "markdownUrl": "https://www.prisma.io/dataguide/types/relational/expand-and-contract-pattern.md",
      "faqs": []
    },
    {
      "path": "/types/relational/infrastructure-architecture",
      "title": "Comparing common database infrastructure patterns",
      "description": "In this article, we cover some of the most common ways of deploying your database infrastructure to meet the needs of your application environment.",
      "type": "TechArticle",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/types/relational/infrastructure-architecture",
      "markdownUrl": "https://www.prisma.io/dataguide/types/relational/infrastructure-architecture.md",
      "faqs": [
        {
          "question": "What is database scaling?",
          "answerMarkdown": "Database scalability is the ability to expand or contract the capacity of system resources in order to support the changing use of an application.\n\nThere is both vertical and horizontal scaling. Vertical scaling refers to the scaling up of a single server or cluster. Horizontal scaling refers to bringing on additional nodes into the system to share the load from the increased usage."
        },
        {
          "question": "What is the CQRS pattern?",
          "answerMarkdown": "Command query responsibility segregation (CQRS) is a term used to describe adding logic to separate out queries that mutate data (write queries) from those that do not (read queries).\n\nThis allows you to route these different categories of requests to different hosts to help distribute the load."
        },
        {
          "question": "Is CQRS good for microservices?",
          "answerMarkdown": "CQRS is a common design pattern when working with microservices. The separation of read and write operations for the database avoids complex queries and joins. It aligns with the principles sought in a microservices application architecture.\n\nWith a CQRS design pattern, you can separate your concerns and database responsibilities that a single database would undertake in a [monolithic architecture](https://www.prisma.io/dataguide/intro/database-glossary#monolithic-architecture)."
        },
        {
          "question": "What is data sharding?",
          "answerMarkdown": "Sharding is the process of breaking a logical data set into smaller subsets to distribute their management to different machines.\n\nEach database server only handles a portion of the data and a routing mechanic is introduced that understands which machines are responsible for what pieces of data."
        },
        {
          "question": "What is the difference between data sharding and partitioning?",
          "answerMarkdown": "Sharding and partitioning both separate large datasets into smaller subsets. The difference between the two is that sharding generally implies a separation of the data across multiple servers while partitioning does not. Partitioning usually occurs on a single database."
        }
      ]
    },
    {
      "path": "/types/relational/what-are-joins-in-sql",
      "title": "What are JOINs in SQL?",
      "description": "Discover how JOINs allow developers to combine related data from multiple tables in SQL databases.",
      "type": "TechArticle",
      "authors": [
        "Grishma Patel"
      ],
      "url": "https://www.prisma.io/dataguide/types/relational/what-are-joins-in-sql",
      "markdownUrl": "https://www.prisma.io/dataguide/types/relational/what-are-joins-in-sql.md",
      "faqs": []
    },
    {
      "path": "/types/relational",
      "title": "Relational Databases",
      "description": "Relational Databases",
      "type": "CollectionPage",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/types/relational",
      "markdownUrl": "https://www.prisma.io/dataguide/types/relational.md",
      "faqs": []
    },
    {
      "path": "/types/document/what-are-document-dbs",
      "title": "What are document databases?",
      "description": "In this article, we examine what document databases are and their advantages and tradeoffs",
      "type": "TechArticle",
      "authors": [
        "Alex Emerich"
      ],
      "url": "https://www.prisma.io/dataguide/types/document/what-are-document-dbs",
      "markdownUrl": "https://www.prisma.io/dataguide/types/document/what-are-document-dbs.md",
      "faqs": []
    },
    {
      "path": "/types/document",
      "title": "Document Databases",
      "description": "Document Databases",
      "type": "CollectionPage",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/types/document",
      "markdownUrl": "https://www.prisma.io/dataguide/types/document.md",
      "faqs": []
    },
    {
      "path": "/types",
      "title": "Database types",
      "description": "Database types",
      "type": "CollectionPage",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/types",
      "markdownUrl": "https://www.prisma.io/dataguide/types.md",
      "faqs": []
    },
    {
      "path": "/postgresql/benefits-of-postgresql",
      "title": "The benefits of PostgreSQL",
      "description": "Learn why PostgreSQL is one of the most popular RDBMSs among developers, and the benefits it offers to engineers.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/postgresql/benefits-of-postgresql",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/benefits-of-postgresql.md",
      "faqs": [
        {
          "question": "Is PostgreSQL open-source?",
          "answerMarkdown": "[PostgreSQL](https://www.postgresql.org/) is an open-source database. It is an object relational database that has been in development for more than 30 years.\n\nYou can get more acquainted with PostgreSQL in our [Getting to know PostgreSQL feature](https://www.prisma.io/dataguide/postgresql/getting-to-know-postgresql)."
        },
        {
          "question": "What is PostgreSQL’s feature matrix?",
          "answerMarkdown": "[PostgreSQL’s Feature Matrix](https://www.postgresql.org/about/featurematrix/) is a table maintained by PostgreSQL outlining all of its features and which version those features were added in.\n\nYou can access each feature’s detailed information by clicking on that feature and getting directed to the appropriate PostgreSQL documentation."
        },
        {
          "question": "Where can you find PostgreSQL’s feature list?",
          "answerMarkdown": "You can find PostgreSQL’s feature list in its [Feature Matrix](https://www.postgresql.org/about/featurematrix/)."
        },
        {
          "question": "Is PostgreSQL free to use?",
          "answerMarkdown": "PostgreSQL is free to use and is released under the OSI-approved [PostgreSQL License](https://www.postgresql.org/about/licence/).\n\nThere is no fee, even for using commercial software products."
        },
        {
          "question": "Is PostgreSQL a NoSQL database?",
          "answerMarkdown": "PostgreSQL is an object relational database and is not a NoSQL database. However, they have added some NoSQL type capabilities such as [JSON Types](https://www.postgresql.org/docs/10/datatype-json.html)."
        }
      ]
    },
    {
      "path": "/postgresql/getting-to-know-postgresql",
      "title": "Getting to know PostgreSQL",
      "description": "Like any database system, PostgreSQL comes with its share of complexity.  This article will break down some of PostgreSQL's conceptual foundations to give you a better understanding of how all of the pieces fit together.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/postgresql/getting-to-know-postgresql",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/getting-to-know-postgresql.md",
      "faqs": []
    },
    {
      "path": "/postgresql/5-ways-to-host-postgresql",
      "title": "5 ways to host PostgreSQL databases",
      "description": "Compare PostgreSQL hosting options — self-managed, Docker, cloud-provider managed like AWS RDS, and fully managed Prisma Postgres — with a decision table, a \"when to choose\" guide, and an FAQ to help you pick the right one.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood",
        "Daniel Norman"
      ],
      "url": "https://www.prisma.io/dataguide/postgresql/5-ways-to-host-postgresql",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/5-ways-to-host-postgresql.md",
      "faqs": [
        {
          "question": "Is there a free way to host PostgreSQL?",
          "answerMarkdown": "Yes. For development, a local install or Docker container is free aside from your own machine's resources. For a hosted database, several managed providers offer a free tier — including Prisma Postgres, which has a free tier you can [start on](https://console.prisma.io/login?utm_source=dataguide\\&utm_medium=body_link\\&utm_campaign=postgres_hosting\\&utm_content=5-ways-to-host-postgresql:faq-free) before moving to usage-based pricing."
        },
        {
          "question": "What's the best PostgreSQL hosting for serverless or edge apps?",
          "answerMarkdown": "Serverless and edge environments open many short-lived connections, which can exhaust a traditional database's connection limit. A managed option with built-in connection pooling handles this without extra setup. Prisma Postgres includes pooling so your functions can use a standard connection string directly."
        },
        {
          "question": "Do I need a separate connection pooler?",
          "answerMarkdown": "With self-managed PostgreSQL you typically run a pooler such as PgBouncer yourself. Some managed services offer pooling as an add-on, while Prisma Postgres includes it by default, so there's nothing extra to deploy."
        },
        {
          "question": "How are backups handled?",
          "answerMarkdown": "With self-managed PostgreSQL, backups are your responsibility to schedule, store, and test. Managed services — cloud-provider databases, third-party providers, and Prisma Postgres — automate backups for you, though you should still confirm the retention and restore options match your needs."
        },
        {
          "question": "Can I develop locally and deploy to a hosted database?",
          "answerMarkdown": "Yes, and it's a common workflow: develop against a local or Docker PostgreSQL instance, then point your app at a hosted database for staging and production by swapping the connection string. Prisma Postgres supports both local development and hosted databases."
        },
        {
          "question": "Can I host the app and Postgres in one place?",
          "answerMarkdown": "Yes, some platforms host your application and a managed PostgreSQL database in the same account, so you deploy and manage both from one place. [Prisma Compute](https://www.prisma.io/compute?utm_source=dataguide\\&utm_medium=body_link\\&utm_campaign=postgres_hosting\\&utm_content=5-ways-to-host-postgresql:faq-compute) does this with Prisma Postgres. It hosts TypeScript apps built for Node.js, Bun or Next.js and runs them on Bun, in the same six regions as Prisma Postgres: two each in the United States, Europe and Asia. Each service, such as your API or frontend, runs in one region that you choose when you create it, so pick the region your database is in: every query the app sends makes a round trip to the database. The app connects with an ordinary PostgreSQL connection string, so any PostgreSQL client works and Prisma ORM is optional.\n\nCompute does not run [WebSocket servers](https://www.prisma.io/docs/compute/limitations#runtime) today, so an app that keeps connections open to its users needs another host for that part. Two Prisma posts compare this setup with other options: [Neon alternatives with app hosting and Postgres in one place (2026)](https://www.prisma.io/blog/neon-vs-prisma-postgres-app-hosting-in-one-place) and [App hosting platforms with managed Postgres compared (2026)](https://www.prisma.io/blog/app-hosting-platforms-with-managed-postgres-2026)."
        },
        {
          "question": "Is managed PostgreSQL production-ready?",
          "answerMarkdown": "Yes. Managed PostgreSQL — whether from a cloud provider or a service like Prisma Postgres — runs the same PostgreSQL you'd run yourself, with the provider running the server, its backups and its upgrades. What each provider guarantees differs, so confirm the specifics (uptime SLA, high availability and failover, backup retention and point-in-time recovery, supported versions and extensions) before committing."
        }
      ]
    },
    {
      "path": "/postgresql/setting-up-a-local-postgresql-database",
      "title": "Setting up a local PostgreSQL database",
      "description": "Install PostgreSQL 18 for local development with Docker, the PostgreSQL APT or Yum repository, Homebrew, Postgres.app or the EDB installer, then lock it down and create a least-privilege role for your application.",
      "type": "TechArticle",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/postgresql/setting-up-a-local-postgresql-database",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/setting-up-a-local-postgresql-database.md",
      "lastUpdated": "2026-09-30",
      "faqs": []
    },
    {
      "path": "/postgresql/setting-up-postgresql-on-rds",
      "title": "How to configure PostgreSQL on Amazon RDS for production",
      "description": "Set up Amazon RDS for PostgreSQL for production: choose the version, instance class, storage and Multi-AZ mode, keep the database private, connect with verified TLS, create least-privilege roles, and plan backups, monitoring, upgrades and deletion.",
      "type": "TechArticle",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/postgresql/setting-up-postgresql-on-rds",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/setting-up-postgresql-on-rds.md",
      "lastUpdated": "2026-09-30",
      "faqs": []
    },
    {
      "path": "/postgresql/connecting-to-postgresql-databases",
      "title": "Connecting to PostgreSQL databases",
      "description": "Before you can manage your data with PostgreSQL, you need to be able to connect to the database server.  In this guide, we'll use the `psql` command line client to demonstrate how to connect to PostgreSQL databases.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/postgresql/connecting-to-postgresql-databases",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/connecting-to-postgresql-databases.md",
      "lastUpdated": "2026-10-01",
      "faqs": []
    },
    {
      "path": "/postgresql/authentication-and-authorization/intro-to-authn-and-authz",
      "title": "An introduction to authorization and authentication in PostgreSQL",
      "description": "PostgreSQL's authentication and authorization features help you maintain the security and integrity of your data. Learn more about how they work",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/postgresql/authentication-and-authorization/intro-to-authn-and-authz",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/authentication-and-authorization/intro-to-authn-and-authz.md",
      "faqs": []
    },
    {
      "path": "/postgresql/authentication-and-authorization/role-management",
      "title": "Managing roles and role attributes in PostgreSQL",
      "description": "PostgreSQL roles are a combination of the ideas of users and groups into a single, flexible entity.  This guide will cover what roles are and how to manage them within a PostgreSQL database cluster.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/postgresql/authentication-and-authorization/role-management",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/authentication-and-authorization/role-management.md",
      "lastUpdated": "2026-09-29",
      "faqs": [
        {
          "question": "How can you alter a role's password in PostgreSQL?",
          "answerMarkdown": "To [change a role's password](https://www.prisma.io/dataguide/postgresql/authentication-and-authorization/role-management#changing-existing-roles) in PostgreSQL, you can user the `ALTER` statement with `PASSWORD`. The syntax would look like this:\n\n```sql\nALTER ROLE <role> WITH PASSWORD '<password>';\n```\n\nAlternatively, you can also use the `psql` meta-command like so:\n\n```sql\n-- To change your own password\n\\password\n-- To change the password for another role\n\\password <role>\n```"
        },
        {
          "question": "How do check your current user attributes in PostgreSQL?",
          "answerMarkdown": "To find the [attributes of the current role](https://www.prisma.io/dataguide/postgresql/authentication-and-authorization/role-management#listing-your-own-attributes), you can use `psql` meta-commands with the `USER` variable which will be substituted with the current connected role.\n\nThe basic syntax and result would look like:\n\n```sql\n\\du :USER\n```\n\n```sql\n                                   List of roles\n Role name |                         Attributes                         | Member of\n-----------+------------------------------------------------------------+-----------\n postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}\n```"
        },
        {
          "question": "How can you check if you have grant user privileges in PostgreSQL?",
          "answerMarkdown": "To check whether a role can [grant user privileges or create roles](https://www.prisma.io/dataguide/postgresql/authentication-and-authorization/role-management#check-whether-you-have-role-management-privileges), you can use use the following SQL statement:\n\n```sql\nSELECT rolname as \"Users who can manage roles\" FROM pg_roles WHERE rolsuper OR rolcreaterole;\n```\n\nTo check if your user has these privileges you can use the following statement:\n\n```sql\nSELECT 'Yes' AS \"Can I manage roles?\" FROM pg_roles WHERE rolname = :'USER' AND (rolsuper OR rolcreaterole);\n```"
        },
        {
          "question": "What is the replication role attribute in PostgreSQL?",
          "answerMarkdown": "`REPLICATION` is a role attribute in PostgreSQL that allows the role to initiate streaming [replication](https://www.prisma.io/dataguide/intro/database-glossary#replication).\n\nRoles with this attribute must also have the `LOGIN` attribute."
        },
        {
          "question": "How do you create user roles in PostgreSQL?",
          "answerMarkdown": "You can create roles in PostgreSQL by using the [`CREATE ROLE`](https://www.postgresql.org/docs/current/sql-createrole.html) command.\n\nThe basic syntax looks like:\n\n```sql\nCREATE ROLE <role>;\n```\n\nAnd with attributes:\n\n```sql\nCREATE ROLE <role> WITH <options>;\n```"
        }
      ]
    },
    {
      "path": "/postgresql/authentication-and-authorization/configuring-user-authentication",
      "title": "Configuring PostgreSQL user authentication",
      "description": "Managing authentication is one of the fundamental requirements of managing any database system.  In this guide, we'll show you how to configure PostgreSQL's authentication methods to allow different types of access.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/postgresql/authentication-and-authorization/configuring-user-authentication",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/authentication-and-authorization/configuring-user-authentication.md",
      "lastUpdated": "2026-10-01",
      "faqs": []
    },
    {
      "path": "/postgresql/authentication-and-authorization/managing-privileges",
      "title": "Managing privileges in PostgreSQL with grant and revoke",
      "description": "Managing ownership and grants on specific database objects is the primary way to control which roles can manage, modify, and view databases, tables, sequences, and more.  This guide will cover how to use PostgreSQL's grant and revocation mechanisms to lay out exactly what roles have access to each database object.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/postgresql/authentication-and-authorization/managing-privileges",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/authentication-and-authorization/managing-privileges.md",
      "faqs": []
    },
    {
      "path": "/postgresql/authentication-and-authorization",
      "title": "Authentication and authorization",
      "description": "Learn more about PostgreSQL authentication and authorization with our comprehensive and organized list of documentation and how-to's.",
      "type": "CollectionPage",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/postgresql/authentication-and-authorization",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/authentication-and-authorization.md",
      "faqs": []
    },
    {
      "path": "/postgresql/create-and-delete-databases-and-tables",
      "title": "How to create and delete databases and tables in PostgreSQL",
      "description": "Learn how to create and delete database and table structures using SQL and command line utilities.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/postgresql/create-and-delete-databases-and-tables",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/create-and-delete-databases-and-tables.md",
      "faqs": [
        {
          "question": "Does PostgreSQL support the IF NOT EXISTS clause when using the CREATE DATABASE command?",
          "answerMarkdown": "Yes, PostgreSQL supports the use of [`IF NOT EXISTS`](https://www.prisma.io/dataguide/postgresql/create-and-delete-databases-and-tables#create-tables-conditionally-with-the-if-not-exists-clause) when creating both databases and tables. The below demonstrates using the clause for table creation.\n\n```sql\nCREATE TABLE IF NOT EXISTS table_name (\n    column_name TYPE [column_constraint],\n    [table_constraint,]\n);\n```"
        },
        {
          "question": "How do you create a database from a dump in PostgreSQL?",
          "answerMarkdown": "To create a database from a dump ([pg\\_dump](https://www.postgresql.org/docs/current/app-pgdump.html)), PostgreSQL provides the [utility program `pg_restore`](https://www.postgresql.org/docs/current/app-pgrestore.html).\n\nThis program recreates the database in the same state as it was at the time of the dump. Example syntax would look like the following:\n\n```sql\npg_restore [connection-option...][option...][filename]\n```"
        },
        {
          "question": "Which command line creates a database in PostgreSQL?",
          "answerMarkdown": "To create a database in PostgreSQL, use the [`createdb` command](https://www.postgresql.org/docs/current/app-createdb.html). The syntax is as follows:\n\n```\ncreatedb db_name\n```"
        },
        {
          "question": "How do you drop a database in PostgreSQL?",
          "answerMarkdown": "The [`DROP DATABASE`](https://www.prisma.io/dataguide/postgresql/create-and-delete-databases-and-tables#drop-databases) statement tells PostgreSQL to delete the specified database. The basic syntax looks like this:\n\n```sql\nDROP DATABASE database_name;\n```"
        },
        {
          "question": "How do you change a column's data type in PostgreSQL?",
          "answerMarkdown": "To change the [data type](https://www.prisma.io/dataguide/intro/database-glossary#data-type) for a specific column, use the `ALTER COLUMN` change command with the `SET DATA TYPE` column command.\n\nThe basic syntax includes column name, the new type, and an optional `USING` clause to specify the old type's conversion.\n\n```sql\nALTER TABLE resident ALTER COLUMN id SET DATA TYPE int USING id::int;\n```"
        }
      ]
    },
    {
      "path": "/postgresql/introduction-to-data-types",
      "title": "An introduction to PostgreSQL data types",
      "description": "PostgreSQL's data type system allows you to define your data structures and store data in various formats.  These are some of the most common data types.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/postgresql/introduction-to-data-types",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/introduction-to-data-types.md",
      "lastUpdated": "2026-10-01",
      "faqs": []
    },
    {
      "path": "/postgresql/column-and-table-constraints",
      "title": "An introduction to PostgreSQL column and table constraints",
      "description": "Data types provide some broad control over the values accepted by tables.  For more granular control, PostgreSQL offers column and table constraints.  In this guide we'll show how constraints can help you define valid input for your tables.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/postgresql/column-and-table-constraints",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/column-and-table-constraints.md",
      "faqs": []
    },
    {
      "path": "/postgresql/date-types",
      "title": "Working with dates in PostgreSQL",
      "description": "Read on to learn about how to work with date types in PostgreSQL, including information on formats, functions, and more.",
      "type": "TechArticle",
      "authors": [
        "Alex Emerich"
      ],
      "url": "https://www.prisma.io/dataguide/postgresql/date-types",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/date-types.md",
      "lastUpdated": "2026-10-01",
      "faqs": [
        {
          "question": "What is the date format in PostgreSQL?",
          "answerMarkdown": "Dates are stored as binary values. ISO date input (`yyyy-mm-dd`) is unambiguous; output depends on `DateStyle`."
        },
        {
          "question": "What is the DATE_PART() function in PostgreSQL?",
          "answerMarkdown": "The `DATE_PART()` function in PostgreSQL is used to extract subfields from a date or time value.\n\nThe basic syntax looks like:\n\n```sql pseudocode\nSELECT DATE_PART(field, source);\n```\n\nFor example, you can write the following and return the hour, `20`:\n\n```sql\nSELECT DATE_PART('hour', timestamp '2001-02-16 20:38:40');\n```"
        },
        {
          "question": "How does the to_date function work in PostgreSQL?",
          "answerMarkdown": "The `TO_DATE()` function in PostgreSQL can be used to convert a string of text into a date type.\n\nThe basic syntax looks as follows:\n\n```sql pseudocode\nTO_DATE(text, format);\n```\n\nAn example such as:\n\n```sql\nSELECT TO_DATE('20220317', 'YYYYMMDD');\n```\n\nReturns an output of `2022-03-17`."
        },
        {
          "question": "How do you extract a date from a timestamp in PostgreSQL?",
          "answerMarkdown": "To extract a part of a date in PostgreSQL, you can use the `EXTRACT()` function. This function can parse out the year, month, or day from a date type as well as specify quarter.\n\nThe basic syntax looks as follows:\n\n```sql pseudocode\nSELECT EXTRACT(field FROM source);\n```\n\nAn example would be:\n\n```sql\nSELECT EXTRACT(YEAR FROM TIMESTAMP '2022-03-17 20:38:16');\n```\n\nThis statement’s return will be `2022`."
        },
        {
          "question": "How do you truncate a date in PostgreSQL?",
          "answerMarkdown": "You can truncate a timestamp in PostgreSQL by using the `DATE_TRUNC()` function. This function truncates a `TIMESTAMP` or `INTERVAL` based on a specified date part such as year, month, day, etc.\n\nThe basic syntax looks as follows:\n\n```sql pseudocode\nSELECT DATE_TRUNC('datepart', source);\n```\n\nAn example would be:\n\n```sql\nSELECT DATE_TRUNC('hour', TIMESTAMP '2022-03-17 02:09:30');\n```\n\nThe return for this statement would be `2022-03-17 02:00:00`."
        }
      ]
    },
    {
      "path": "/postgresql/inserting-and-modifying-data/inserting-and-deleting-data",
      "title": "How to insert and delete data in PostgreSQL",
      "description": "The `INSERT` and `DELETE` commands are the primary way that PostgreSQL adds and removes records from tables.  This guide demonstrates how to use them to control the data your tables manage.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/postgresql/inserting-and-modifying-data/inserting-and-deleting-data",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/inserting-and-modifying-data/inserting-and-deleting-data.md",
      "faqs": [
        {
          "question": "How do you perform a batch insert in PostgreSQL?",
          "answerMarkdown": "The basic syntax for multi-record insertion looks like this:\n\n```sql\nINSERT INTO my_table(column_name, column_name_2)\nVALUES\n\t('value', 'value2'),\n\t('value3', 'value4'),\n\t('value5', 'value6');\n\n```\n\nAn example using employee data would look something like this:\n\n```sql\nINSERT INTO employee(first_name, last_name)\nVALUES\n    ('Abigail', 'Spencer'),\n    ('Tamal', 'Wayne'),\n    ('Katie', 'Singh'),\n    ('Felipe', 'Espinosa');\n```"
        },
        {
          "question": "How do you check if a record exists before inserting in PostgreSQL?",
          "answerMarkdown": "One way to check if a record exists in PostgreSQL before inserting is by using the [`EXISTS` subquery expression](https://www.postgresql.org/docs/8.1/functions-subquery.html).\n\nThe `EXISTS` condition is used in combination with a subquery for the data you are checking for. It is considered to be met if the subquery returns at least one row. If no row is returned, then the record does not yet exist.\n\nThe basic syntax looks as follows:\n\n```sql\nWHERE EXISTS ( subquery );\n```"
        },
        {
          "question": "How do I delete duplicate rows in PostgreSQL?",
          "answerMarkdown": "There are [several methods for deleting duplicate rows](https://www.postgresqltutorial.com/postgresql-tutorial/how-to-delete-duplicate-rows-in-postgresql/) in PostgreSQL. You can use a `DELETE USING` statement to check if two different rows have the same value and then delete the duplicate.\n\nIn addition, you can use a subquery to delete duplicates or by using an immediate table with the listed steps:\n\n1. Create a new table with the same structure as the one whose duplicate rows should be removed.\n2. Insert distinct rows from the source table to the immediate table.\n3. Drop the source table.\n4. Rename the immediate table to the name of the source table."
        },
        {
          "question": "How do I delete a record if it exists in PostgreSQL?",
          "answerMarkdown": "You can delete a record in PostgreSQL if it exists by using a `DELETE` statement with a `WHERE` clause including `EXISTS` . The `EXISTS` clause requires a subquery.\n\nThe basic syntax looks something like this:\n\n```sql\nDELETE FROM table_name\n\tWHERE EXISTS ( subquery );\n```"
        },
        {
          "question": "How do I delete records with a limit in PostgreSQL?",
          "answerMarkdown": "PostgreSQL only allows for a `LIMIT` clause in its `SELECT` statements. Therefore, in order to use it in a `DELETE` statement you will have to include a `SELECT`.\n\nThe syntax could look something like this:\n\n```sql\nDELETE FROM table_name\nWHERE field_name IN (\n\tSELECT field_name FROM table_name LIMIT 1);\n```"
        }
      ]
    },
    {
      "path": "/postgresql/inserting-and-modifying-data/updating-existing-data",
      "title": "How to update existing data in PostgreSQL",
      "description": "The `UPDATE` command is the primary method of altering existing data within PostgreSQL.  This guide demonstrates how to use the `UPDATE` operation to modify the values within your tables.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/postgresql/inserting-and-modifying-data/updating-existing-data",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/inserting-and-modifying-data/updating-existing-data.md",
      "faqs": []
    },
    {
      "path": "/postgresql/inserting-and-modifying-data/insert-on-conflict",
      "title": "How to use `INSERT ON CONFLICT` to upsert data in PostgreSQL",
      "description": "The `INSERT...ON CONFLICT` construct let's you define what PostgreSQL should do if a row you are inserting conflicts with an existing row. This enables 'upsert' operations which insert records or update them on conflict.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/postgresql/inserting-and-modifying-data/insert-on-conflict",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/inserting-and-modifying-data/insert-on-conflict.md",
      "faqs": []
    },
    {
      "path": "/postgresql/inserting-and-modifying-data/importing-and-exporting-data-in-postgresql",
      "title": "Importing and exporting data in PostgreSQL",
      "description": "Learn the fundamentals of importing, exporting, and modifying data using PostgreSQL.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/postgresql/inserting-and-modifying-data/importing-and-exporting-data-in-postgresql",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/inserting-and-modifying-data/importing-and-exporting-data-in-postgresql.md",
      "lastUpdated": "2026-10-01",
      "faqs": []
    },
    {
      "path": "/postgresql/inserting-and-modifying-data/using-transactions",
      "title": "Understanding and using transactions in PostgreSQL",
      "description": "Transactions help provide the atomicity, consistency, isolation, and durability promises of ACID-compliant databases.  In this guide, we'll look at what transactions are, the various levels of isolation possible, and how to use them in PostgreSQL.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/postgresql/inserting-and-modifying-data/using-transactions",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/inserting-and-modifying-data/using-transactions.md",
      "lastUpdated": "2026-09-29",
      "faqs": []
    },
    {
      "path": "/postgresql/inserting-and-modifying-data",
      "title": "Inserting and modifying data",
      "description": "Inserting and modifying data in PostgreSQL. Including how to insert and delete data in PostgreSQL, update existing data in PostgreSQL, and more.",
      "type": "CollectionPage",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/postgresql/inserting-and-modifying-data",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/inserting-and-modifying-data.md",
      "faqs": []
    },
    {
      "path": "/postgresql/reading-and-querying-data/basic-select",
      "title": "How to perform basic queries with `SELECT` in PostgreSQL",
      "description": "The `SELECT` command is the main way to query the data within tables and views in PostgreSQL.  This guide demonstrates the basic syntax and operation of this highly flexible command.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/postgresql/reading-and-querying-data/basic-select",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/reading-and-querying-data/basic-select.md",
      "faqs": []
    },
    {
      "path": "/postgresql/reading-and-querying-data/filtering-data",
      "title": "How to filter query results in PostgreSQL",
      "description": "PostgreSQL provides many ways to constrain the results that your queries return. Discover how to filter queries to return only the data you're interested in.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/postgresql/reading-and-querying-data/filtering-data",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/reading-and-querying-data/filtering-data.md",
      "faqs": [
        {
          "question": "How do you filter multiple columns in PostgreSQL?",
          "answerMarkdown": "You can filter multiple columns in PostgreSQL by adding additional conditions to create compound expressions using [operators](https://www.postgresql.org/docs/current/functions.html).\n\nAn example of an additional condition is the logical operator `AND`. An example of the syntax would look like the following:\n\n```sql\nSELECT * FROM customer WHERE first_name = 'John' AND last_name = 'Smith';\n```"
        },
        {
          "question": "How do I limit row results in PostgreSQL?",
          "answerMarkdown": "You can limit the number of records a query returns by using the `LIMIT` clause. Rather than eliminating rows of data based on criteria within the row itself, the `LIMIT` clause sets the maximum number of records returned.\n\nThe basic syntax looks like this:\n\n```sql\nSELECT * FROM my_table LIMIT <num_rows> [OFFSET <num_rows_to_skip>];\n```"
        },
        {
          "question": "What is an aggregate function in PostgreSQL?",
          "answerMarkdown": "[Aggregate functions](https://www.postgresql.org/docs/current/functions-aggregate.html) in PostgreSQL are functions that compute a single result from a set of input values."
        },
        {
          "question": "What is array_agg() in PostgreSQL?",
          "answerMarkdown": "PostgreSQL's `array_agg()` is a [user-defined aggregate function](https://www.postgresql.org/docs/current/xaggr.html) that accepts a set of values and returns an array where each value in the input set is assigned to an element of the array."
        },
        {
          "question": "Can you GROUP BY timestamp values in PostgreSQL?",
          "answerMarkdown": "Yes, you can `GROUP BY` a timestamp value in PostgreSQL. However, this value includes a time element that would need timestamps to be identical to the millisecond to get grouped together.\n\nGrouping timestamps together by day, month, or year is best accomplished by casting the timestamp value into [PostgreSQL's `DATE` data type](https://www.prisma.io/dataguide/postgresql/date-types#postgresql-date-data-type) which has no associated time value."
        }
      ]
    },
    {
      "path": "/postgresql/reading-and-querying-data/joining-tables",
      "title": "Using joins to combine data from different tables in PostgreSQL",
      "description": "Joins allow you to bring together data from multiple tables by stitching together columns that contain common values. In this guide, we'll talk about the different types of joins PostgreSQL supports and how to use joins to construct more valuable queries.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/postgresql/reading-and-querying-data/joining-tables",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/reading-and-querying-data/joining-tables.md",
      "faqs": [
        {
          "question": "Does PostgreSQL support outer joins?",
          "answerMarkdown": "Yes, PostgreSQL supports outer joins. For example, you can use `LEFT OUTER JOIN` or just `LEFT JOIN` like in the following:\n\n```sql\nSELECT\n    *\nFROM\n    table_1\nLEFT JOIN table_2\n    ON table_1.id = table_2.table_1_id;\n```"
        },
        {
          "question": "What is a lateral join in PostgreSQL?",
          "answerMarkdown": "The `LATERAL` key word in [PostgreSQL](https://www.postgresql.org/docs/current/app-createdb.html#SQL-FROM) can precede a sub-SELECT FROM item and allows the sub-SELECT to refer to columns of FROM items that appear before it in the FROM list. (Without LATERAL, each sub-SELECT is evaluated independently and so cannot cross-reference any other FROM item.)"
        },
        {
          "question": "Does PostgreSQL support cross joins?",
          "answerMarkdown": "Yes, a `CROSS JOIN` can be done in PostgreSQL. The syntax will look something like:\n\n```sql\nSELECT select_list\nFROM t1\nCROSS JOIN t2;\n```\n\nThe above example would display something like this [example output](https://www.prisma.io/dataguide/postgresql/reading-and-querying-data/joining-tables#cross-join)"
        },
        {
          "question": "Does PostgreSQL support full joins?",
          "answerMarkdown": "Yes, PostgreSQL support [full joins](https://www.prisma.io/dataguide/postgresql/reading-and-querying-data/joining-tables#full-join). They can be specified as `FULL OUTER JOIN` or as `FULL JOIN`.\n\nThe syntax would look like:\n\n```sql\nSELECT\n    *\nFROM\n    table_1\nFULL JOIN table_2\n    ON table_1.id = table_2.table_1_id;\n```"
        },
        {
          "question": "How do you specify an inner join in PostgreSQL?",
          "answerMarkdown": "The default join in PostgreSQL is an [**inner join**](https://www.prisma.io/dataguide/postgresql/reading-and-querying-data/joining-tables#inner-join), and it can be specified by using `INNER JOIN` or just `JOIN`.\n\nThe syntax is:\n\n```sql\nSELECT\n    *\nFROM\n    table_1\n[INNER] JOIN table_2\n    ON table_1.id = table_2.table_1_id;\n```"
        }
      ]
    },
    {
      "path": "/postgresql/reading-and-querying-data/optimizing-postgresql",
      "title": "Introduction to optimizing PostgreSQL performance",
      "description": "Learn how to discover PostgreSQL performance bottlenecks by looking at system resource utilization and identifying slow queries",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/postgresql/reading-and-querying-data/optimizing-postgresql",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/reading-and-querying-data/optimizing-postgresql.md",
      "lastUpdated": "2026-10-01",
      "faqs": []
    },
    {
      "path": "/postgresql/reading-and-querying-data",
      "title": "Reading and querying data",
      "description": "Reading and querying data in PostgreSQL. Including how to perform basic queries with `SELECT` in PostgreSQL, filter query results in PostgreSQL, and more.",
      "type": "CollectionPage",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/postgresql/reading-and-querying-data",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/reading-and-querying-data.md",
      "faqs": []
    },
    {
      "path": "/postgresql/short-guides/quoting-rules",
      "title": "How to use single and double quotes in PostgreSQL",
      "description": "Read on to learn how PostgreSQL interprets single and double quotes and the side effects of each type.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/postgresql/short-guides/quoting-rules",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/short-guides/quoting-rules.md",
      "faqs": []
    },
    {
      "path": "/postgresql/short-guides/creating-deleting-users",
      "title": "How to create and delete users in PostgreSQL",
      "description": "This short guide will cover how to create and delete users in PostgreSQL.",
      "type": "TechArticle",
      "authors": [
        "Alex Emerich"
      ],
      "url": "https://www.prisma.io/dataguide/postgresql/short-guides/creating-deleting-users",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/short-guides/creating-deleting-users.md",
      "lastUpdated": "2026-09-29",
      "faqs": []
    },
    {
      "path": "/postgresql/short-guides/connection-uris",
      "title": "Introduction to PostgreSQL connection URIs",
      "description": "Learn how to encode PostgreSQL connection details in connection URIs for applications and libraries",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/postgresql/short-guides/connection-uris",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/short-guides/connection-uris.md",
      "faqs": []
    },
    {
      "path": "/postgresql/short-guides/exporting-schemas",
      "title": "How to export database and table schemas in PostgreSQL",
      "description": "Learn how to export your database objects from PostgreSQL for analysis, migrating, backups, and more.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/postgresql/short-guides/exporting-schemas",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/short-guides/exporting-schemas.md",
      "faqs": []
    },
    {
      "path": "/postgresql/short-guides",
      "title": "Short guides",
      "description": "",
      "type": "CollectionPage",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/postgresql/short-guides",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql/short-guides.md",
      "faqs": []
    },
    {
      "path": "/postgresql",
      "title": "PostgreSQL",
      "description": "PostgreSQL",
      "type": "CollectionPage",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/postgresql",
      "markdownUrl": "https://www.prisma.io/dataguide/postgresql.md",
      "faqs": []
    },
    {
      "path": "/mysql/5-ways-to-host-mysql",
      "title": "5 ways to host MySQL databases",
      "description": "There are many ways of getting a MySQL server up and running for your projects.  This article explores some of the most popular options.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mysql/5-ways-to-host-mysql",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/5-ways-to-host-mysql.md",
      "faqs": []
    },
    {
      "path": "/mysql/setting-up-a-local-mysql-database",
      "title": "Setting up a local MySQL database",
      "description": "Install MySQL 9.7 LTS for local development with Docker, the MySQL APT or Yum repository, Homebrew, or the Windows MSI, then lock it down and create a least-privilege user for your application.",
      "type": "TechArticle",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/mysql/setting-up-a-local-mysql-database",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/setting-up-a-local-mysql-database.md",
      "lastUpdated": "2026-09-30",
      "faqs": []
    },
    {
      "path": "/mysql/connecting-to-mysql-databases",
      "title": "Connecting to MySQL databases",
      "description": "Learn how to connect to local and remote MySQL databases using the `mysql` client",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mysql/connecting-to-mysql-databases",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/connecting-to-mysql-databases.md",
      "faqs": [
        {
          "question": "Can you connect to a MySQL database in Python?",
          "answerMarkdown": "Yes, you can connect to a MySQL database using Python. You will need to download the MySQL Python connector and use the `connect()` constructor.\n\nMySQL provides a [developer guide](https://dev.mysql.com/doc/connector-python/en/connector-python-example-connecting.html) once the connector is downloaded."
        },
        {
          "question": "Can you connect to a MySQL database in Java?",
          "answerMarkdown": "Yes, you can connect to a MySQL database using Java. You will need to download the MySQL Java connector.\n\nMySQL provides an [installation guide](https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-installing.html) for the connector and examples to get started."
        },
        {
          "question": "How do you remotely connect to a MySQL database?",
          "answerMarkdown": "If you wish to connect to a remote MySQL database, you will have to provide the network location of the remote host and potentially add some additional information.\n\nThe available authentication methods vary based on the MySQL instance's configuration. Most commonly, though, you need to provide the following parameters to authenticate:\n\n| Option               | Description                                                                                                                                         |\n| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `--host=` or `-h`    | The network host name or the IP address of the MySQL server                                                                                         |\n| `--port` or `-P`     | The network port that the MySQL server is running on. If the server is using port 3306, the default MySQL port, this parameter may be omitted.      |\n| `--user=` or `-u`    | The database username you wish to connect as. If not specified, your operating system username will be used.                                        |\n| `--password` or `-p` | Indicate that you want to provide a password for the specified account. The `mysql` client will prompt you for the password once you press `Enter`. |\n| _MySQL database_     | The MySQL database name that you want to access. If not specified, `mysql` will connect to the server without connecting to a specific database.    |"
        },
        {
          "question": "What is the maximum amount of connections MySQL can accept?",
          "answerMarkdown": "The amount of connections MySQL can accept is controlled by the `max_connections` variable. By default this value is 151.\n\nYou can manually increase this value if needed, and your server has enough RAM to support the increased connections."
        },
        {
          "question": "How do you list all database connections in MySQL?",
          "answerMarkdown": "There are a couple of ways to identify the number of connections on a MySQL database. The most common way is through `mysql` command line.\n\nYou can use the [`threads_connected`](https://dev.mysql.com/doc/refman/8.0/en/server-status-variables.html#statvar_Threads_connected) variable which shows an out put of the number of connections.\n\nYou can also use the [`show processlist`](https://dev.mysql.com/doc/refman/8.0/en/performance-schema-processlist-table.html) command which indicates the operations currently being performed by the set of threads executing within the server."
        }
      ]
    },
    {
      "path": "/mysql/authentication-and-authorization/intro-to-authn-and-authz",
      "title": "An introduction to authorization and authentication in MySQL",
      "description": "Authentication and authorization are important aspects of MySQL's security approach. Together, they function as the system's access control controllers.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mysql/authentication-and-authorization/intro-to-authn-and-authz",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/authentication-and-authorization/intro-to-authn-and-authz.md",
      "faqs": []
    },
    {
      "path": "/mysql/authentication-and-authorization/user-management-and-authentication",
      "title": "How to manage users and authentication in MySQL",
      "description": "This guide demonstrates how to use MySQL's robust system for defining users and controlling their authentication options.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mysql/authentication-and-authorization/user-management-and-authentication",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/authentication-and-authorization/user-management-and-authentication.md",
      "lastUpdated": "2026-09-29",
      "faqs": [
        {
          "question": "How do you change user passwords in MySQL?",
          "answerMarkdown": "The most common way to change a user's password is to use `ALTER USER`. For example you can modify the password for `'kamal'@'localhost'` by using:\n\n```sql\nALTER USER 'kamal'@'localhost' IDENTIFIED BY '<new_password>';\n```\n\nYou can also set a temporary password by using:\n\n```sql\nALTER USER 'kamal'@'localhost' IDENTIFIED BY '<new_password>' PASSWORD EXPIRE;\n```"
        },
        {
          "question": "How do I fix root user access errors in MySQL?",
          "answerMarkdown": "There are several potential reasons that you might receive an error when trying to login as a root user to a MySQL database. MySQL addresses the [troubleshooting checks](https://dev.mysql.com/doc/refman/8.0/en/problems-connecting.html) that you can do in their documentation.\n\nSome common cases include needing to reset the root user password or editing the [configuration file](https://dev.mysql.com/doc/refman/8.0/en/option-files.html)."
        },
        {
          "question": "How do you drop users in MySQL?",
          "answerMarkdown": "You can drop users in MySQL by using the `DROP USER` command. The basic syntax looks like this:\n\n```sql\nDROP USER '<user>'@'<host>';\n```\n\nTo avoid attempting to drop a user that does not exist, you can include the `IF EXISTS` clause before the account name."
        },
        {
          "question": "How do you show all users in MySQL?",
          "answerMarkdown": "To list all users in a MySQL instance, you can use use a `SELECT` statement on the `mysql.user` database. The syntax would look as follows when also including `host` and `plugin`:\n\n```sql\nSELECT user,host,plugin FROM mysql.user;\n```"
        },
        {
          "question": "How do you show grants for a user in MySQL?",
          "answerMarkdown": "To show grants for your current user, you can use the following syntax:\n\n```sql\nSHOW GRANTS;\n```\n\nAnd for other users you can use:\n\n```sql\nSHOW GRANTS FOR '<user>'@'<host>';\n```"
        }
      ]
    },
    {
      "path": "/mysql/authentication-and-authorization/privilege-management",
      "title": "How to use `GRANT` and `REVOKE` to manage privileges in MySQL",
      "description": "Discover how to use the `GRANT` command and the `REVOKE` command to add and remove privileges in MySQL, as well as managing privileges nuances among users.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mysql/authentication-and-authorization/privilege-management",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/authentication-and-authorization/privilege-management.md",
      "faqs": []
    },
    {
      "path": "/mysql/authentication-and-authorization/role-management",
      "title": "How to manage privileges with roles in MySQL",
      "description": "MySQL roles allow you to group and manage multiple privileges under a single name.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mysql/authentication-and-authorization/role-management",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/authentication-and-authorization/role-management.md",
      "faqs": [
        {
          "question": "How do you flush privileges in MySQL?",
          "answerMarkdown": "In order to perform a flush-privileges operation, telling the server to reload the grant tables, you can issue a `FLUSH PRIVILEGES` statement.\n\nThis can also be done by executing a [mysqladmin flush-privileges](https://dev.mysql.com/doc/refman/8.0/en/mysqladmin.html) or [mysqladmin reload](https://dev.mysql.com/doc/refman/8.0/en/mysqladmin.html) command."
        },
        {
          "question": "How do you grant all privileges in MySQL?",
          "answerMarkdown": "You can assign full privileges to a user at a specific scope using the `ALL` or `ALL PRIVILEGES` shorthand.\n\nThe following syntax would grant every privilege that your user is capable of related to the `sales` database to the `'salesadmin'@'localhost'` user.\n\n```\nGRANT ALL PRIVILEGES ON sales.* TO 'salesadmin'@'localhost';\n```"
        },
        {
          "question": "How do you grant read only privilege in MySQL?",
          "answerMarkdown": "To grant read only privilege globally to a user, you can use wildcards for both the database and database object part of the scope component.\n\nThe basic syntax looks like this:\n\n```\nGRANT SELECT ON *.* TO 'sally'@localhost';\n```\n\nTo limit the scope of the read only grant to a single database, replace the wildcard on the left side of the dot with a database name:\n\n```\nGRANT SELECT ON account.* TO 'meredith'@'localhost';\n```\n\nSimilarly, to give access only to a particular table in a database use the following:\n\n```\nGRANT SELECT ON account.revenue TO 'meredith'@'localhost';\n```"
        },
        {
          "question": "How do you add a root user in MySQL?",
          "answerMarkdown": "To make a new root, or superuser account, in MySQL, you have to provide it with full root access to everything in the database by using the `GRANT ALL PRIVILEGES` statement.\n\nThe basic syntax looks like this:\n\n```\nGRANT ALL PRIVILEGES ON *.* TO 'user_name'@'localhost' WITH GRANT OPTION;\n```"
        },
        {
          "question": "How do you show user privileges in MySQL?",
          "answerMarkdown": "To understand what privileges are available on your account, you can use the `SHOW GRANTS` command.\n\nTo check the grants enabled for a user, type:\n\n```\nSHOW GRANTS FOR '<user>'@'<host>';\n```\n\nAfter learning what roles an account is a member of, you can check what privileges that roles provides the user by typing:\n\n```\nSHOW GRANTS FOR '<user>'@'<host>' USING '<role>'@'<host>';\n```"
        }
      ]
    },
    {
      "path": "/mysql/authentication-and-authorization",
      "title": "Authentication and authorization",
      "description": "",
      "type": "CollectionPage",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/mysql/authentication-and-authorization",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/authentication-and-authorization.md",
      "faqs": []
    },
    {
      "path": "/mysql/create-and-delete-databases-and-tables",
      "title": "How to create and delete databases and tables in MySQL",
      "description": "Learn how to create new databases and tables and delete them in MySQL.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mysql/create-and-delete-databases-and-tables",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/create-and-delete-databases-and-tables.md",
      "faqs": [
        {
          "question": "How do you create a database in MySQL Workbench?",
          "answerMarkdown": "In MySQL Workbench, you start by [creating a new model](https://dev.mysql.com/doc/workbench/en/wb-getting-started-tutorial-creating-a-model.html).\n\nOnce you have a model you'll be able to add a new schema which in MySQL is equivalent to a new database."
        },
        {
          "question": "How do you alter a table and add a column in MySQL?",
          "answerMarkdown": "The basic syntax for altering a table in MySQL uses `ALTER TABLE` and looks like the following:\n\n```sql\nALTER TABLE <table_name> <change_command> <change_parameters>;\n```\n\nThe `<change_command>` indicates the exact type of change you would like to make, whether it involves setting different options on the table, adding or removing columns, or changing types or constraints.\n\nThe `<change_parameters>` part of the command contains any additional information that MySQL needs to complete the change.\n\nTo add a table you can use the `ADD` change command. It looks like:\n\n```sql\nALTER TABLE some_table ADD missing_column text;\n```"
        },
        {
          "question": "How do you drop all tables in a MySQL database?",
          "answerMarkdown": "There is not a single command that drops all tables at once in MySQL. You would need a script to run through all tables.\n\nThe basic syntax for dropping a table uses the `DROP TABLE` SQL statement with `IF EXISTS` optionally included.\n\nThe basic syntax is:\n\n```sql\nDROP TABLE IF EXISTS <table_name>;\n```"
        },
        {
          "question": "How do I drop an index in MySQL?",
          "answerMarkdown": "To drop an index in MySQL, you can use the `DROP INDEX` command. The basic syntax includes the `<index_name>` and `<table_name>`.\n\nIt looks like:\n\n```sql\nDROP INDEX <index_name> ON <table_name>;\n```"
        },
        {
          "question": "How do I create a temporary table in MySQL?",
          "answerMarkdown": "You can use the [`TEMPORARY` keyword](https://dev.mysql.com/doc/refman/8.0/en/create-temporary-table.html#:~:text=To%20create%20a%20temporary%20table,INSERT%20%2C%20UPDATE%20%2C%20or%20SELECT%20.) when creating a table in MySQL. This creates a temporary table that is only visible within the current session, and it is dropped automatically when the session is closed.\n\nThe basic syntax looks the same as when creating a table except for the inclusion of `TEMPORARY`. It looks as follows:\n\n```sql\nCREATE TEMPORARY TABLE table_name(\n   column_1_definition,\n   column_2_definition,\n   ...,\n   table_constraints\n);\n```"
        }
      ]
    },
    {
      "path": "/mysql/introduction-to-data-types",
      "title": "An introduction to MySQL data types",
      "description": "MySQL supports a variety of data types to help you define what types of values different fields support..  In this guide, we'll introduce some of the most common MySQL data types and show you how to work with them.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mysql/introduction-to-data-types",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/introduction-to-data-types.md",
      "faqs": [
        {
          "question": "What is the range of the DECIMAL data type in MySQL?",
          "answerMarkdown": "The declaration syntax for a `DECIMAL` column is `DECIMAL(M, D)`. The ranges of values for the arguments are as follows:\n\n- _M_ is the maximum number of digits (the precision). It has a range of 1 to 65.\n- _D_ is the number of digits to the right of the decimal point (the scale). It has a range of 0 to 30 and must be no larger than _M_."
        },
        {
          "question": "How does MySQL store TEXT?",
          "answerMarkdown": "The [storage requirements](https://dev.mysql.com/doc/refman/8.0/en/storage-requirements.html) for string types in MySQL can be represented in the following table with _L_ representing the actual length in bytes of a given string value.\n\n| Data Type  | Storage Required                 |\n| ---------- | -------------------------------- |\n| TINYTEXT   | _L_ + 1 bytes, where _L_ \\< 2^8  |\n| TEXT       | _L_ + 2 bytes, where _L_ \\< 2^16 |\n| MEDIUMTEXT | _L_ + 3 bytes, where _L_ \\< 2^24 |\n| LONGTEXT   | _L_ + 4 bytes, where _L_ \\< 2^32 |"
        },
        {
          "question": "What is the difference between TEXT and VARCHAR in MySQL?",
          "answerMarkdown": "`TEXT` and `VARCHAR` similarly store characters with no fixed size.\n\n`VARCHAR` is different because it cannot be used without specifying the maximum number of characters to store whereas `TEXT` does not require this.\n\nThe example definition syntax of a `VARCHAR` would look like this:\n\n```\nVARCHAR(10)\n```"
        },
        {
          "question": "What is the maximum length of VARCHAR in MySQL?",
          "answerMarkdown": "Values in `VARCHAR` columns are variable-length strings. The maximum length can be specified as a value from 0 to 65,535.\n\nThe effective maximum length of a `VARCHAR` is subject to the maximum row size among all columns (65,535 bytes)."
        },
        {
          "question": "How are ENUM types stored in MySQL?",
          "answerMarkdown": "`ENUM` is an advantageous storage type in situations where a column has a limited set of possible values.\n\nIt has the same storage requirements as all columns:\n\n| Data Type | Storage Required                                                                    |\n| --------- | ----------------------------------------------------------------------------------- |\n| ENUM      | 1 or 2 bytes, depending on the number of enumeration values (65,535 values maximum) |"
        }
      ]
    },
    {
      "path": "/mysql/column-and-table-constraints",
      "title": "An introduction to MySQL column and table constraints",
      "description": "Column and table constraints give you control over what values you allow in your database tables.  In this guide, we'll learn how to define and use constraints in MySQL.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mysql/column-and-table-constraints",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/column-and-table-constraints.md",
      "faqs": []
    },
    {
      "path": "/mysql/inserting-and-modifying-data/inserting-and-deleting-data",
      "title": "How to insert and delete data in MySQL",
      "description": "Learn how to use the `INSERT` and `DELETE` queries to add and remove data from MySQL tables.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mysql/inserting-and-modifying-data/inserting-and-deleting-data",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/inserting-and-modifying-data/inserting-and-deleting-data.md",
      "faqs": []
    },
    {
      "path": "/mysql/inserting-and-modifying-data/updating-existing-data",
      "title": "How to update existing data in MySQL",
      "description": "The `UPDATE` command allows you to change the data in existing MySQL records.  This guide demonstrates how to use the `UPDATE` operation to modify the values within your tables.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mysql/inserting-and-modifying-data/updating-existing-data",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/inserting-and-modifying-data/updating-existing-data.md",
      "faqs": []
    },
    {
      "path": "/mysql/inserting-and-modifying-data/insert-on-duplicate-key-update",
      "title": "How to use `ON DUPLICATE KEY UPDATE` to upsert data in MySQL",
      "description": "The `INSERT...ON DUPLICATE KEY UPDATE` clause lets you handle scenarios where a record should be modified if it exists and added if it does not exist.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mysql/inserting-and-modifying-data/insert-on-duplicate-key-update",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/inserting-and-modifying-data/insert-on-duplicate-key-update.md",
      "lastUpdated": "2026-09-29",
      "faqs": []
    },
    {
      "path": "/mysql/inserting-and-modifying-data/importing-and-exporting-data-in-mysql",
      "title": "Importing and exporting data in MySQL",
      "description": "Exporting data from MySQL to recreate your data structures and populate databases is a good way to migrate data, back up and recover, or prepare for replication. Learn more!",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mysql/inserting-and-modifying-data/importing-and-exporting-data-in-mysql",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/inserting-and-modifying-data/importing-and-exporting-data-in-mysql.md",
      "faqs": []
    },
    {
      "path": "/mysql/inserting-and-modifying-data/using-transactions",
      "title": "Understanding and using transactions in MySQL",
      "description": "Transactions are one way that MySQL is able to guarantee data consistency when modifying related data.  In this article, we'll discuss what transactions are and how they can help perform complex operations safely.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mysql/inserting-and-modifying-data/using-transactions",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/inserting-and-modifying-data/using-transactions.md",
      "faqs": []
    },
    {
      "path": "/mysql/inserting-and-modifying-data",
      "title": "Inserting and modifying data",
      "description": "Inserting and modifying data in MySQL. Including how to insert and delete data in MySQL, update existing data in MySQL, and more.",
      "type": "CollectionPage",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/mysql/inserting-and-modifying-data",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/inserting-and-modifying-data.md",
      "faqs": []
    },
    {
      "path": "/mysql/reading-and-querying-data/basic-select",
      "title": "How to perform basic queries with `SELECT` in MySQL",
      "description": "The `SELECT` command is the main way to query the data within tables and views in MySQL.  This guide demonstrates the basic syntax and operation of this highly flexible command.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mysql/reading-and-querying-data/basic-select",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/reading-and-querying-data/basic-select.md",
      "faqs": []
    },
    {
      "path": "/mysql/reading-and-querying-data/filtering-data",
      "title": "How to filter query results in MySQL",
      "description": "This articles shows you how to use filtering clauses to limit the results for `SELECT` commands and other SQL statements.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mysql/reading-and-querying-data/filtering-data",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/reading-and-querying-data/filtering-data.md",
      "faqs": []
    },
    {
      "path": "/mysql/reading-and-querying-data/joining-tables",
      "title": "Using joins to combine data from different tables in MySQL",
      "description": "Joining tables allows you to associate and bring together related data stored in different tables in MySQL.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mysql/reading-and-querying-data/joining-tables",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/reading-and-querying-data/joining-tables.md",
      "faqs": []
    },
    {
      "path": "/mysql/reading-and-querying-data/identifying-slow-queries",
      "title": "Identifying slow queries in MySQL",
      "description": "Learn how to find long running or slow queries within MySQL.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mysql/reading-and-querying-data/identifying-slow-queries",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/reading-and-querying-data/identifying-slow-queries.md",
      "faqs": []
    },
    {
      "path": "/mysql/reading-and-querying-data/optimizing-slow-queries",
      "title": "Profiling and optimizing slow queries in MySQL",
      "description": "Understand what factors affect your querying performance in MySQL and how to fix them by using profiling methodology.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mysql/reading-and-querying-data/optimizing-slow-queries",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/reading-and-querying-data/optimizing-slow-queries.md",
      "faqs": []
    },
    {
      "path": "/mysql/reading-and-querying-data",
      "title": "Reading and querying data",
      "description": "Reading and querying data in MySQL. Including how to filter query results in MySQL, perform basic queries with `SELECT` in MySQL, and more.",
      "type": "CollectionPage",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/mysql/reading-and-querying-data",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/reading-and-querying-data.md",
      "faqs": []
    },
    {
      "path": "/mysql/tools/mysql-config-editor",
      "title": "Using `mysql_config_editor` to manage MySQL credentials",
      "description": "Manage connection information like usernames, passwords, and MySQL servers with `mysql_config_editor`.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mysql/tools/mysql-config-editor",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/tools/mysql-config-editor.md",
      "faqs": []
    },
    {
      "path": "/mysql/tools",
      "title": "Tools and utilities",
      "description": "Small tools designed to make working with MySQL more productive.",
      "type": "CollectionPage",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/mysql/tools",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/tools.md",
      "faqs": []
    },
    {
      "path": "/mysql/short-guides/creating-deleting-users",
      "title": "How to create and delete users in MySQL",
      "description": "Learn how to create MySQL users, delete users, and manage user access with this easy-to-use guide.",
      "type": "TechArticle",
      "authors": [
        "Alex Emerich"
      ],
      "url": "https://www.prisma.io/dataguide/mysql/short-guides/creating-deleting-users",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/short-guides/creating-deleting-users.md",
      "lastUpdated": "2026-09-29",
      "faqs": []
    },
    {
      "path": "/mysql/short-guides/validate-configuration",
      "title": "How to check your MySQL configuration for syntax errors",
      "description": "Learn how to check your MySQL server configuration file for syntax errors.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mysql/short-guides/validate-configuration",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/short-guides/validate-configuration.md",
      "faqs": []
    },
    {
      "path": "/mysql/short-guides/exporting-schemas",
      "title": "How to export database and table schemas in MySQL",
      "description": "Learn how to export your database objects from MySQL for analysis, migrating, backups, and more.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mysql/short-guides/exporting-schemas",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/short-guides/exporting-schemas.md",
      "faqs": []
    },
    {
      "path": "/mysql/short-guides",
      "title": "Short guides",
      "description": "Quick guides to help you be more productive with MySQL",
      "type": "CollectionPage",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/mysql/short-guides",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql/short-guides.md",
      "faqs": []
    },
    {
      "path": "/mysql",
      "title": "MySQL",
      "description": "MySQL",
      "type": "CollectionPage",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/mysql",
      "markdownUrl": "https://www.prisma.io/dataguide/mysql.md",
      "faqs": []
    },
    {
      "path": "/sqlite/setting-up-a-local-sqlite-database",
      "title": "Setting up a local SQLite database",
      "description": "Learn how to set up a SQLite database on Windows, macOS, and Linux by following the step-by-step instructions in this practical guide.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/sqlite/setting-up-a-local-sqlite-database",
      "markdownUrl": "https://www.prisma.io/dataguide/sqlite/setting-up-a-local-sqlite-database.md",
      "faqs": []
    },
    {
      "path": "/sqlite/importing-and-exporting-data-in-sqlite",
      "title": "Importing and exporting data in SQLite",
      "description": "Importing and exporting data with SQLite is fast and easy. Learn how to transfer data across the boundaries of your databases.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/sqlite/importing-and-exporting-data-in-sqlite",
      "markdownUrl": "https://www.prisma.io/dataguide/sqlite/importing-and-exporting-data-in-sqlite.md",
      "faqs": []
    },
    {
      "path": "/sqlite/creating-and-deleting-databases-and-tables",
      "title": "Creating and deleting databases and tables with SQLite",
      "description": "Learn how to create, destroy, manage, and use databases and tables using SQLite.",
      "type": "TechArticle",
      "authors": [
        "Alex Emerich"
      ],
      "url": "https://www.prisma.io/dataguide/sqlite/creating-and-deleting-databases-and-tables",
      "markdownUrl": "https://www.prisma.io/dataguide/sqlite/creating-and-deleting-databases-and-tables.md",
      "faqs": []
    },
    {
      "path": "/sqlite/inserting-and-deleting-data",
      "title": "Inserting and deleting data with SQLite",
      "description": "Learn how to insert and delete data using SQLite.",
      "type": "TechArticle",
      "authors": [
        "Alex Emerich"
      ],
      "url": "https://www.prisma.io/dataguide/sqlite/inserting-and-deleting-data",
      "markdownUrl": "https://www.prisma.io/dataguide/sqlite/inserting-and-deleting-data.md",
      "faqs": []
    },
    {
      "path": "/sqlite/basic-select",
      "title": "How to perform basic queries with `SELECT` with SQLite",
      "description": "Learn how to perform basic queries with `SELECT` using SQLite.",
      "type": "TechArticle",
      "authors": [
        "Alex Emerich"
      ],
      "url": "https://www.prisma.io/dataguide/sqlite/basic-select",
      "markdownUrl": "https://www.prisma.io/dataguide/sqlite/basic-select.md",
      "faqs": []
    },
    {
      "path": "/sqlite/update-data",
      "title": "How to update existing data with SQLite",
      "description": "Learn how to update existing data using SQLite.",
      "type": "TechArticle",
      "authors": [
        "Alex Emerich"
      ],
      "url": "https://www.prisma.io/dataguide/sqlite/update-data",
      "markdownUrl": "https://www.prisma.io/dataguide/sqlite/update-data.md",
      "lastUpdated": "2026-10-01",
      "faqs": [
        {
          "question": "How do you edit records in SQLite?",
          "answerMarkdown": "You can edit records in SQLite by using an `UPDATE` statement.\n\nThe basic syntax would look like:\n\n```sql pseudocode\nUPDATE my_table\nSET\n        column1 = value1,\n        column2 = value2\nWHERE\n        id = 1;\n```"
        },
        {
          "question": "How do you perform a bulk update in SQLite?",
          "answerMarkdown": "In SQLite, you can use the `UPDATE` command looking something like the following:\n\n```sql pseudocode\nUPDATE my_table\nSET\n        column1 = value1,\n        column2 = value2\nWHERE\n        color = 'blue';\n```\n\nThis syntax allows you to update in bulk depending on the `WHERE` criteria. In this case the columns are updated for any record where the `color` column is `'blue'`."
        },
        {
          "question": "How do you return records modified by the UPDATE command in SQLite?",
          "answerMarkdown": "By default, SQLite does not show the number of rows impacted by an `UPDATE` statement.\n\nHowever, SQLite does have the `RETURNING` clause to return all or part of the records that were modified.\n\nThe basic syntax looks like this with `*` specifying to return all column names:\n\n```sql pseudocode\nUPDATE my_table\nSET\n        column1 = value1,\n        column2 = value2\nWHERE\n        id = 1\nRETURNING *;\n```"
        },
        {
          "question": "How do you insert or update in SQLite depending on whether data exists?",
          "answerMarkdown": "In SQLite, there is not an `IF EXISTS` clause like many other relational databases.\n\nTo control an `INSERT` or `UPDATE` for data existing, you will want to add an [`ON CONFLICT` clause to your statement](https://sqlite.org/lang_conflict.html)."
        },
        {
          "question": "How do you update with join in SQLite?",
          "answerMarkdown": "To perform an `UPDATE` with a join in SQLite, you can use the [`UPDATE FROM` extension](https://www.sqlite.org/lang_update.html#upfrom). This extension to SQL allows an `UPDATE` statement to be driven by other tables in the database.\n\nWith `UPDATE-FROM`, you can join the target table against other tables in the database in order to help compute which rows need updating and what new values should be on those rows."
        }
      ]
    },
    {
      "path": "/sqlite/exporting-schemas",
      "title": "How to export database and table schemas in SQLite",
      "description": "Learn how to export your database objects from SQLite for analysis, migrating, backups, and more.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/sqlite/exporting-schemas",
      "markdownUrl": "https://www.prisma.io/dataguide/sqlite/exporting-schemas.md",
      "faqs": []
    },
    {
      "path": "/sqlite",
      "title": "SQLite",
      "description": "SQLite",
      "type": "CollectionPage",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/sqlite",
      "markdownUrl": "https://www.prisma.io/dataguide/sqlite.md",
      "faqs": []
    },
    {
      "path": "/mssql/setting-up-a-local-sql-server-database",
      "title": "Setting up a local SQL Server database",
      "description": "Run SQL Server 2025 or 2022 locally in Docker on any OS, or install it on Windows or Linux, then connect with sqlcmd and create a least-privilege login for your app.",
      "type": "TechArticle",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/mssql/setting-up-a-local-sql-server-database",
      "markdownUrl": "https://www.prisma.io/dataguide/mssql/setting-up-a-local-sql-server-database.md",
      "lastUpdated": "2026-09-30",
      "faqs": [
        {
          "question": "How do you check your SQL Server version?",
          "answerMarkdown": "Run `SELECT @@VERSION;` in `sqlcmd` or any other client, as shown [above](https://www.prisma.io/dataguide/mssql/setting-up-a-local-sql-server-database#creating-a-database-and-a-least-privilege-login). It returns the version, the cumulative update, the edition and the operating system. For just the version number and the edition, query `SELECT SERVERPROPERTY('ProductVersion'), SERVERPROPERTY('Edition');`. Version 17 is SQL Server 2025, and version 16 is SQL Server 2022."
        },
        {
          "question": "How can you download SQL Server for free?",
          "answerMarkdown": "The Developer editions and Express are free. Download them from [Microsoft's SQL Server downloads page](https://www.microsoft.com/en-us/sql-server/sql-server-downloads) for Windows, install them from Microsoft's package repositories on Linux, or run the container images, which start the Enterprise Developer edition by default."
        },
        {
          "question": "What is the SQL Server Developer edition?",
          "answerMarkdown": "A Developer edition has all the features of a paid edition for free, but it's licensed for development and testing only. See [choosing a version and edition](https://www.prisma.io/dataguide/mssql/setting-up-a-local-sql-server-database#choosing-a-version-and-edition) for SQL Server 2025's Enterprise Developer and Standard Developer editions."
        },
        {
          "question": "Can you run SQL Server on a Mac or on an ARM computer?",
          "answerMarkdown": "Not natively: SQL Server only runs on x86-64 processors. On an Apple Silicon Mac, you can run the x86-64 container image with a Docker runtime that uses Rosetta 2, as described in the [Docker section](https://www.prisma.io/dataguide/mssql/setting-up-a-local-sql-server-database#apple-silicon-and-other-arm-machines). Microsoft doesn't support running SQL Server under emulation, so use it for development only."
        },
        {
          "question": "Is Azure SQL the same as SQL Server?",
          "answerMarkdown": "[Azure SQL](https://learn.microsoft.com/en-us/azure/azure-sql/azure-sql-iaas-vs-paas-what-is-overview) is Microsoft's family of cloud products that use the SQL Server database engine. SQL Server on Azure Virtual Machines is SQL Server itself, running on a virtual machine that you manage. Azure SQL Database and Azure SQL Managed Instance are managed services: they share most features and T-SQL with SQL Server, but they aren't the same product, and some features and administrative tasks differ."
        },
        {
          "question": "What is the SQL Server Configuration Manager?",
          "answerMarkdown": "[SQL Server Configuration Manager](https://learn.microsoft.com/en-us/sql/relational-databases/sql-server-configuration-manager) is a Windows tool that's installed with SQL Server. It manages the SQL Server services and the network protocols that the server accepts connections on, such as TCP/IP. SQL Server on Linux doesn't have it; use `systemctl` and `mssql-conf` there instead."
        }
      ]
    },
    {
      "path": "/mssql",
      "title": "Microsoft SQL Server",
      "description": "Microsoft SQL Server",
      "type": "CollectionPage",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/mssql",
      "markdownUrl": "https://www.prisma.io/dataguide/mssql.md",
      "faqs": []
    },
    {
      "path": "/mongodb/what-is-mongodb",
      "title": "What is MongoDB?",
      "description": "Learn about what MongoDB is and how it works.",
      "type": "TechArticle",
      "authors": [
        "Alex Emerich"
      ],
      "url": "https://www.prisma.io/dataguide/mongodb/what-is-mongodb",
      "markdownUrl": "https://www.prisma.io/dataguide/mongodb/what-is-mongodb.md",
      "faqs": []
    },
    {
      "path": "/mongodb/setting-up-a-local-mongodb-database",
      "title": "Setting up a local MongoDB database",
      "description": "Install MongoDB Community Server 9.0 and mongosh locally with Docker, apt, dnf, Homebrew or the Windows installer, turn on authentication, and create your first database.",
      "type": "TechArticle",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/mongodb/setting-up-a-local-mongodb-database",
      "markdownUrl": "https://www.prisma.io/dataguide/mongodb/setting-up-a-local-mongodb-database.md",
      "lastUpdated": "2026-09-30",
      "faqs": []
    },
    {
      "path": "/mongodb/connecting-to-mongodb",
      "title": "Connecting to MongoDB databases",
      "description": "Learn how to connect to and authenticate to a MongoDB server to begin storing and managing your project's data.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mongodb/connecting-to-mongodb",
      "markdownUrl": "https://www.prisma.io/dataguide/mongodb/connecting-to-mongodb.md",
      "faqs": [
        {
          "question": "What happens when a MongoDB connection is refused?",
          "answerMarkdown": "Whether connecting to [MongoDB](https://docs.mongodb.com/guides/server/drivers/) locally or remotely, a connection failure will result in an error message from MongoDB. The most common sources of a connection error are an incorrect username or password, attempting to connect with a non-whitelisted IP address, or potentially too many connections to the database.\n\nYou can read more about connecting to [MongoDB](https://www.prisma.io/dataguide/mongodb/connecting-to-mongodb) database to ensure you have all of the necessary pieces."
        },
        {
          "question": "How do you connect to MongoDB remotely?",
          "answerMarkdown": "To connect to a [remote MongoDB database](https://www.prisma.io/dataguide/mongodb/connecting-to-mongodb#connecting-to-a-remote-database), you have to include additional details when using the `mongo` shell like `--host` and potentially `--port`.\n\nThe basic structure of the command will look something like:\n\n```\nmongo --host <mongo_server_address> --port <mongo_server_port> --user <mongo_username> --password\n```\n\nYour MongoDB database also will need to be configured to accept remote connections either in the [configuration file](https://docs.mongodb.com/manual/reference/configuration-options/) or the [Atlas IP whitelist](https://docs.atlas.mongodb.com/security/ip-access-list/)."
        },
        {
          "question": "How do you connect to MongoDB as an admin?",
          "answerMarkdown": "Assuming the admin user has already been created using [these steps](https://www.prisma.io/dataguide/mongodb/configuring-mongodb-user-accounts-and-authentication#how-do-you-create-users), you can use something similar to the following syntax:\n\n```\nuse admin\ndb.auth('admin','password');\n```"
        },
        {
          "question": "How do you use the MongoDB command line?",
          "answerMarkdown": "The `mongo` client is a command line JavaScript client for connecting to, controlling, and interacting with MongoDB database servers.\n\nThe way you connect and use the `mongo` shell will depend on your configuration, but you can generally begin by using the command line by typing `mongo` into the shell.\n\nMongoDB also has the `--help` add-on from the command line if needed."
        },
        {
          "question": "Can you connect to MongoDB with Java?",
          "answerMarkdown": "Yes, you can connect to [MongoDB with Java](https://docs.mongodb.com/guides/server/drivers/). The first step in the procedure will require installing the [Java driver](https://mongodb.github.io/mongo-java-driver/)."
        }
      ]
    },
    {
      "path": "/mongodb/mongodb-atlas-setup",
      "title": "Provisioning a MongoDB Atlas cluster",
      "description": "Learn how to provision a MongoDB Atlas cluster: choose between Free, Flex and Dedicated tiers, pick a region and version, lock down network access and database users, and script it all with the Atlas CLI.",
      "type": "TechArticle",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/mongodb/mongodb-atlas-setup",
      "markdownUrl": "https://www.prisma.io/dataguide/mongodb/mongodb-atlas-setup.md",
      "lastUpdated": "2026-09-30",
      "faqs": [
        {
          "question": "How do I connect BI tools such as Tableau to Atlas?",
          "answerMarkdown": "Use the [MongoDB SQL Interface](https://www.mongodb.com/docs/sql-interface/). The older BI Connector for Atlas is no longer supported after September 2026, and MongoDB recommends the SQL Interface for new projects."
        },
        {
          "question": "How do I monitor an Atlas cluster?",
          "answerMarkdown": "Atlas collects [metrics](https://www.mongodb.com/docs/atlas/monitor-cluster-metrics/) for every cluster and can alert you on them. Free and Flex clusters show only connections, logical size, network and operation counters. Dedicated clusters add the full set of metrics, the Real-Time Performance Panel and the Performance Advisor, which suggests indexes for slow queries."
        }
      ]
    },
    {
      "path": "/mongodb/configuring-mongodb-user-accounts-and-authentication",
      "title": "How to manage users and authentication in MongoDB",
      "description": "Find out how to configure user accounts and set up authentication credentials on your MongoDB server, including how to create, delete, and show list of users.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mongodb/configuring-mongodb-user-accounts-and-authentication",
      "markdownUrl": "https://www.prisma.io/dataguide/mongodb/configuring-mongodb-user-accounts-and-authentication.md",
      "faqs": [
        {
          "question": "How do you list existing users in MongoDB?",
          "answerMarkdown": "To list existing users in MongoDB, you can use the `db.getUsers()` method to show all of the users within the current database.\n\nThe syntax would look like:\n\n```\nuse admin\ndb.getUsers()\n```\n\nFor more details on [`db.getUsers()`](https://www.prisma.io/dataguide/mongodb/configuring-mongodb-user-accounts-and-authentication#how-do-you-show-existing-users)."
        },
        {
          "question": "How do you create a database admin user in MongoDB?",
          "answerMarkdown": "In order to create a [database admin user](https://www.prisma.io/dataguide/mongodb/authorization-and-privileges#what-roles-are-available-in-mongodb-by-default) in MongoDB, you will want to use the `db.createUser()` method in the `admin` database.\n\nThe following demonstrates the syntax to use for creating database admins.\n\n```\nuse admin\ndb.createUser(\n{\tuser: \"tom\",\n\tpwd: \"hellothere\",\n\n\troles:[{role: \"dbAdmin\" , db:\"admin\"}]})\n```"
        },
        {
          "question": "How do you drop a user in MongoDB?",
          "answerMarkdown": "To remove a MongoDB user you can use the `db.dropUser()` method. This needs to be done in the `admin` database, and the syntax would look like this:\n\n```\nuse admin\ndb.dropUser(\"tom\")\n```"
        },
        {
          "question": "How do you check if a database user exists in MongoDB?",
          "answerMarkdown": "To get a list of all existing users in MongoDB, you can use the `db.getUsers()` method.\n\nThe basic syntax would look like:\n\n```\nuse admin\ndb.getUsers()\n```"
        },
        {
          "question": "How can you check user privileges in MongoDB?",
          "answerMarkdown": "To query for a [specific user](https://www.prisma.io/dataguide/mongodb/configuring-mongodb-user-accounts-and-authentication#how-do-you-show-existing-users), you can use the `db.getUser()` method with the `showPrivileges` `arg` set to `true`.\n\nThe basic syntax would look like:\n\n```\nuse admin\ndb.getUser(\"tom\",\n{\n    showPrivileges: true,\n})\n```"
        }
      ]
    },
    {
      "path": "/mongodb/authorization-and-privileges",
      "title": "How to manage authorization and privileges in MongoDB",
      "description": "Learn how to use MongoDB's authorization and privilege systems to manage access to your data, including how to assign roles to your user list.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mongodb/authorization-and-privileges",
      "markdownUrl": "https://www.prisma.io/dataguide/mongodb/authorization-and-privileges.md",
      "faqs": [
        {
          "question": "Can you create read-only users in MongoDB?",
          "answerMarkdown": "There are two built-in roles for read-only users in MongoDB. A user can either be assigned to the `read` role or `readAnyDatabase` role.\n\n`read` provides the ability to read data on all non-system collections.\n\n`readAnyDatabase` provides the same capabilities as `read` except it also provides the ability to use the `listDatabases` action on a cluster as a whole."
        },
        {
          "question": "What is a cluster monitor role in MongoDB?",
          "answerMarkdown": "The [`clusterMonitor`](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-clusterMonitor) role provides read-only access to monitoring tools, such as the MongoDB Cloud Manager and Ops Manager monitoring agent."
        },
        {
          "question": "What is a backup role in MongoDB?",
          "answerMarkdown": "The `backup` role provides minimal privileges needed for backing up data. This role provides sufficient privileges to use the MongoDB Cloud and Ops Manager backup agents.\n\nIt also has permissions to run `insert` and `update` actions on backup collections in the `admin` , `settings`, and `config` databases."
        },
        {
          "question": "What is root in MongoDB?",
          "answerMarkdown": "The `root` role in MongoDB provides access to all of the operations and resources of the following roles combined:\n\n- `readWriteAnyDatabase`\n- `dbAdminAnyDatabase`\n- `userAdminAnyDatabase`\n- `clusterAdmin`\n- `restore`\n- `backup`"
        },
        {
          "question": "What is Role-Based Access Control (RBAC) in MongoDB?",
          "answerMarkdown": "MongoDB employs [RBAC](https://www.mongodb.com/docs/manual/core/authorization/#role-based-access-control) to govern access to a MongoDB system. RBAC is a security strategy that restricts the operations permitted to a user based on their assigned roles.\n\nMongoDB does not allow operations or access to a database if a user does not have an assigned role."
        }
      ]
    },
    {
      "path": "/mongodb/creating-dbs-and-collections",
      "title": "How to manage databases and collections in MongoDB",
      "description": "In this guide, we'll cover how to create and manage databases and collections in MongoDB.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mongodb/creating-dbs-and-collections",
      "markdownUrl": "https://www.prisma.io/dataguide/mongodb/creating-dbs-and-collections.md",
      "faqs": [
        {
          "question": "Can you create multiple collections in MongoDB?",
          "answerMarkdown": "Yes, you can have multiple collections within a [database in MongoDB](https://docs.mongodb.com/manual/core/databases-and-collections/). Collections can be thought of as analogous to tables in relational databases."
        },
        {
          "question": "How do you delete all databases in MongoDB?",
          "answerMarkdown": "There is not a single command to drop every database in MongoDB, but it is possible with a [script or series of queries](https://stackoverflow.com/questions/6376436/mongodb-drop-every-database).\n\nTo drop a database, the basic syntax looks like:\n\n```\nuse playground\ndb.dropDatabase()\n```"
        },
        {
          "question": "How do you rename a collection in MongoDB?",
          "answerMarkdown": "To rename a collection in MongoDB, you can use the [`renameCollection()`](https://docs.mongodb.com/manual/reference/method/db.collection.renameCollection/) method.\n\nThe basic syntax would look like:\n\n```\ndb.collectionName.renameCollection(\"new collection name\")\n```\n\nWith `collectionName` being the the current name of the collection and `\"new collection name\"` being the desired change."
        },
        {
          "question": "How do you list all collections in MongoDB?",
          "answerMarkdown": "You can show all the available collections in the database you are working in my using the `show collections` method.\n\nIf you want to see all of the collections in the `admin` database, the basic syntax would look like:\n\n```\nuse admin\nshow collections\n```\n\nAlternatively, you can also use the `db.getCollectionNames()` method to get the same results in an array.\n\n```\ndb.getCollectionNames()\n```\n\n```\n[ \"system.roles\", \"system.users\", \"system.version\" ]\n```"
        },
        {
          "question": "How do you list collections with C#?",
          "answerMarkdown": "In order to use MongoDB with C#, you will need to download the [compatible driver](https://docs.mongodb.com/drivers/csharp/) version of C#.\n\nOnce downloaded, you will be able to conduct [read operations with C#](https://www.mongodb.com/blog/post/quick-start-c-and-mongodb-read-operations) such as listing collections."
        }
      ]
    },
    {
      "path": "/mongodb/managing-documents",
      "title": "How to manage documents in MongoDB",
      "description": "Read on to learn how to create and manage documents within MongoDB, including how to delete, update, query, and more.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mongodb/managing-documents",
      "markdownUrl": "https://www.prisma.io/dataguide/mongodb/managing-documents.md",
      "faqs": [
        {
          "question": "What is an embedded document in MongoDB?",
          "answerMarkdown": "An [embedded, or nested, document](https://www.mongodb.com/basics/embedded-mongodb) in MongoDB is a document which contains another document inside of it.\n\nThe following is an example of an embedded document where `address` —denoted as a subdocument by additional curly brackets— can be accessed with the `user` record.\n\n```\ndb.user.findOne({_id: 111111})\n\n{\n    _id: 111111,\n    email: “email@example.com”,\n    name: {given: “Jane”, family: “Han”},\n    address: {\n    street: “111 Elm Street”,\n    city: “Springfield”,\n    state: “Ohio”,\n    country: “US”,\n    zip: “00000”,\n    }\n}\n```"
        },
        {
          "question": "What is the MongoDB maximum document size limit?",
          "answerMarkdown": "The maximum document size in MongoDB is 16 megabytes.\n\nThis limitation helps ensure that a single document cannot use an excessive amount of RAM or, during transmission, excessive amount of bandwidth.\n\nTo store documents larger than 16mb, MongoDB provides the [GridFS API](https://docs.mongodb.com/database-tools/mongofiles/#mongodb-binary-bin.mongofiles)."
        },
        {
          "question": "How do you delete a document in MongoDB?",
          "answerMarkdown": "To remove documents, you can either use the `deleteOne()` or `deleteMany()` methods. They have the same syntax, and differ only in how many documents they operate on.\n\nTo delete a single document, the basic syntax looks as follows for removing a document with a specific `_id`:\n\n```\ndb.students.deleteOne({\n\t_id: ObjectId(\"60e8792d4655cbf49ff7cb87\")\n})\n```\n\nAnd to delete many documents matching a certain criteria, the syntax looks similarly:\n\n```\ndb.students.deleteMany({\n    grade_level: { $eq: null }\n})\n```"
        },
        {
          "question": "How do you append to a document in MongoDB?",
          "answerMarkdown": "To modify documents in MongoDB, there are a few [related update methods](https://www.prisma.io/dataguide/mongodb/managing-documents#how-to-update-existing-documents).\n\nSpecifically, for appending new data to a document, you can use the `$addToSet` [update operator](https://www.prisma.io/dataguide/mongodb/managing-documents#update-operators). This operator adds values to the array of the document unless they're already present."
        },
        {
          "question": "How do you compare two documents in MongoDB?",
          "answerMarkdown": "There is not a specific method to explicitly compare one document to another in MongoDB. It can be done by configuring a query comparing equality between any of the documents' fields with [operators](https://docs.mongodb.com/manual/reference/operator/query/).\n\nComparison can also be done by configuring an [aggregation pipeline](https://docs.mongodb.com/manual/aggregation/). This method allows you to create stages that:\n\n- group values from multiple documents together\n- perform operations on the grouped data to return a single result\n- analyze data changes over time"
        }
      ]
    },
    {
      "path": "/mongodb/querying-documents",
      "title": "How to query and filter documents in MongoDB",
      "description": "In this guide, we'll cover how to query and retrieve documents in MongoDB.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mongodb/querying-documents",
      "markdownUrl": "https://www.prisma.io/dataguide/mongodb/querying-documents.md",
      "faqs": [
        {
          "question": "What is the query for finding dates greater than ‘x’ in MongoDB?",
          "answerMarkdown": "You can use the `$gt` operator within a find statement to find documents with a date field greater than a specific date.\n\nThe basic syntax looks like the following:\n\n```\ndb.collection.find( { <Field Name>: { $gt:ISODate('Date here') } } )\n```"
        },
        {
          "question": "What is the MongoDB query profiler?",
          "answerMarkdown": "[The MongoDB Database query profiler](https://www.mongodb.com/docs/manual/tutorial/manage-the-database-profiler/) is a tool that collects detailed information about database commands executed against a running `mongod` instance.\n\nThis includes CRUD operations as well as configuration and administrative commands. This can be particularly useful when trying to sort for slow operations."
        },
        {
          "question": "What is the MongoDB query for string length?",
          "answerMarkdown": "To query for how long the length of a string is, you can use the `$strLenCP` operator. This operator returns the number of UTF-8 code points for a specified string.\n\nThe basic syntax looks as follows:\n\n```\n{ $strLenCP: \"Hello World!\" }\n```\n\nThis particular string will return a value of `12`."
        },
        {
          "question": "What is the MongoDB query to find distinct values?",
          "answerMarkdown": "To query for only unique values of a field within a greater collection, you can use the `distinct()` method.\n\nThe basic syntax looks like:\n\n```\ndb.collection.distinct(\"<Field_Name>\")\n```\n\nThis returns all of the unique values within the collection for a particular field with no repetition."
        },
        {
          "question": "What is the export to JSON query in MongoDB?",
          "answerMarkdown": "You can export your database contents to JSON with the `mongoexport` command line tool. It is important to note that this should not be run within the `mongo` shell but the command line instead.\n\nThe basic syntax looks as follows where we specify the output of the collection export to be `json`:\n\n```\nmongoexport --collection=events --db=reporting --out=events.json\n```"
        }
      ]
    },
    {
      "path": "/mongodb/mongodb-datatypes",
      "title": "Introduction to MongoDB data types",
      "description": "In this guide, we'll cover data types in MongoDB.",
      "type": "TechArticle",
      "authors": [
        "Alex Emerich"
      ],
      "url": "https://www.prisma.io/dataguide/mongodb/mongodb-datatypes",
      "markdownUrl": "https://www.prisma.io/dataguide/mongodb/mongodb-datatypes.md",
      "faqs": [
        {
          "question": "Can you store regular expression patterns in MongoDB?",
          "answerMarkdown": "Yes, MongoDB allows for the storage of regular expression with the [`Regular Expression` data type](https://www.prisma.io/dataguide/mongodb/mongodb-datatypes#regular-expression).\n\nFor instance, you can insert the `Regular Expression` data type like this:\n\n```sql\ndb.mytestcoll.insertOne({exampleregex: /tt/})\n{\n        \"acknowledged\": true,\n        \"insertedId\": ObjectId(\"614b37296a124db40ae74d16\")\n}\ndb.mytestcoll.insertOne({exampleregext:/t+/})\n{\n        \"acknowledged\": true,\n        \"insertedId\": ObjectId(\"614b37296a124db40ae74d17\")\n}\n```"
        },
        {
          "question": "How are dates represented as a data type in MongoDB?",
          "answerMarkdown": "[BSON Date](https://docs.mongodb.com/manual/reference/bson-types/#std-label-document-bson-type-date) is a 64-bit integer that represents the number of milliseconds since the [Unix Epoch](https://en.wikipedia.org/wiki/Unix_time).\n\nThere are three methods for returning date values.\n\n`Date()` - returns a string\n\n`new Date()` - returns a date object using the ISODate() wrapper\n\n`ISODate()` - also returns a date object using the ISODate() wrapper\n\nThe [returned data's display](https://www.prisma.io/dataguide/mongodb/mongodb-datatypes#date) depends on which method it is stored."
        },
        {
          "question": "Does MongoDB support transactional data?",
          "answerMarkdown": "Yes, MongoDB supports both single document structure and multi-document structure for transactional data.\n\nAn [API](https://docs.mongodb.com/manual/core/transactions/#transactions-api) and other [operations](https://docs.mongodb.com/manual/core/transactions/#transactions-and-operations) are also available to use with transactional data."
        },
        {
          "question": "How does MongoDB store images?",
          "answerMarkdown": "For images less than 16MB in size, MongoDB can store images using the [`BinData`](https://www.prisma.io/dataguide/mongodb/mongodb-datatypes#binary-data) data type.\n\nFor images greater than 16MB, MongoDB recommends using [GridFS](https://docs.mongodb.com/manual/core/gridfs/#when-to-use-gridfs) for storing in your database."
        },
        {
          "question": "Can MongoDB store arrays?",
          "answerMarkdown": "Yes, MongoDB can store arrays with the BSON Array type. It is represented in MongoDB as follows:\n\n```\n       Type         | Number |     Alias    |\n ------------------ | ------ | ------------ |\n       Array        |    4   |    \"array\"   |\n```"
        }
      ]
    },
    {
      "path": "/mongodb/mongodb-indexes",
      "title": "Introduction to MongoDB indexes",
      "description": "In this guide we will cover everything you need to know about MongoDB indexes, from how to drop, show, create, and use them.",
      "type": "TechArticle",
      "authors": [
        "Alex Emerich"
      ],
      "url": "https://www.prisma.io/dataguide/mongodb/mongodb-indexes",
      "markdownUrl": "https://www.prisma.io/dataguide/mongodb/mongodb-indexes.md",
      "faqs": [
        {
          "question": "What is a 2d index in MongoDB?",
          "answerMarkdown": "Use a [`2d` index](https://www.mongodb.com/docs/manual/core/2d/#2d-indexes) for data stored as points on a two-dimensional plane. It is intended for legacy coordinate pairs on older MongoDB versions.\n\nA `2d` index can reference two fields. The first must be the location field. A `2d` compound index constructs queries that select first on the location field, and then filters those results by the additional criteria."
        },
        {
          "question": "How do you create an index on a large collection in MongoDB?",
          "answerMarkdown": "Whether a small or large collection, you will still use the `createIndex()` method.\n\nIf you are running into issues building an index on a larger collection, then you may want to consider horizontal scaling so that it is more manageable.\n\nMongoDB also recommends a [rolling index build](https://www.mongodb.com/docs/manual/tutorial/build-indexes-on-replica-sets/#rolling-index-builds-on-replica-sets) approach."
        },
        {
          "question": "How do you index embedded object fields in MongoDB?",
          "answerMarkdown": "In order to index and embedded object field in MongoDB, you can use dot notation.\n\nFor example, if you have an app for tracking books read, then there might be a collection for each user structured like the following:\n\n```\ndb.users.insertOne({\n\t\"first_name\": \"Alex\",\n\t\"last_name\": \"Emerich\",\n\t\"books\": {\n\t\t\"first_book\": {\n\t\t\t\"title\": \"Flights\",\n\t\t\t\"author\": \"Olga Tokarczuk\"\n\t\t},\n\t\t\"second book\": {\n\t\t\t\"title\": \"The Master and Margarita\",\n\t\t\t\"author\": \"Mikhail Bulgakov\"\n\t\t},\n\t\t\"total\": 2\n\t}\n})\n```\n\nIn order to create an index on the embedded `total` field, write the following statement:\n\n```\ndb.users.createIndex( {\"books.total\": 1 } )\n```"
        },
        {
          "question": "What is a compound index in MongoDB?",
          "answerMarkdown": "A compound index is a single index structure that holds reference to multiple fields within a collection’s documents.\n\nThe basic syntax to create a compound index is as follows:\n\n```\ndb.collection.createIndex( { <field1>: <type>, <field2>: <type2>, ... } )\n```"
        },
        {
          "question": "What is a non unique index in MongoDB?",
          "answerMarkdown": "A unique index ensures that no two rows of a table have duplicate values in the indexed column or columns. In the case of MongoDB, it is a duplicate value in a document’s field or fields.\n\nA non-unique index does not impose this restriction."
        }
      ]
    },
    {
      "path": "/mongodb/mongodb-transactions",
      "title": "Introduction to MongoDB transactions",
      "description": "In this guide, we'll cover transactions in MongoDB, including how to appropriately use them within the document model.",
      "type": "TechArticle",
      "authors": [
        "Alex Emerich"
      ],
      "url": "https://www.prisma.io/dataguide/mongodb/mongodb-transactions",
      "markdownUrl": "https://www.prisma.io/dataguide/mongodb/mongodb-transactions.md",
      "lastUpdated": "2026-10-01",
      "faqs": [
        {
          "question": "Can you use MongoDB transactions in Node.js?",
          "answerMarkdown": "Yes, MongoDB transactions can be used in Node.js.\n\nMongoDB provides a helpful getting started guide for [“How to Use MongoDB Transaction in Node.js”](https://www.mongodb.com/blog/post/quick-start-nodejs--mongodb--how-to-implement-transactions)."
        },
        {
          "question": "What are MongoDB ACID transactions?",
          "answerMarkdown": "ACID is an acronym for atomicity, consistency, isolation, and durability. All of these properties have to do with keeping the database in a valid state.\n\nBecause a transaction is a group of database operation being conducted together, ensuring database validity in the event of unexpected errors is critical. ACID compliant transactions secure against invalid database states."
        },
        {
          "question": "How do you rollback transactions in MongoDB?",
          "answerMarkdown": "MongoDB transactions exist within sessions. You create a session using `startSession()` and follow with `session.startTransaction()` to stage your transaction operations to be committed.\n\nTo intentionally rollback those changes, you can use the `session.abortTransaction()` method to discard the operations initiated in the session. This must take place prior to the `session.commitTransaction()` method."
        },
        {
          "question": "What are some MongoDB transaction performance best practices?",
          "answerMarkdown": "There are several transactions best practices to consider when using MongoDB. You will want make sure that you are optimizing to keep transaction runtime within 60 seconds of starting because MongoDB will automatically abort anything longer.\n\nThe number of operations in a transaction should be no more than 1,000 documents modified within a transaction. Additionally, since several operations are happening within a transaction, it’s important to choose the appropriate read and write concerns. MongoDB provides a thorough [best practices guide](https://www.mongodb.com/blog/post/performance-best-practices-transactions-and-read--write-concerns) that covers this and much more."
        },
        {
          "question": "Does MongoDB support multi-document transactions?",
          "answerMarkdown": "Yes, MongoDB supports [multi document ACID transactions](https://www.mongodb.com/blog/post/mongodb-multi-document-acid-transactions-general-availability) in MongoDB 4.0 versions and later."
        }
      ]
    },
    {
      "path": "/mongodb/connection-uris",
      "title": "Introduction to MongoDB connection URIs",
      "description": "Learn how to encode MongoDB connection details in connection URIs for applications and libraries, including authentication details and other parameters.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mongodb/connection-uris",
      "markdownUrl": "https://www.prisma.io/dataguide/mongodb/connection-uris.md",
      "faqs": []
    },
    {
      "path": "/mongodb/working-with-dates",
      "title": "Working with dates and times in MongoDB",
      "description": "Learn how to store and manage date information in MongoDB.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mongodb/working-with-dates",
      "markdownUrl": "https://www.prisma.io/dataguide/mongodb/working-with-dates.md",
      "faqs": []
    },
    {
      "path": "/mongodb/mongodb-encryption",
      "title": "How MongoDB encrypts data",
      "description": "The need for data encryption is even more paramount for organizations handling sensitive information. Learn how MongoDB encrypts data to ensure security.",
      "type": "TechArticle",
      "authors": [
        "Alex Emerich"
      ],
      "url": "https://www.prisma.io/dataguide/mongodb/mongodb-encryption",
      "markdownUrl": "https://www.prisma.io/dataguide/mongodb/mongodb-encryption.md",
      "faqs": []
    },
    {
      "path": "/mongodb/mongodb-database-tools",
      "title": "Introduction to MongoDB database tools & utilities",
      "description": "No matter the database you are working with, there are likely database tools available to help. Learn about MongoDB Database Tools & Utilities",
      "type": "TechArticle",
      "authors": [
        "Alex Emerich"
      ],
      "url": "https://www.prisma.io/dataguide/mongodb/mongodb-database-tools",
      "markdownUrl": "https://www.prisma.io/dataguide/mongodb/mongodb-database-tools.md",
      "faqs": []
    },
    {
      "path": "/mongodb/mongodb-sorting",
      "title": "How to sort query results in MongoDB",
      "description": "Learn how to sort MongoDB data in ascending and descending order, with single or multiple fields, including by date.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/mongodb/mongodb-sorting",
      "markdownUrl": "https://www.prisma.io/dataguide/mongodb/mongodb-sorting.md",
      "faqs": []
    },
    {
      "path": "/mongodb/mongodb-aggregation-framework",
      "title": "Introduction to MongoDB Aggregation Framework",
      "description": "Learn about MongoDB's Aggregation Framework and how to break complex logic into stages.",
      "type": "TechArticle",
      "authors": [
        "Alex Emerich"
      ],
      "url": "https://www.prisma.io/dataguide/mongodb/mongodb-aggregation-framework",
      "markdownUrl": "https://www.prisma.io/dataguide/mongodb/mongodb-aggregation-framework.md",
      "faqs": []
    },
    {
      "path": "/mongodb",
      "title": "MongoDB",
      "description": "MongoDB",
      "type": "CollectionPage",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/mongodb",
      "markdownUrl": "https://www.prisma.io/dataguide/mongodb.md",
      "faqs": []
    },
    {
      "path": "/database-tools/top-nodejs-orms-query-builders-and-database-libraries",
      "title": "Node.js ORMs, query builders and database libraries in 2026",
      "description": "A September 2026 comparison of Node.js and TypeScript ORMs and query builders (Drizzle, MikroORM, Prisma ORM, Sequelize, TypeORM, Mongoose, Knex.js and Kysely), with figures you can check.",
      "type": "TechArticle",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/database-tools/top-nodejs-orms-query-builders-and-database-libraries",
      "markdownUrl": "https://www.prisma.io/dataguide/database-tools/top-nodejs-orms-query-builders-and-database-libraries.md",
      "lastUpdated": "2026-09-30",
      "faqs": []
    },
    {
      "path": "/database-tools/evaluating-type-safety-in-the-top-8-typescript-orms",
      "title": "Evaluating type safety in TypeScript ORMs and query builders (2026)",
      "description": "Compare eight TypeScript database libraries with independently executed compiler and runtime checks, exact dependency locks and published reproduction projects.",
      "type": "TechArticle",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/database-tools/evaluating-type-safety-in-the-top-8-typescript-orms",
      "markdownUrl": "https://www.prisma.io/dataguide/database-tools/evaluating-type-safety-in-the-top-8-typescript-orms.md",
      "lastUpdated": "2026-10-01",
      "faqs": []
    },
    {
      "path": "/database-tools/connection-pooling",
      "title": "What is connection pooling and how does it work?",
      "description": "Learn how connection pooling helps databases handle more clients with the same resources.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/database-tools/connection-pooling",
      "markdownUrl": "https://www.prisma.io/dataguide/database-tools/connection-pooling.md",
      "lastUpdated": "2026-10-01",
      "faqs": []
    },
    {
      "path": "/database-tools",
      "title": "Database tools",
      "description": "Database tools",
      "type": "CollectionPage",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/database-tools",
      "markdownUrl": "https://www.prisma.io/dataguide/database-tools.md",
      "faqs": []
    },
    {
      "path": "/managing-databases/database-troubleshooting",
      "title": "Troubleshooting database outages and connection issues",
      "description": "Learn about the possible reasons your database might be down or not connected and what you can do to fix it.",
      "type": "TechArticle",
      "authors": [
        "Ryan Chenkie",
        "Daniel Norman"
      ],
      "url": "https://www.prisma.io/dataguide/managing-databases/database-troubleshooting",
      "markdownUrl": "https://www.prisma.io/dataguide/managing-databases/database-troubleshooting.md",
      "faqs": []
    },
    {
      "path": "/managing-databases/how-to-spot-bottlenecks-in-performance",
      "title": "How to spot bottlenecks in performance",
      "description": "The culprit for many application performance issues can be traced back to the database. In this article, we cover some of the most common performance bottlenecks that you might run into and what to do about them",
      "type": "TechArticle",
      "authors": [
        "Ryan Chenkie",
        "Daniel Norman"
      ],
      "url": "https://www.prisma.io/dataguide/managing-databases/how-to-spot-bottlenecks-in-performance",
      "markdownUrl": "https://www.prisma.io/dataguide/managing-databases/how-to-spot-bottlenecks-in-performance.md",
      "faqs": []
    },
    {
      "path": "/managing-databases/syncing-development-databases-between-team-members",
      "title": "Syncing development databases between team members",
      "description": "Working on a team means you need to keep database changes in-sync between developers. Discover several ways to approach database syncing in this guide.",
      "type": "TechArticle",
      "authors": [
        "Ryan Chenkie"
      ],
      "url": "https://www.prisma.io/dataguide/managing-databases/syncing-development-databases-between-team-members",
      "markdownUrl": "https://www.prisma.io/dataguide/managing-databases/syncing-development-databases-between-team-members.md",
      "lastUpdated": "2026-10-01",
      "faqs": []
    },
    {
      "path": "/managing-databases/database-replication/database-replication-introduction",
      "title": "Introduction to database replication and its benefits",
      "description": "In this article, we cover what database replication is and its most common benefits. Learn more about the advantages of database replication.",
      "type": "TechArticle",
      "authors": [
        "Alex Emerich"
      ],
      "url": "https://www.prisma.io/dataguide/managing-databases/database-replication/database-replication-introduction",
      "markdownUrl": "https://www.prisma.io/dataguide/managing-databases/database-replication/database-replication-introduction.md",
      "lastUpdated": "2026-09-29",
      "faqs": []
    },
    {
      "path": "/managing-databases/database-replication",
      "title": "Database replication",
      "description": "Database Replication",
      "type": "CollectionPage",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/managing-databases/database-replication",
      "markdownUrl": "https://www.prisma.io/dataguide/managing-databases/database-replication.md",
      "faqs": []
    },
    {
      "path": "/managing-databases/introduction-to-OLAP-OLTP",
      "title": "Introduction to OLAP and OLTP",
      "description": "Introduction to OLAP and OLTP",
      "type": "TechArticle",
      "authors": [
        "Alex Emerich"
      ],
      "url": "https://www.prisma.io/dataguide/managing-databases/introduction-to-OLAP-OLTP",
      "markdownUrl": "https://www.prisma.io/dataguide/managing-databases/introduction-to-OLAP-OLTP.md",
      "faqs": []
    },
    {
      "path": "/managing-databases/microservices-vs-monoliths",
      "title": "How microservices and monoliths impact the database",
      "description": "How microservices and monoliths impact the database",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/managing-databases/microservices-vs-monoliths",
      "markdownUrl": "https://www.prisma.io/dataguide/managing-databases/microservices-vs-monoliths.md",
      "faqs": []
    },
    {
      "path": "/managing-databases/introduction-database-caching",
      "title": "Introduction to database caching",
      "description": "An introduction to database caching strategies and their benefits.",
      "type": "TechArticle",
      "authors": [
        "Alex Emerich"
      ],
      "url": "https://www.prisma.io/dataguide/managing-databases/introduction-database-caching",
      "markdownUrl": "https://www.prisma.io/dataguide/managing-databases/introduction-database-caching.md",
      "faqs": []
    },
    {
      "path": "/managing-databases/testing-in-production",
      "title": "Introduction to testing in production",
      "description": "An introduction to testing in production, its advantages, challenges, and more.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/managing-databases/testing-in-production",
      "markdownUrl": "https://www.prisma.io/dataguide/managing-databases/testing-in-production.md",
      "faqs": []
    },
    {
      "path": "/managing-databases/backup-considerations",
      "title": "Introduction to database backup considerations",
      "description": "Learn about the choices you will need to make when developing a database backup strategy.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/managing-databases/backup-considerations",
      "markdownUrl": "https://www.prisma.io/dataguide/managing-databases/backup-considerations.md",
      "lastUpdated": "2026-10-01",
      "faqs": []
    },
    {
      "path": "/managing-databases/intro-to-full-text-search",
      "title": "Introduction to full-text search",
      "description": "Learn about full-text search is and how to control the indexing and querying processes for better results.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/managing-databases/intro-to-full-text-search",
      "markdownUrl": "https://www.prisma.io/dataguide/managing-databases/intro-to-full-text-search.md",
      "lastUpdated": "2026-09-29",
      "faqs": []
    },
    {
      "path": "/managing-databases",
      "title": "Managing databases",
      "description": "Managing databases",
      "type": "CollectionPage",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/managing-databases",
      "markdownUrl": "https://www.prisma.io/dataguide/managing-databases.md",
      "faqs": []
    },
    {
      "path": "/serverless/what-is-serverless",
      "title": "What is serverless?",
      "description": "Learn what serverless computing, applications, and architecture mean for databases, and why these might be helpful for your projects.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/serverless/what-is-serverless",
      "markdownUrl": "https://www.prisma.io/dataguide/serverless/what-is-serverless.md",
      "faqs": [
        {
          "question": "What is serverless architecture?",
          "answerMarkdown": "Serverless architecture is a way to build and run applications and services without having to manage infrastructure.\n\nYour application still runs on servers, but all the server management is done by a provider."
        },
        {
          "question": "What is a serverless application?",
          "answerMarkdown": "A serverless application is an application that is build with a serverless architecture.\n\nYour application does not require you to provision or manage any servers."
        },
        {
          "question": "How do you secure serverless applications?",
          "answerMarkdown": "Because being serverless inherently cedes control of the infrastructure to the provider, they provide such security services as key management, authentication, and authorization.\n\n[Serverless security](https://www.checkpoint.com/cyber-hub/cloud-security/what-is-serverless-security/) requires a change in mindset in how you view application security since security is not built around the application itself. Providers handle security around the functions of the application."
        },
        {
          "question": "What is a serverless backend?",
          "answerMarkdown": "A [serverless backend](https://www.prisma.io/dataguide/serverless/what-is-serverless#serverless-databases) is the application of the serverless paradigm to database functionality.\n\nIn practice, this means that the backend server resources, scaling, data management is abstracted from the user. The user can use the database as an API-driven service that eliminates the need to plan capacity."
        },
        {
          "question": "What is serverless computing?",
          "answerMarkdown": "Serverless computing is a paradigm where users can create functions, or computational logic, that will be executed by the provider when an API is hit.\n\nBecause of this, serverless computing providers are often referred to as Functions as a Service (FaaS) platforms."
        }
      ]
    },
    {
      "path": "/serverless/serverless-comparison",
      "title": "Comparing serverless computing and database providers",
      "description": "Where to find current runtimes, limits and billing for AWS Lambda, Azure Functions, Google Cloud Functions, Cloudflare Workers, Netlify, Vercel and serverless databases, and what to compare.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/serverless/serverless-comparison",
      "markdownUrl": "https://www.prisma.io/dataguide/serverless/serverless-comparison.md",
      "lastUpdated": "2026-10-01",
      "faqs": []
    },
    {
      "path": "/serverless/serverless-challenges",
      "title": "Introduction to common serverless challenges",
      "description": "There are some important disadvantages of serverless computing. Read on to learn about common serverless challenges like cold starts, lock-in, and more.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/serverless/serverless-challenges",
      "markdownUrl": "https://www.prisma.io/dataguide/serverless/serverless-challenges.md",
      "faqs": []
    },
    {
      "path": "/serverless/traditional-vs-serverless-databases",
      "title": "Traditional databases vs serverless databases",
      "description": "Learn about the advantages, disadvantages, and comparisons of self-managed databases, managed databases, and serverless databases.",
      "type": "TechArticle",
      "authors": [
        "Justin Ellingwood"
      ],
      "url": "https://www.prisma.io/dataguide/serverless/traditional-vs-serverless-databases",
      "markdownUrl": "https://www.prisma.io/dataguide/serverless/traditional-vs-serverless-databases.md",
      "faqs": []
    },
    {
      "path": "/serverless/serverless-glossary",
      "title": "Serverless glossary",
      "description": "Learn the terminology associated with serverless.",
      "type": "TechArticle",
      "authors": [
        "Alex Emerich"
      ],
      "url": "https://www.prisma.io/dataguide/serverless/serverless-glossary",
      "markdownUrl": "https://www.prisma.io/dataguide/serverless/serverless-glossary.md",
      "faqs": []
    },
    {
      "path": "/serverless",
      "title": "Serverless architecture",
      "description": "How serverless providers help you build applications without managing servers",
      "type": "CollectionPage",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/serverless",
      "markdownUrl": "https://www.prisma.io/dataguide/serverless.md",
      "faqs": []
    },
    {
      "path": "/just-for-fun/us-most-popular-databases-by-states",
      "title": "The United States' most popular databases by state going into 2022",
      "description": "Want to know which databases are most popular throughout the US? Check out the map to see which is each state’s favorite - the results may surprise you!",
      "type": "TechArticle",
      "authors": [
        "Alex Emerich"
      ],
      "url": "https://www.prisma.io/dataguide/just-for-fun/us-most-popular-databases-by-states",
      "markdownUrl": "https://www.prisma.io/dataguide/just-for-fun/us-most-popular-databases-by-states.md",
      "faqs": []
    },
    {
      "path": "/just-for-fun",
      "title": "Just for fun",
      "description": "A collection of interesting and just for fun topics",
      "type": "CollectionPage",
      "authors": [],
      "url": "https://www.prisma.io/dataguide/just-for-fun",
      "markdownUrl": "https://www.prisma.io/dataguide/just-for-fun.md",
      "faqs": []
    }
  ]
}
