This quiz is designed to test your understanding of SQLite databases and their integration with Android applications. It covers essential concepts like database tables, schemas, primary keys, and the use of SQL for data manipulation. Additionally, it explores how SQLite is embedded within Android, how to interact with databases using ADB shell, and introduces the Room persistence library for more efficient database management. Use this quiz to review key topics and ensure you have a solid grasp of SQLite usage in Android development.
1.
What role does a database schema play in a database?
2.
Why is it necessary for each table in Android's SQLite database to have a primary key named '_id'?
3.
Which SQL statement would you use to retrieve all rows from a table named 'contacts'?
4.
Which statement is used to create a new table in an SQLite database?
5.
What does the 'autoincrement' keyword ensure when used with a primary key in SQLite?
6.
Which SQL command is used to add a new row into a table?
7.
What is the function of the .tables command in SQLite?
8.
Which Android command-line tool is used to interact with an Android device or emulator for debugging purposes?
9.
Which of the following is true about the Structured Query Language (SQL)?
10.
Why is SQLite a suitable choice for mobile applications?
11.
What happens if an Android app creates a database without defining a primary key?
12.
Which of the following is used to uniquely identify a row in a database table?
13.
How is data typically stored in an SQLite database on an Android device?
14.
How is SQLite different from other relational database management systems like Oracle or SQL Server?
15.
What is the role of the 'Room' persistence library in Android?
16.
Why is SQLite considered 'embedded'?
17.
What is the purpose of the 'autoincrement' keyword when defining a primary key in SQLite?