Before we jump into what QtSql has to offer, you will need to be familiar with the basics of SQL. This section will give you a quick overview of how to create, populate, alter, and query data in a SQL database. If you already know SQL, you may want to skip ahead to the PyQt part of this chapter.
SQL is a very different language from Python in syntax and structure. It is a declarative language, meaning that we describe the results we want rather than the procedures used to get them. To interact with a SQL database, we execute statements. Each statement is made up of a SQL command followed by a series of clauses, each of which further describes the results desired. Statements are terminated with a semicolon.
Although SQL is standardized, all SQL database implementations provide their own alterations and extensions to the standard language. We're going to be learning...