Chapter 18: Database Programming

This chapter gives a general introduction to the capabilities of Qt’s SQL classes, using Sqlite as an example back-end.

Learning Structured Query Language (SQL)?

Do not bother learning SQL with any book that claims to be on “standard” SQL. The best manual to read is the reference guide for your chosen database server software because each server supports slightly different syntax and data types. Fortunately, with the exception of creating tables and other DDL queries, mapping between SQL values and QVariant is made quite easy for you by the QSql application programming interface (API). When you have used more than one database, you should either look for an abstraction layer (which might end up being an obstruction ...

Get Introduction to Design Patterns in C++ with Qt, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.