Docsity

PrepIQ Teel Technologies SQLite Forensic Ultimate Exam, Exams of Technology

Toggle sidebar
bg1
PrepIQ Teel Technologies SQLite
Forensic Ultimate Exam
**Question 1.** Which 16-byte signature appears at the very beginning of every
valid SQLite database file?
A) 0x53 51 4C 69 74 65 20 66 69 6C 65 00 00 00 00 00
B) 0x53 51 4C 69 74 65 20 20 20 20 20 20 20 20 20 20
C) 0x53 51 4C 69 74 65 20 20 00 00 00 00 00 00 00 00
D) 0x53 51 4C 69 74 65 20 20 20 20 00 00 00 00 00 00
Answer: B
Explanation: The “Magic String” for SQLite is the ASCII text “SQLite format 3\0”,
which occupies the first 16 bytes; after “SQLite format 3” there are 3 spaces and a
NUL byte, matching option B.
**Question 2.** In SQLite’s file header, which field indicates the number of bytes per
database page?
A) Page Size
B) File Change Counter
C) Reserved Space
D) Schema Cookie
Answer: A
Explanation: The “Page Size” field (bytes 16-17) stores the page size (default 1024)
and determines how many bytes each page contains.
**Question 3.** What is the primary purpose of the sqlite_master table?
A) Store user data rows
B) Record transaction logs
C) Define schema objects like tables, indexes, and triggers
D) Cache query results
Answer: C
Explanation: sqlite_master (or “sqlite_schema” in newer versions) holds a single row
for each table, index, view, and trigger, describing their SQL definitions.
**Question 4.** Which SQLite page type holds actual table rows?
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30

Partial preview of the text

Download PrepIQ Teel Technologies SQLite Forensic Ultimate Exam and more Exams Technology in PDF only on Docsity!

Forensic Ultimate Exam

Question 1. Which 16-byte signature appears at the very beginning of every valid SQLite database file? A) 0x53 51 4C 69 74 65 20 66 69 6C 65 00 00 00 00 00 B) 0x53 51 4C 69 74 65 20 20 20 20 20 20 20 20 20 20 C) 0x53 51 4C 69 74 65 20 20 00 00 00 00 00 00 00 00 D) 0x53 51 4C 69 74 65 20 20 20 20 00 00 00 00 00 00 Answer: B Explanation: The “Magic String” for SQLite is the ASCII text “SQLite format 3\0”, which occupies the first 16 bytes; after “SQLite format 3” there are 3 spaces and a NUL byte, matching option B. Question 2. In SQLite’s file header, which field indicates the number of bytes per database page? A) Page Size B) File Change Counter C) Reserved Space D) Schema Cookie Answer: A Explanation: The “Page Size” field (bytes 16-17) stores the page size (default 1024) and determines how many bytes each page contains. Question 3. What is the primary purpose of the sqlite_master table? A) Store user data rows B) Record transaction logs C) Define schema objects like tables, indexes, and triggers D) Cache query results Answer: C Explanation: sqlite_master (or “sqlite_schema” in newer versions) holds a single row for each table, index, view, and trigger, describing their SQL definitions. Question 4. Which SQLite page type holds actual table rows?

Forensic Ultimate Exam

A) Interior B-Tree page B) Leaf B-Tree page C) Overflow page D) Freelist page Answer: B Explanation: Leaf B-Tree pages contain the payload (row data) for tables, while interior pages only store pointers to child pages. Question 5. In a B-Tree, what does an interior page store? A) Complete row data B) Pointers to child pages and key values C) Deleted row fragments D) Transaction logs Answer: B Explanation: Interior pages contain key values that guide searches and pointers (page numbers) to child pages; they do not store full rows. Question 6. Which SQLite version introduced the “WAL” (Write-Ahead Logging) mode as the default journaling method? A) 3. B) 3.7. C) 3.8. D) 3.9. Answer: C Explanation: SQLite 3.8.2 (released in 2013) added WAL mode as an optional journaling method; it later became the recommended default in many applications. Question 7. When using the SELECT statement, which clause eliminates duplicate rows from the result set? A) LIMIT

