TATECHATLAS
◎ English
Home / Topics

Databases and SQL: dialects and data processing

Practical material on SQL and databases including PostgreSQL, Oracle Database, SQL Server, MySQL, MariaDB and SQLite. Compare dialect behavior with the engine and version stated.

Compare database behavior against product documentation and small, verifiable examples. SQL syntax alone does not guarantee identical rules for NULL, types, dates, pagination or indexes. SAP HANA is covered in the SAP and ERP section.

Materials

19 materials

CHECK constraints in PostgreSQL: why they cannot reference other rows and how to avoid dump/restore errors

CHECK constraints in PostgreSQL only validate the new or updated row itself; they cannot inspect other rows. This causes dump restores to fail if rows are loaded in an order that temporarily violates cross-row logic. Use UNIQUE, EXCLUDE, or FOREIGN KEY constraints for cross-row integrity, test dumps, use deferred constraints, and verify data after restore.

postgresql / check-constraint / pg_dump / pg_restore / unique-constraint / exclude-constraint / foreign-key / data-integrity

PostgreSQL foreign keys: NO ACTION timing and selective SET NULL

A closer look at explicitly deferred NO ACTION checks and clearing only the optional component of a composite foreign key. These details complement the basic choice between RESTRICT, CASCADE and SET NULL.

postgresql / foreign-key / on-delete / data-retention / cascade / restrict / set-null / referential-integrity

Using LIMIT and OFFSET in PostgreSQL: Best Practices, Performance Impacts, and Alternatives

LIMIT caps returned rows; OFFSET skips rows in the query result. SQL does not require ORDER BY syntactically, but repeatable page boundaries need a unique ordering. For an API, choose between page-number navigation and continuation from the last key; neither strategy alone provides a snapshot. Measure deeper pages before setting a performance cutoff.

PostgreSQL / database pagination / LIMIT / OFFSET / cursor-based pagination / query performance