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

29 materials

Eliminating SQL UNKNOWN Across WHERE, IF, and WHILE with Sentinel Coalescing

Three-valued logic produces UNKNOWN when a nullable operand enters a comparison, and that single value diverges in effect across filtering, conditional, and loop constructs. Wrapping the operand with COALESCE and a domain-safe sentinel collapses the logic to two values, making every context behave identically.

three-valued-logic / NULL-handling / COALESCE / sentinel-pattern / T-SQL / Oracle / control-flow / outer-joins

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

Oracle String Concatenation and NULL Behavior Explained

Oracle treats empty strings as NULL but concatenates them as empty. This exception aids string building but harms portability and safety in checks. This article explains how NULL propagates through most Oracle operators, why concatenation is the sole exception, how SQL Server differs under SET ANSI_NULLS, and why explicit IS NULL and COALESCE handling is safer for cross-database designs.

Oracle / SQL / NULL / Concatenation / Portability / Best Practices

Porting NULL and empty-string semantics across Oracle, SQL Server, MySQL and SQLite

Port NULL handling across Oracle, SQL Server, MySQL and SQLite by fixing four portability points: how a NULL is tested, what a comparison against NULL returns, whether boolean contexts coerce NULL, and what an empty string means. Oracle treats a zero-length character as null but warns this may change, while SQL Server depends on ANSI_NULLS, MySQL returns NULL for comparisons and coerces 0 and NULL to false in boolean contexts, and SQLite's IS and IS NOT are an extension.

SQL portability / NULL handling / Oracle / SQL Server / MySQL / SQLite / empty string / ANSI_NULLS

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