Forensic Ultimate Exam

D) BETWEEN

Answer: B Explanation: LIKE performs pattern matching using wildcards (%) and (_) in SQLite. Question 11. Which of the following expressions correctly selects rows where column “status” is either 1, 3, or 5? A) WHERE status = 1 OR 3 OR 5 B) WHERE status IN (1,3,5) C) WHERE status BETWEEN 1 AND 5 D) WHERE status LIKE '1|3|5' Answer: B Explanation: The IN operator tests membership in a list of values; “status IN (1,3,5)” matches any of the three. Question 12. What does the BETWEEN operator include in its range? A) Only the lower bound B) Only the upper bound C) Both lower and upper bounds D) Neither bound Answer: C Explanation: BETWEEN is inclusive; “value BETWEEN 10 AND 20” matches 10, 20, and everything in between. Question 13. Which aggregate function returns the highest numeric value in a column? A) MIN() B) MAX() C) SUM() D) AVG() Answer: B

Forensic Ultimate Exam

Explanation: MAX() evaluates the maximum value among the selected rows. Question 14. If you need to count the number of distinct user IDs in a table, which clause should you use? A) COUNT(user_id) B) COUNT(DISTINCT user_id) C) SUM(user_id) D) AVG(DISTINCT user_id) Answer: B Explanation: COUNT(DISTINCT column) counts unique, non-NULL entries. Question 15. Which JOIN type returns all rows from the left table and matching rows from the right table, inserting NULLs when no match exists? A) INNER JOIN B) LEFT OUTER JOIN C) CROSS JOIN D) RIGHT OUTER JOIN Answer: B Explanation: LEFT OUTER (or simply LEFT) JOIN preserves all rows from the left side, padding with NULLs for non-matching right-side rows. Question 16. In SQLite, a CROSS JOIN produces: A) Only rows where keys match B) All possible combinations of rows from both tables C) Rows from the first table only D) Rows from the second table only Answer: B Explanation: CROSS JOIN computes the Cartesian product, pairing each row from the first table with every row of the second.

Forensic Ultimate Exam

Question 20. Which SQLite function extracts a substring starting at the 5th character with a length of 10? A) substr(column,5,10) B) substring(column,5,10) C) left(column,10) D) mid(column,5,10) Answer: A Explanation: SQLite uses substr(string, start, length); start is 1-based, so substr(col,5,10) returns characters 5-14. Question 21. To remove leading and trailing whitespace from a text column, which function is appropriate? A) trim(column) B) ltrim(column) C) rtrim(column) D) replace(column,' ','') Answer: A Explanation: trim() removes both leading and trailing spaces (and optionally other characters). Question 22. Which CASE expression correctly maps a message status integer (0 = Unread, 1 = Read, 2 = Deleted) to a textual description? A) CASE status WHEN 0 THEN 'Unread' WHEN 1 THEN 'Read' WHEN 2 THEN 'Deleted' END B) CASE WHEN status = 0 THEN 'Unread' WHEN status = 1 THEN 'Read' WHEN status = 2 THEN 'Deleted' END C) Both A and B are valid D) Neither A nor B are valid Answer: C Explanation: SQLite supports both simple CASE (A) and searched CASE (B) syntaxes; both produce the same mapping.

Forensic Ultimate Exam

Question 23. What is the purpose of the -journal file in SQLite’s rollback journal mode? A) Store permanently committed data B) Cache query plans C) Hold the original content of pages modified during a transaction D) Record user authentication details Answer: C Explanation: The rollback journal contains copies of pages before they are overwritten, enabling rollback if the transaction aborts. Question 24. During a transaction, when does SQLite write pages to the -journal file? A) At the start of the transaction for all pages B) Only when a page is first modified (lazy journaling) C) After the transaction commits D) Never; -journal is only for read-only operations Answer: B Explanation: SQLite uses “write-ahead journaling” where a page is saved to the journal the first time it is modified. Question 25. In WAL mode, which file contains the shared-memory mapping used for coordination among connections? A) -wal B) -journal C) -shm D) -lock Answer: C Explanation: The -shm (shared memory) file stores lock information and the WAL index for concurrent access. Question 26. What does a checkpoint operation in WAL mode accomplish?

