Chapter 3: Using SQL in an Application Program
In This Chapter
Seeing how hard it is (sometimes) to get languages to work together
Embedding SQL in a procedural program
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 ...