GettingStarted

SQLite Basics Quiz Answers

From Xojo Documentation

These are the answers for the SQLite Basics Quizzes. Correct answers are marked in bold.

Quiz Answers

Quiz 1: Introduction to SQLite

Use this Quiz to check what you have learned about SQLite database foundations. Notice that the questions may have more than one right answer.

Question 1.1: Check all the right affirmations.

  • SQLite is a Client/Server database engine.
  • SQLite can be used for free.
  • SQLite doesn’t requires additional installations.
  • SQLite doesn’t support multiple users.

Question 1.2: Xojo always implements the latest available SQLite Library.

  • No.
  • Yes.

Question 1.3: Xojo supports multiple SQLite databases use.

  • No.
  • Yes, they always have the same number of Tables in their structure.
  • Yes.

Question 1.4: What Xojo Licenses offer support for SQLite?

  • Desktop Lite, Desktop, Console and iOS.
  • All of them, except Web.
  • All of them, you pay the required royalties for each deployment platform.
  • All of them.

Question 1.5: SQLite supports in-memory databases.

  • Yes, they are always saved to disk before exiting the app.
  • No.
  • Only if it is also backed by a database on disk.
  • Yes.

Question 1.6: Xojo supports saving an in-memory database to disk.

  • No. We have to have previously created a new database in disk, backing the in-memory data to it.
  • Yes.

Question 1.7: What is the name of the Class (or Classes) in Xojo we can use to work with SQLite databases?

  • XQLite.
  • SQLiteDesktopBase.
  • SQLiteDatabase.
  • iOSDatabase.
  • iOSSQLite.
  • iOSSQLiteDatabase.

Question 1.8: Is it possible to place a SQLite database in a Server? Check all the right answers.

  • Only using third-party products.
  • Using third-party products.
  • The access to the database file is always made from an app located on the same server.
  • We need to activate the WAL feature.
  • No.

Question 1.9: What are the advantages of using the WAL feature on SQLite?

  • Multiple simultaneous accesses from multiple users.
  • A better integrity protection for the stored database data.
  • Reduced memory consumption.
  • It is mandatory in order to create and use in-memory databases.

Question 1.10: Can we use RegEx (Regular Expressions) in the SQLite queries?

  • Only if we add third-party components or add-ons.
  • Yes, Xojo includes RegEx support for SQLite.
  • No.

Quiz 2: SQLite Database Structure

This quiz lets you check the knowledge acquired about SQLite databases structure. Notice that the questions may have more than one right answer.

Question 2.1: Does SQLite use strict Types checking for columns definition?

  • Yes.
  • No.
  • In some cases.

Question 2.2: A table definition consist fundamentally of…

  • Cells.
  • Rows.
  • Columns and Rows.
  • Columns.

Question 2.3: The SQLite data Types supported by SQLite are:

  • Nil.
  • Integer.
  • Double.
  • Text.
  • Null.
  • Boolean.
  • Real.
  • Picture.
  • Bolb.
  • Blob.

Question 2.4: Once a table has been created, we can…

  • Delete columns.
  • Modify some of the current columns.
  • Add new columns to the table.

Question 2.5: SQLite admits creating columns that will be empty during the database use.

  • Yes.
  • No.

Quiz 3: Integrated Database Editor

Verify with this quiz the acquired knowledge about SQLite database creation using the integrated Database Editor. Notice that the questions may have more than one right answer.

Question 3.1: Xojo just supports adding already created SQLite databases to the project.

  • That’s true for databases using a different SQLite library version than the one used by Xojo.
  • No.
  • Yes.

Question 3.2: Once we have created a new SQLite database using the integrated Database Editor, the path to the database file will be resolved at execution time; so we can rely on this for our products' deployment.

  • No. It is an absolute path that we can’t modify.
  • Only for multiplatform deployments.
  • Only if the database file has been moved from its original location.

Question 3.3: Xojo automatically saves every change made using the integrated Database Editor, so we can rely on this.

  • Yes.
  • Only when changing from table in the same database.
  • No, we have to make sure to manually save all the changes.

Question 3.4: We can limit the field length for SQLite tables using the Length property.

  • This has no effect in SQLite.
  • Of course, we can find this ability under the Inspector Panel and it is applied to the database file schema.
  • It only applies to Integer Type columns.

Question 3.5: Index creation for a Table…

  • Allows ordering alphabetically the records.
  • Extends the kind of queries we can make on the database.
  • Improves the queries performance over columns included in indexes.

Quiz 4: RowSet

This quiz lets you verify the acquired knowledge about the RowSet. Notice that the questions may have more than one right answer.

Question 4.1: A RowSet is…

  • The class we use to get the rows (records) from a database query.
  • A way to insert new records in a database table.
  • A way to update records.
  • Something we can use to create new tables in the database.

Question 4.2: How can we get a fresh RowSet?

  • Getting a new instance as result from a database query.
  • Through the Column method.
  • Calling the EditRow method.
  • Setting it to Nil.