Forensic Ultimate Exam

C) Index segment D) Payload buffer Answer: B Explanation: Freeblocks are unused slots within a page where deleted record payloads may linger. Question 30. In SQLite, where are overflow cells stored when a row’s payload exceeds the usable space on a leaf page? A) Inside the same leaf page, truncated B) In a separate overflow page linked via a pointer C) In the -wal file only D) In the sqlite_master table Answer: B Explanation: Large payloads are split; the excess is stored in overflow pages linked from the original cell. Question 31. Which pragma lists all freeblocks in the database file? A) PRAGMA freelist; B) PRAGMA free_blocks; C) PRAGMA page_count; D) No pragma directly lists freeblocks; you must parse the file header. Answer: D Explanation: SQLite does not expose freeblock details via a pragma; they are internal to the page structure. Question 32. Which Android database typically stores SMS messages? A) contacts.db B) sms.db C) calllog.db D) media.db

Forensic Ultimate Exam

Answer: B Explanation: The default Android SMS provider uses the file sms.db to store text messages. Question 33. In iOS, the file “CallHistory.storedata” is most closely associated with which SQLite table? A) ZCALLRECORD B) ZMESSAGE C) ZCONTACT D) ZAPPDATA Answer: A Explanation: The CallHistory store contains a ZCALLRECORD table that holds call log entries. Question 34. Which Chromium-based browser stores its history in a SQLite file named “History”? A) cookies.sqlite B) History.db C) History D) WebHistory.sqlite Answer: C Explanation: The file is simply named “History” (no extension) and is a SQLite database containing visited URLs. Question 35. Which SQLite table typically contains autofill form data for Chrome on Android? A) autofill_profiles B) autofill_data C) autofill_entries D) form_data Answer: B

Forensic Ultimate Exam

Explanation: The “AS” keyword creates an alias for the column in the query result set. Question 39. In SQLite, what does the “AUTOINCREMENT” keyword guarantee? A) That rowids are never reused after deletion B) That rowids are random C) That the column will be indexed automatically D) That the column cannot be NULL Answer: A Explanation: AUTOINCREMENT forces SQLite to keep a separate counter in sqlite_sequence, preventing reuse of previously used ROWIDs. Question 40. Which pragma returns the size of each database page in bytes? A) PRAGMA page_size; B) PRAGMA page_count; C) PRAGMA page_size_bytes; D) PRAGMA page_length; Answer: A Explanation: PRAGMA page_size reports the current page size setting (e.g., 1024, 4096). Question 41. If a SQLite database is opened with “PRAGMA foreign_keys = ON;”, what effect does this have? A) Enables enforcement of foreign-key constraints during INSERT/UPDATE/DELETE B) Disables all indexes for performance C) Switches the storage engine to InnoDB D) Encrypts foreign key columns Answer: A Explanation: Enabling foreign_keys makes SQLite check referential integrity for operations that affect related tables.

Forensic Ultimate Exam

Question 42. Which SQLite function returns the current Unix timestamp (seconds since 1970- 01 - 01)? A) CURRENT_TIMESTAMP B) strftime('%s','now') C) datetime('now') D) unixepoch() Answer: B Explanation: strftime('%s','now') yields the number of seconds since the Unix epoch. Question 43. In a forensic context, why is the “sqlite_sequence” table important? A) It logs all executed SQL statements B) It stores the last AUTOINCREMENT value for each table C) It contains deleted rows for recovery D) It holds the database’s encryption key Answer: B Explanation: sqlite_sequence tracks the most recent ROWID for tables that use AUTOINCREMENT, useful for timeline reconstruction. Question 44. Which SQLite data type can store arbitrary binary data such as images? A) TEXT B) BLOB C) INTEGER D) REAL Answer: B Explanation: BLOB (Binary Large Object) holds raw bytes without interpretation. Question 45. How can you extract the first 4 bytes of a BLOB column as a hexadecimal string? A) hex(substr(blob_column,1,4))

