Loading topic
SELECT, INSERT, UPDATE, and DELETE statements. It also assumes you can create a table with CREATE TABLE and pick column data types. Finally, you should know what rows, columns, and NULL mean. Examples use PostgreSQL syntax. Other databases differ 5 min readCREATE TABLE statements, know the basic column constraints (NOT NULL, UNIQUE), and understand NULL as "unknown or missing". It covers the idea that comes before choosing a primary key: which sets of columns could identify a row.4 min readCREATE TABLE, know that a primary key is UNIQUE and NOT NULL, and have seen a foreign key with REFERENCES. It covers how to choose what a primary key is made of. Examples use PostgreSQL syntax.5 min readCREATE TABLE, INSERT, and basic SELECT statements, and that you know a primary key must be unique and not null. It also assumes you have read the chapter on natural versus surrogate keys. Here you learn how the database produces surrogate key values, which op4 min readCREATE TABLE statements, know the basic constraints NOT NULL and UNIQUE, and have seen a single-column primary key. Examples use PostgreSQL syntax.4 min readCREATE TABLE statements, pick column 4 min readINSERT, UPDATE, and DELETE statements and can create tables with CREATE TABLE. It also assumes you have seen a PRIMARY KEY and a REFERENCES clause. Here you will learn exactly which statements a foreign key blocks, what the error looks like, and t5 min readCREATE TABLE, INSERT, UPDATE, and DELETE, and that you know what a primary key and a foreign key are. The examples use PostgreSQL syntax.5 min readCREATE TABLE statements, know what a primary key and a foreign key constraint are, and can run basic SELECT, INSERT, and DELETE statements. Examples use PostgreSQL syntax.5 min readCREATE TABLE, declare a primary key and a foreign key, and read the ON DELETE actions covered earlier. Examples use PostgreSQL syntax.4 min readSELECT queries, know INNER JOIN and LEFT JOIN syntax, and have the customers, orders, products, and order_items tables from the earlier chapters. Here you will learn how keys decide which join to write, how many rows it returns, and where joins 4 min readCREATE TABLE, INSERT, SELECT and basic joins. It also assumes you know what a primary key and a foreign key are, and how NULL behaves in comparisons. The chapter is about foreign key columns that are allowed to be NULL, and the effects that has on constraints4 min readCREATE TABLE statements with primary keys and foreign keys, and that you know joins and NULL. Some hierarchies, such as an org chart, a category tree, or a comment thread, hold rows of one kind that point at other rows of the same kind. You model them with a se4 min readCREATE TABLE with primary and foreign key constraints, and that you know what a join does. It uses the customers and orders tables from earlier chapters, with PostgreSQL syntax.4 min readCREATE TABLE with primary and foreign keys, read ALTER TABLE syntax, and run a LEFT JOIN. Examples use PostgreSQL. Other systems are covered near the end.4 min readCREATE TABLE statements with primary and foreign keys, and that you know how transactions work (BEGIN, COMMIT, ROLLBACK). The examples use PostgreSQL syntax.4 min readCREATE TABLE statements, declare primary and foreign keys, and read the ON DELETE actions covered earlier. The examples so far used PostgreSQL syntax. The core ideas (primary key, foreign key, referential integrity) are the same in every major database. The dif5 min readCREATE TABLE statements with primary keys and foreign keys, know the ON DELETE actions, and can join tables. Examples use PostgreSQL syntax.5 min read