Chapter 3: Using SQL in an Application Program

In This Chapter

arrow Comparing languages

arrow Seeing how hard it is (sometimes) to get languages to work together

arrow Embedding SQL in a procedural program

arrow Using SQL modules

SQL was conceived and implemented with one objective in mind: to create and maintain a structure for data to be stored in a relational database. It was never intended to be a complete language that you could use to create application programs. Application programming was — and is — the domain of procedural languages such as C, C++, C#, Java, Python, and Visual Basic.

Clearly, a need exists for application programs that deal with databases. Such programs require a combination of the features of a procedural language such as C and a data sublanguage such as SQL. Fundamental differences between the architectures and philosophies of procedural languages and of SQL make combining them a challenge.

In this chapter, I look at the characteristics of — and differences between — those two very different worlds.

Comparing SQL with Procedural Languages

First, I look at SQL, which is strong ...

Get SQL All-in-One For Dummies®, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.