Database Reference
In-Depth Information
RDBMS: The Awesome and the Not-So-Much
There are many reasons that the relational database has become so overwhelmingly popular
over the last four decades. An important one is the Structured Query Language (SQL), which is
feature-rich and uses a simple, declarative syntax. SQL was first officially adopted as an ANSI
standard in 1986; since that time it's gone through several revisions and has also been extended
with vendor proprietary syntax such as Microsoft's T-SQL and Oracle's PL/SQL to provide ad-
ditional implementation-specific features.
SQL is powerful for a variety of reasons. It allows the user to represent complex relationships
with the data, using statements that form the Data Manipulation Language (DML) to insert, se-
lect, update, delete, truncate, and merge data. You can perform a rich variety of operations using
functions based on relational algebra to find a maximum or minimum value in a set, for example,
or to filter and order results. SQL statements support grouping aggregate values and executing
summary functions. SQL provides a means of directly creating, altering, and dropping schema
structures at runtime using Data Definition Language (DDL). SQL also allows you to grant and
revoke rights for users and groups of users using the same syntax.
SQL is easy to use. The basic syntax can be learned quickly, and conceptually SQL and RDBMS
offer a low barrier to entry. Junior developers can become proficient readily, and as is often the
case in an industry beset by rapid changes, tight deadlines, and exploding budgets, ease of use
can be very important. And it's not just the syntax that's easy to use; there are many robust tools
that include intuitive graphical interfaces for viewing and working with your database.
In part because it's a standard, SQL allows you to easily integrate your RDBMS with a wide
variety of systems. All you need is a driver for your application language, and you're of to the
races in a very portable way. If you decide to change your application implementation language
(or your RDBMS vendor), you can often do that painlessly, assuming you haven't backed your-
self into a corner using lots of proprietary extensions.
Transactions, ACID-ity, and two-phase commit
In addition to the features mentioned already, RDBMS and SQL also support transactions. A
database transactionis, as Jim Gray puts it, “a transformation of state” that has the ACID
properties (see http://research.microsoft.com/en-us/um/people/gray/papers/theTransac-
tionConcept.pdf ) . A key feature of transactions is that they execute virtually at first, allowing the
programmer to undo (using ROLLBACK) any changes that may have gone awry during execu-
tion; if all has gone well, the transaction can be reliably committed. The debate about support
for transactions comes up very quickly as a sore spot in conversations around non-relational data
stores, so let's take a moment to revisit what this really means.
Search WWH ::




Custom Search