













































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!














































































Question 1. Which file extension indicates a SQLite Write‑Ahead Log used in forensic analysis? A) .db B) .sqlite C) .wal D) .journal Answer: C Explanation: The “-wal” file stores recent changes in Write‑Ahead Log mode, crucial for recovering uncommitted transactions. Question 2. In SQLite’s storage classes, which type can store any kind of data without type enforcement? A) INTEGER B) TEXT C) BLOB D) REAL Answer: C Explanation: BLOB is a binary large object; SQLite treats it as raw bytes, allowing any data to be stored. Question 3. The first 100 bytes of a SQLite file contain a magic header. What string must appear at offset 0? A) “SQLite format 1” B) “SQLite format 2” C) “SQLite format 3” D) “SQLite3 Database” Answer: C Explanation: The official header is “SQLite format 3”, identifying the file as a SQLite database.
Question 4. Which page type contains the actual table rows in a SQLite database? A) Index page B) Table B‑Tree interior page C) Table B‑Tree leaf page D) Freeblock page Answer: C Explanation: Leaf pages hold the payload (record data) for tables, while interior pages only contain pointers. Question 5. When a record is deleted, SQLite marks its space as a freeblock. What forensic value does a freeblock provide? A) Indicates the file is corrupted B) Shows the exact time of deletion C) May contain remnants of the deleted record D) Triggers automatic vacuuming Answer: C Explanation: Freeblocks retain the raw bytes of deleted rows until overwritten, allowing partial recovery. Question 6. Which SQLite data type is used to store Unix epoch timestamps? A) TEXT B) INTEGER C) REAL D) BLOB Answer: B Explanation: Unix timestamps are stored as 64‑bit integers representing seconds since 1970‑ 01 ‑01.
Question 10. In a SQLite B‑Tree cell, what structure follows the payload length? A) Serial type array B) Rowid (integer key) C) Page type flag D) Freeblock pointer Answer: B Explanation: The cell header includes the rowid after the payload length, identifying the record. Question 11. Which SQLite journaling mode creates a “-journal” file during a transaction? A) WAL B) DELETE C) TRUNCATE D) PERSIST Answer: B Explanation: The DELETE mode writes changes to a rollback journal file named “-journal”. Question 12. When analyzing a “-wal” file, what indicates a checkpoint has not yet occurred? A) Presence of a header “WAL” string B) No entries for page numbers > C) Uncommitted frames at the end of the file D) Zero bytes after the first 100 bytes Answer: C Explanation: Frames that have not been checkpointed remain in the WAL, representing pending changes.
Question 13. Which SQLite function converts a Unix epoch integer to a human‑readable date? A) datetime() B) strftime() C) date() D) time() Answer: A Explanation: datetime(unixepoch, 'unixepoch') returns a formatted timestamp. Question 14. In forensic terms, what is the purpose of a “vacuum” operation in SQLite? A) Encrypts the database file B) Rewrites the file to reclaim free space C) Creates a backup copy automatically D) Switches journaling mode to WAL Answer: B Explanation: VACUUM rebuilds the database, removing freeblocks and shrinking the file size. Question 15. Which storage class is used for Boolean values in SQLite? A) INTEGER B) TEXT C) REAL D) BLOB Answer: A Explanation: SQLite does not have a native BOOLEAN type; true/false are stored as 1/0 integers.
Question 19. In a forensic timeline, which SQL clause would you use to count distinct user IDs from a log table? A) SELECT DISTINCT COUNT(user_id) B) SELECT COUNT(DISTINCT user_id) C) SELECT user_id GROUP BY DISTINCT D) SELECT COUNT(*) DISTINCT user_id Answer: B Explanation: COUNT(DISTINCT column) returns the number of unique values. Question 20. Which SQLite file typically contains the most recent committed changes when the database is in WAL mode? A) The main .db file B) The - journal file C) The - wal file D) The - shm file Answer: C Explanation: The WAL file holds the latest changes until they are checkpointed back to the main database. Question 21. What does the “rowid” column represent in a SQLite table without an explicit INTEGER PRIMARY KEY? A) A hidden 64‑bit integer automatically assigned to each row B) The MD5 hash of the row’s contents C) The physical offset of the row on disk D) The number of columns in the table Answer: A Explanation: SQLite provides an implicit rowid for every row unless a primary key overrides it.
Question 22. Which SQLite pragma can be used to display the page size of an open database? A) PRAGMA page_size; B) PRAGMA journal_mode; C) PRAGMA integrity_check; D) PRAGMA wal_checkpoint; Answer: A Explanation: PRAGMA page_size returns the configured page size in bytes. Question 23. When a B‑Tree leaf page becomes full, SQLite may create an overflow page. What forensic artifact does an overflow page contain? A) Index entries only B) Additional payload bytes that didn’t fit in the leaf cell C) Freeblock metadata D) Transaction logs Answer: B Explanation: Overflow pages store the remainder of a large payload that exceeds the leaf page capacity. Question 24. Which command removes the rollback journal after a successful transaction? A) COMMIT; B) ROLLBACK; C) SAVEPOINT; D) BEGIN; Answer: A Explanation: COMMIT finalizes the transaction and deletes the - journal file.
Question 28. What does the “serial type code” in a cell header indicate? A) The page number of the next cell B) The data type and length of each column value C) The checksum of the cell D) The transaction ID that created the cell Answer: B Explanation: Serial type codes map to SQLite storage classes and indicate size for each field. Question 29. Which SQLite pragma can be used to force a checkpoint of the WAL file? A) PRAGMA wal_checkpoint(FULL); B) PRAGMA journal_mode=DELETE; C) PRAGMA integrity_check; D) PRAGMA auto_vacuum=FULL; Answer: A Explanation: wal_checkpoint(FULL) forces all WAL frames to be written back to the database. Question 30. In forensic analysis, why is the unallocated space within a page important? A) It contains the page’s checksum B) It may hold remnants of deleted records that were never overwritten C) It stores the page’s creation timestamp D) It is used for encryption keys Answer: B Explanation: Unallocated space can retain leftover bytes from previous records, useful for recovery.
Question 31. Which SQL function can be used to extract the year from a Unix epoch timestamp stored as INTEGER? A) strftime('%Y', datetime(timestamp, 'unixepoch')) B) date(timestamp) C) time(timestamp, 'unixepoch') D) substr(timestamp, 1, 4) Answer: A Explanation: strftime with format ‘%Y’ returns the year component after converting the epoch. Question 32. When examining an Android app’s SQLite database, which directory typically contains the .db files? A) /system/app/ B) /data/data/<package_name>/databases/ C) /sdcard/Download/ D) /etc/ Answer: B Explanation: Each app’s private data, including databases, resides under its package’s data directory. Question 33. Which of the following indicates that a SQLite database is using the DELETE journaling mode? A) Presence of a .wal file B) Presence of a .shm file C) Presence of a - journal file during a transaction D) No journal files at all Answer: C Explanation: DELETE mode creates a temporary - journal file while a transaction is active.
Question 37. Which of the following statements about SQLite’s “auto_vacuum” setting is true? A) It automatically encrypts the database after each write B) It reclaims free space without a manual VACUUM command when enabled C) It disables the WAL mode D) It forces all tables to use INTEGER primary keys Answer: B Explanation: When auto_vacuum=FULL or INCREMENTAL, SQLite automatically reuses or frees space. Question 38. When a SQLite transaction is interrupted (e.g., power loss), which file is most likely to contain the incomplete changes? A) The main .db file B) The - wal file C) The - journal file D) The - shm file Answer: C Explanation: The rollback journal records changes during a transaction; if interrupted, it may hold the uncommitted data. Question 39. Which SQL clause is used to combine rows from two tables based on a related column? A) WHERE B) GROUP BY C) JOIN D) ORDER BY Answer: C
Explanation: JOIN merges rows from two tables using a matching condition. Question 40. In SQLite, what does the term “overflow page” specifically refer to? A) A page that stores index entries exceeding the leaf capacity B) A page that holds excess payload bytes that didn’t fit in the original cell C) A page that contains freeblocks only D) A page used for temporary tables during queries Answer: B Explanation: Overflow pages store the remainder of large records. Question 41. Which pragma can be used to check the integrity of a SQLite database file? A) PRAGMA integrity_check; B) PRAGMA quick_check; C) PRAGMA verify; D) PRAGMA check; Answer: A Explanation: integrity_check runs a series of tests to validate the database structure. Question 42. Which of the following best describes the role of the “-shm” file in WAL mode? A) Stores the actual data changes B) Contains a shared memory region for coordination between processes C) Holds the database schema definitions D) Is a backup of the main database file Answer: B Explanation: The - shm file provides a shared memory map used for WAL coordination.
Question 46. Which of the following SQL functions can be used to convert a Mac Absolute time (seconds since 2001‑ 01 ‑01) to a readable date? A) datetime(mac_time, 'unixepoch', '+31 years') B) datetime(mac_time, 'unixepoch') C) date(mac_time, 'unixepoch', '-31 years') D) strftime('%Y-%m-%d', mac_time) Answer: A Explanation: Mac Absolute time is 31 years ahead of Unix epoch; adding 31 years aligns it. Question 47. Which SQLite data type would you choose to store a JSON document and still be able to query its fields using JSON functions? A) TEXT B) BLOB C) REAL D) INTEGER Answer: A Explanation: JSON is stored as TEXT; SQLite’s JSON1 extension operates on text values. Question 48. In SQLite, what does the “AUTOINCREMENT” keyword guarantee? A) Rowids are never reused, even after deletions B) Rowids are assigned randomly C) Rowids are stored as TEXT strings D) Rowids are reset after each VACUUM Answer: A Explanation: AUTOINCREMENT ensures the rowid monotonically increases, preventing reuse.
Question 49. Which of the following best describes the purpose of the “cell pointer array” at the start of a B‑Tree page? A) It stores the actual data bytes for each record B) It holds offsets to each cell’s location within the page C) It contains the checksum for the page D) It lists the page numbers of child pages Answer: B Explanation: The pointer array provides quick access to cell locations. Question 50. When performing a forensic analysis of a Safari history SQLite database, which column typically contains WebKit timestamps? A) visit_time B) timestamp C) date_added D) last_accessed Answer: A Explanation: Safari’s history tables store timestamps in the “visit_time” column as WebKit epoch (seconds since 2001‑ 01 ‑01). Question 51. Which SQLite pragma can be used to enable incremental auto‑vacuum? A) PRAGMA auto_vacuum=INCREMENTAL; B) PRAGMA incremental_vacuum; C) PRAGMA vacuum; D) PRAGMA auto_vacuum=FULL; Answer: A
Question 55. In a forensic context, why might an investigator prefer to copy a SQLite database file using a “dd” command instead of a simple file copy? A) “dd” automatically parses the database schema B) “dd” can create a bit‑for‑bit image preserving unallocated space and metadata C) “dd” compresses the file during copy D) “dd” converts the file to JSON format Answer: B Explanation: “dd” performs a raw block copy, ensuring all hidden structures are retained. Question 56. Which of the following is a valid reason to disable WAL mode during a forensic acquisition? A) To increase write performance B) To simplify recovery of pre‑checkpoint data from the WAL file C) To enable automatic encryption D) To prevent the creation of - shm files Answer: B Explanation: Disabling WAL forces all changes to be written directly to the database, making the WAL irrelevant for later analysis. Question 57. Which SQLite function can be used to extract the first 8 bytes of a BLOB as a hexadecimal string? A) hex(substr(blob_column, 1, 8)) B) substr(hex(blob_column), 1, 8) C) printf('%x', blob_column) D) decode(blob_column) Answer: A
Explanation: substr extracts bytes; hex converts them to a hex string. Question 58. In an iOS device, where are Safari cookies typically stored? A) /Library/Cookies/ B) /var/mobile/Containers/Data/Application/