Typical Programmer – Why Programmers Don’t Like Relational Databases

Typical Programmer – Why Programmers Don’t Like Relational Databases:

Complaining about relational databases is a staple theme of programmer blogs. Why are so many programmers irritated and frustrated with relational databases? Why do the perceived intricacies of SQL and the “object-relational impedance mismatch” launch so many rants? Why are DBAs more hated than managers? I have some ideas.

Time and Time Again: Managing Time in Relational Databases, Part 14 – Versioning with Surrogate Keys

Time and Time Again: Managing Time in Relational Databases, Part 14 – Versioning with Surrogate Keys:

Beginning with Version Pattern 6, we will use surrogate version keys in all versioned tables. But note that the phrase “surrogate version keys” should be read as “surrogate keys for versions,” and not as “keys for surrogate versions.” We are recommending the use of surrogate keys for versioned tables. We are not introducing a concept of “surrogate versions.”

[The Unexpected SQL Injection] Web Security Articles – Web Application Security Consortium

[The Unexpected SQL Injection] Web Security Articles – Web Application Security Consortium

Abstract:
We will look at several scenarios under which SQL injection may occur, even though mysql_real_escape_string() has been used. There are two major steps at writing SQL injection resistant code: correct validation and escaping of input and proper use of the SQL syntax. Failure to comply with any of them may lead to compromise. Many of the specific issues are already known, but no single document mentions them all.
Although the examples are built on PHP/MySQL, the same principles apply to ASP/MSSQL and other combinations of languages and databases.

Time and Time Again: Managing Time in Relational Databases, Part 9

Time and Time Again: Managing Time in Relational Databases, Part 9: Completing Version Pattern 5 – DMReview:

We noted in Part 8 that Version Pattern 5 is equivalent to Version Pattern 3, but with the single episode constraint {SC 3-4} removed. However, in that same installment, we also pointed out a difference in the first semantic constraint for each pattern. Constraint {SC 3-1} states that “if a version for an object is followed by another version for that same object, the end date of the former version must be one tick of the clock prior to the begin date for the latter version.” But for multi-episode objects, clearly, there may be any number of clock ticks between the logical delete version for one episode, and the initial version of the next episode. We accommodated this change by specifying that constraint {SC 5-1} has the same wording as {SC 3-1}, except for replacing “if a version for an object …” with “if a non-terminal version for an object …”

Time and Time Again: Managing Time in Relational Databases, Part 5

Time and Time Again: Managing Time in Relational Databases, Part 5: Version Pattern 3 – DMReview

The business requirement for Version Pattern 3 is to be able to show what an object was like at any point in its lifetime. To do this, we must retain the before-update state of an object, not just the after-update state. We must retain a versioned history of changes to the state of an object. This means that in place of the Policy table we have been using thus far, we will need a Policy Version table.

Time and Time Again: Managing Time in Relational Databases, Part 4

Time and Time Again: Managing Time in Relational Databases, Part 4 – Preliminaries to Version Pattern 3 – DMReview

The first two version patterns, described in Part 3, support a minimal form of queryable history in business databases. But sometimes that isn’t enough. For even if we use Version Pattern 2 – updating in place with logical deletion – there are still two important ways in which history can be lost.

Time and Time Again: Managing Time in Relational Databases, Part 3

Time and Time Again: Managing Time in Relational Databases, Part 3 – Version Patterns 1 and 2

Version Pattern 1: Updating in Place

Updates in place destroy history by overwriting the previous version of the rows they update. But in most cases, this is the way tables are in fact updated. In these cases, the business does not require that the earlier states of the updated rows be available as queryable history. For this kind of data and these business requirements, the need for history is so infrequent and so nonreal-time critical, that reconstructable history is good enough.

Time and Time Again: Managing Time in Relational Databases, Part 8

Time and Time Again: Managing Time in Relational Databases, Part 8: Version Pattern 5 – DMReview:

Version Pattern 5 is the first pattern to manage objects with multiple episodes, a concept introduced in Part 4. To avoid taking on too much at once, however, Pattern 5 will not include bi-temporality. That will come with Pattern 6 which will be, consequently, a pattern supporting both multiple episode objects and bi-temporality.