Forensic Ultimate Exam

D) PRAGMA wal_max_size; Answer: A Explanation: PRAGMA wal_autocheckpoint(N) triggers a checkpoint after N pages have been written to the WAL. Question 49. In SQLite, what does the “sqlite_temp_master” table contain? A) Temporary tables, indexes, and views created during the session B) Permanent schema definitions C) Cached query plans D) User authentication tokens Answer: A Explanation: sqlite_temp_master mirrors sqlite_master but for temporary objects that exist only for the duration of the connection. Question 50. Which SQLite function can be used to format a timestamp as “YYYY-MM-DD HH:MM:SS”? A) datetime(timestamp) B) strftime('%Y-%m-%d %H:%M:%S', timestamp) C) date(timestamp) D) time(timestamp) Answer: B Explanation: strftime allows custom format strings; the pattern shown yields the desired format. Question 51. Which of the following best describes the “overflow page” concept? A) A page that holds index entries exceeding a leaf page’s capacity B) A page that stores excess row payload when it does not fit in the original leaf page C) A page that contains uncommitted transaction data D) A page that caches query results

Forensic Ultimate Exam

Answer: B Explanation: Overflow pages are linked from a cell when the payload is larger than the space available on the leaf page. Question 52. When performing a forensic carve of a SQLite file, which byte pattern typically indicates the start of a new page? A) 0x00 0x00 0x00 0x B) The page type byte (e.g., 0x0D for leaf table B-Tree) at offset 0 of each page C) 0xFF 0xFF 0xFF 0xFF D) The magic string “SQLite format 3” Answer: B Explanation: Each page begins with a one-byte type identifier (e.g., 0x0D for leaf table pages); forensic tools use this to locate page boundaries. Question 53. In Android, which column in the “sms” table typically stores the timestamp of a message in milliseconds since epoch? A) date_sent B) date_received C) timestamp D) date Answer: D Explanation: The “date” column in sms.db stores the message time as milliseconds since Unix epoch. Question 54. Which SQL clause would you use to ensure that duplicate rows are eliminated before applying GROUP BY? A) DISTINCT B) UNIQUE C) PRIMARY KEY D) HAVING Answer: A

Forensic Ultimate Exam

Explanation: The last AUTOINCREMENT value can hint at rows that existed before being deleted, aiding timeline reconstruction. Question 58. Which SQLite command can be used to vacuum a database, thereby rewriting it and eliminating free space? A) VACUUM; B) REINDEX; C) ANALYZE; D) COMPACT; Answer: A Explanation: VACUUM creates a new copy of the database without freeblocks, reclaiming space. Question 59. Which SQLite pragma returns the number of pages in the file? A) PRAGMA page_count; B) PRAGMA page_size; C) PRAGMA database_size; D) PRAGMA file_pages; Answer: A Explanation: PRAGMA page_count reports the total number of pages currently in the database file. Question 60. When a SQLite database is opened in “read-only” mode, which of the following files will not be created or modified? A) -wal B) -shm C) -journal D) All of the above Answer: D Explanation: Read-only mode prevents any journaling or WAL files from being written.

Forensic Ultimate Exam

Question 61. Which SQLite function can be used to calculate the number of days between two dates? A) julianday(date2) - julianday(date1) B) datediff(date2, date1) C) days_between(date1, date2) D) date_diff(date2, date1) Answer: A Explanation: julianday returns the Julian day number; subtracting two values yields the day difference. Question 62. In a forensic timeline, which SQLite function helps convert a Unix epoch stored as INTEGER milliseconds to seconds? A) CAST(epoch/1000 AS INTEGER) B) epoch / 1000. C) datetime(epoch/1000, 'unixepoch') D) All of the above (they all work) Answer: D Explanation: All three expressions effectively convert milliseconds to seconds; CAST ensures integer division. Question 63. Which SQLite pragma can be used to list all attached databases and their file paths? A) PRAGMA database_list; B) PRAGMA attached_databases; C) PRAGMA list_databases; D) PRAGMA file_list; Answer: A Explanation: PRAGMA database_list returns a table with the name, file path, and other info for each attached database.