Skip to main content

Cockroach University: The Primary Key and the Primary Index

In this Cockroach University lesson titled “The Primary Key and the Primary Index,” you’ll learn how to differentiate between the Primary Key and Primary Index. Then we’ll discuss multi-column Primary Keys. In this lesson, you will learn: •The difference between a primary key and a primary index •The difference between a single-column primary key and a composite key Learn more about CockroachDB by signing up for free training at Cockroach University: https://university.cockroachlabs.com/ --------------------------------------------------------------------------------------------------------------------------- Reference Links •Primary Key Constraint: https://www.cockroachlabs.com/docs/stable/primary-key.html (CockroachDB Docs) •Index Creation: https://www.cockroachlabs.com/docs/stable/indexes.html#creation (CockroachDB Docs) •Choosing Index Keys for CockroachDB: https://www.cockroachlabs.com/blog/how-to-choose-db-index-keys/ (Cockroach Labs Blog post by Ben Darnell) --------------------------------------------------------------------------------------------------------------------------- Careers: https://www.cockroachlabs.com/careers CockroachCloud: https://www.cockroachlabs.com/product/cockroachcloud/ Blog: https://www.cockroachlabs.com/blog/ Docs: https://www.cockroachlabs.com/docs/stable/ Community Slack: https://cockroa.ch/Welcome-to-Slack Twitter: https://twitter.com/CockroachDB