[ fromfile: database-questions.xml id: database-questions ]
Which database is included with Qt on all platforms?
Sqlite
How can you determine what databases are supported by your version of Qt?
QSqlDatabase::drivers()
What is QSqlDatabase is an abstraction for, a file, connection, user, or table?
It is an abstraction for a database connection, not an actual database.
What is the difference between a DDL query and a regular query?
A DDL query creates a table, or modifies its structure.
Why are prepared queries preferred over regular queries?
They are faster, because the query does not need to be parsed as often. They are safer, because they are not subject to SQL injection attacks. They are easier to use with strings because there is no need to escape the characters inside them.
What would be a better name for the class, QSqlDatabase?
QSqlConnection, because it represents a connection and not an actual database.
If the database driver's hasFeature(QSqlDriver::PreparedQueries)
reports false, can you use prepared queries?
Yes, even if the server or the driver does not support them, Qt emulates prepared queries on the client side.
Can a non-DDL query modify table rows?
Yes, some SQL queries update or insert rows into a table. A "query" is more than just a select statement.
Generated: 2012-03-02 | © 2012 Alan Ezust and Paul Ezust. |