John Cox

Blogs · @wyome

Tagged sql · everything

Introduction to MySQL Triggers | Nettuts+

MySQL triggers are database rules that automatically execute additional operations when data is inserted, updated, or deleted, allowing developers to handle data integrity, logging, and business logic at the database layer rather than in application code. The article demonstrates three practical applications: maintaining referential integrity by automatically deleting related records, auditing changes by logging modifications to separate tables, and enforcing business rules like automatic price calculations based on cost updates. While triggers add modest performance overhead to individual queries, they reduce overall latency by eliminating multiple round trips to the database and move critical data logic away from the application layer where it's easier to enforce consistently.

Permalink

An Introduction to MySQL Views - Techotopia

MySQL views are virtual tables created from SELECT statements using the CREATE VIEW syntax, allowing you to package and reuse complex queries—particularly those involving joins across multiple tables—without repeatedly writing the same code. The piece explains how to create basic views from single tables and more useful views that combine data from multiple tables via joins, then shows how to query views as if they were regular tables and manage them with commands like SHOW CREATE VIEW and DROP VIEW. Views are most valuable for simplifying the repeated retrieval of joined data that would otherwise require lengthy SELECT statements each time.

Permalink

URL Access

SQL Server Reporting Services allows you to access and customize reports through URL requests by appending parameters that control rendering format, viewer appearance, and report values. The URL structure consists of the report server web service URL, the path to the specific report, and optional prefixed parameters (using rs: or rc: prefixes) or unprefixed report parameters separated by ampersands, enabling you to share preconfigured report links with specific parameter values, languages, or output formats.

Permalink

Data Types

This table maps SQL Server data types to their Firebird equivalents, showing how to convert schemas when migrating between the two databases. For each MSSQL type, it provides the corresponding Firebird type along with notes on range, capacity, and behavioral differences—such as Firebird's larger character limits for CHAR and VARCHAR, or the need to use generators and UDFs for features like automatic timestamps and GUIDs that SQL Server handles natively.

Permalink

DB Normalization

Database normalization—organizing data into multiple related tables with fewer columns each—improves performance through faster sorting, more efficient indexes, and reduced null values, though excessive joins across many tables can become counterproductive. Key design principles include giving each table a unique primary key identifier, storing data for only one entity type per table, minimizing nullable columns, and avoiding repeating values by using separate linked tables instead. When complete redesign isn't feasible, selective normalization of large tables or the use of views can achieve better design without disrupting existing applications.

Permalink

Comparison of different SQL implementations

This page compares how different database management systems (PostgreSQL, DB2, MS SQL Server, MySQL, Oracle, and Informix) implement various SQL features and operations, showing which products follow the SQL standard and where they diverge. It covers everything from basic SELECT and INSERT syntax to data types, functions, metadata queries, and command-line operations, serving as a practical guide for developers porting SQL code between different database platforms. The author acknowledges the page is no longer actively maintained but provides extensive side-by-side feature comparisons with code examples for each DBMS's approach to standard SQL functionality.

Permalink

Library of Free Data Models

I appreciate you sharing this content, but this appears to be promotional copy for a database design educational website rather than a saved article to summarize. If you have a specific article you'd like me to summarize, please paste the actual article text and I'll be happy to write a two-to-three sentence summary explaining what it argues or reports.

Permalink