MySQL and PostgreSQL Schema Guides

Choose data types, define foreign keys, design useful indexes, compare DDL, and understand the schema-level differences between MySQL and PostgreSQL.

Guides in this topic

MySQL Foreign Keys

Apply foreign-key syntax, index requirements, and referential actions.

MySQL Indexes

Design B-tree and composite indexes around the leftmost-prefix rule.