Docsity

Access Data Advanced SQLite Mobile Application Analysis Exam, Exams of Technology

Toggle sidebar
bg1
Access Data Advanced SQLite Mobile Application
Analysis Exam
Question 1. **What does the first 16‑byte header of an SQLite file contain?**
A) Page size and file format version
B) Database schema version only
C) Encryption key
D) User‑defined metadata
Answer: A
Explanation: The 16‑byte header stores the magic string “SQLite format 3”, the page size, file
format write version, read version, reserved space, and other flags that define the database file
layout.
---
Question 2. **In SQLite B‑Tree terminology, which page type stores actual table rows?**
A) Interior B‑Tree page
B) Leaf B‑Tree page
C) Freelist trunk page
D) Pointer‑map page
Answer: B
Explanation: Leaf B‑Tree pages contain the payload cells that hold the serialized row records for
tables (or index entries for indexes).
---
Question 3. **Which SQLite page type is used to keep track of free pages that can be reused?**
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
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download Access Data Advanced SQLite Mobile Application Analysis Exam and more Exams Technology in PDF only on Docsity!

Analysis Exam

Question 1. What does the first 16‑byte header of an SQLite file contain? A) Page size and file format version B) Database schema version only C) Encryption key D) User‑defined metadata Answer: A Explanation: The 16‑byte header stores the magic string “SQLite format 3”, the page size, file format write version, read version, reserved space, and other flags that define the database file layout.


Question 2. In SQLite B‑Tree terminology, which page type stores actual table rows? A) Interior B‑Tree page B) Leaf B‑Tree page C) Freelist trunk page D) Pointer‑map page Answer: B Explanation: Leaf B‑Tree pages contain the payload cells that hold the serialized row records for tables (or index entries for indexes).


Question 3. Which SQLite page type is used to keep track of free pages that can be reused?

Analysis Exam

A) Overflow page B) Freelist leaf page C) Pointer‑map page D) Interior B‑Tree page Answer: B Explanation: Freelist leaf pages are linked together to form a list of free pages available for allocation; trunk pages hold pointers to leaf pages.


Question 4. What is the purpose of an overflow page in SQLite? A) Store large BLOB or TEXT payloads that do not fit in a single cell B) Hold index entries for virtual tables C) Record transaction log entries D) Cache frequently accessed rows Answer: A Explanation: When a cell’s payload exceeds the maximum size that can be stored on the originating leaf page, the excess is placed on overflow pages linked together.


Question 5. Which command reclaims unused space in an SQLite database file by rebuilding it? A) ANALYZE

Analysis Exam

C) PRAGMA cache_size; D) PRAGMA foreign_keys; Answer: A Explanation: PRAGMA page_size returns the number of bytes per database page, which is defined in the file header.


Question 8. During manual recovery, what signature should a hex editor search for to locate the start of an SQLite database within raw data? A) 0x89 0x50 0x4E 0x B) “SQLite format 3” ASCII string C) “PK” (ZIP) header D) “%PDF-” Answer: B Explanation: The literal ASCII string “SQLite format 3\0” appears at offset 0 of every SQLite file, serving as a reliable identifier.


Question 9. What does a freelist trunk page contain? A) Payload data for table rows B) Pointers to freelist leaf pages C) Index keys for a virtual table

Analysis Exam

D) Transaction log sequence numbers Answer: B Explanation: A trunk page holds an array of page numbers that point to leaf pages on the freelist, forming the free‑page hierarchy.


Question 10. When parsing unallocated “slack” space between pages, which of the following is most likely to be found? A) Complete B‑Tree structures B) Residual cell fragments from deleted rows C) Encrypted WAL frames D) SQLite journal headers Answer: B Explanation: Slack space often contains remnants of cell payloads from rows that were removed but not overwritten, useful for carving orphaned data.


Question 11. Which of the following best describes an orphaned record in SQLite forensic analysis? A) A row whose primary key is duplicated B) A cell that exists on a leaf page but lacks a parent pointer in the B‑Tree hierarchy C) A record stored in the WAL but not yet checkpointed

Analysis Exam

Answer: A Explanation: The *.shm file stores lock state and checkpoint metadata used by concurrent readers and writers in WAL mode.


Question 14. During a WAL checkpoint, what happens to frames that have been successfully transferred to the main database file? A) They remain unchanged in the *.wal file B) They are truncated from the beginning of the *.wal file C) They are moved to a separate archive file D) They are encrypted and stored back in the journal Answer: B Explanation: After a checkpoint, the frames that have been applied to the database are removed, shrinking the WAL file from the front.


Question 15. Which SQL function can convert a Unix epoch timestamp stored as INTEGER into a human‑readable UTC datetime? A) datetime(timestamp, 'unixepoch') B) strftime('%Y-%m-%d', timestamp) C) cast(timestamp as TEXT) D) time(timestamp, 'localtime')

Analysis Exam

Answer: A Explanation: The datetime() function with the ‘unixepoch’ modifier interprets the integer as seconds since 1970‑ 01 ‑01 UTC.


Question 16. In iOS, which SQLite table typically contains SMS messages? A) sms_messages B) chat_history C) message D) sms Answer: D Explanation: The iOS Messages app stores SMS data in a table named “sms” within the “sms.db” database.


Question 17. When a BLOB column stores a Protocol Buffers (Protobuf) message, what is the most reliable way to extract its fields? A) Use SQLite’s built‑in protobuf() function B) Export the BLOB and parse it with a Protobuf library outside SQLite C) Convert the BLOB to HEX and read manually D) Run PRAGMA table_info to decode the structure

Analysis Exam

Explanation: integrity_check scans the entire database file for structural corruption, ensuring page linkages and checksums are valid.


Question 20. Which SQL clause is used to eliminate duplicate rows from a query result set? A) UNIQUE B) DISTINCT C) GROUP BY ALL D) HAVING Answer: B Explanation: DISTINCT removes duplicate rows, returning only unique combinations of the selected columns.


Question 21. In SQLite, how many bytes are reserved on each page for future use, as defined in the file header? A) 0 to 255 bytes, configurable via PRAGMA reserve_size B) Always 0 bytes C) Exactly 16 bytes D) 64 bytes fixed Answer: A

Analysis Exam

Explanation: The reserved space field (1 byte) specifies how many bytes at the end of each page are set aside for extensions; it can be altered with PRAGMA reserve_size.


Question 22. Which of the following statements about SQLite’s pointer‑map pages is true? A) They store the actual row data for tables with no primary key B) They map each page number to the type of page and its parent page C) They are only created when the database uses encryption D) They replace the need for a freelist Answer: B Explanation: Pointer‑map pages aid in fast page type lookup and parent identification, especially useful for incremental vacuum.


Question 23. When carving data from a raw disk image, which hex pattern indicates the start of a SQLite overflow page? A) 0x0D 0x0A 0x00 0x B) 0x05 0x00 0x00 0x00 (page type 5) C) 0x0F 0xFF 0xFF 0xFF D) 0xFF 0xFF 0xFF 0xFF Answer: B

Analysis Exam

Explanation: WhatsApp stores each chat message in the “messages” table, including columns like “text”, “timestamp”, and “key_remote_jid”.


Question 26. What is the effect of setting journal_mode to WAL on concurrent readers? A) Readers must wait for the writer to finish each transaction B) Readers can access the main database file without being blocked by writers C) Readers are forced to read from the .journal file D) Readers are disabled until checkpoint completes Answer: B Explanation: WAL enables readers to read the stable database file while writers append changes to the WAL, eliminating read‑write locks.


Question 27. Which SQLite function can be used to extract the year component from a Unix epoch timestamp? A) strftime('%Y', datetime(timestamp, 'unixepoch')) B) year(timestamp) C) substr(timestamp, 1, 4) D) date(timestamp, 'unixepoch') Answer: A

Analysis Exam

Explanation: strftime with ‘%Y’ returns the four‑digit year after converting the integer to a datetime using the ‘unixepoch’ modifier.


Question 28. During a forensic examination, you find an orphaned leaf page that contains a cell with a payload size of 0. What does this indicate? A) The cell is a placeholder for future inserts B) The payload was deliberately zeroed to hide data C) The page is corrupted and should be ignored D) The cell represents a deleted row that has been partially cleared Answer: D Explanation: SQLite zeroes out the payload of a deleted row while leaving the cell header; a size of 0 suggests the row data was removed but the cell remains.


Question 29. Which SQLite command can be used to rebuild the database file without copying data, thereby eliminating fragmentation? A) PRAGMA incremental_vacuum; B) PRAGMA auto_vacuum = FULL; C) VACUUM; D) ANALYZE; Answer: C

Analysis Exam

Explanation: Each WAL frame’s header includes the page number of the database page that the frame’s content will overwrite upon checkpoint.


Question 32. Which SQLite data type can store arbitrary binary data such as images or PDFs? A) TEXT B) BLOB C) REAL D) NUMERIC Answer: B Explanation: BLOB (Binary Large Object) is designed for storing raw binary streams without any interpretation.


Question 33. What is the default journal mode for a newly created SQLite database on most platforms? A) DELETE B) TRUNCATE C) WAL D) MEMORY Answer: A

Analysis Exam

Explanation: SQLite’s default journal mode is DELETE, where the journal file is removed after each transaction commits.


Question 34. In Android, which content provider URI is used to access the SMS/MMS database? A) content://sms/ B) content://mms/ C) content://mms-sms/conversations/ D) content://telephony/sms Answer: C Explanation: The “content://mms-sms/conversations/” URI provides a unified view of SMS and MMS messages across devices.


Question 35. Which SQLite pragma can be used to enable automatic incremental vacuuming? A) PRAGMA auto_vacuum = INCREMENTAL; B) PRAGMA incremental_vacuum = ON; C) PRAGMA vacuum_mode = INCREMENTAL; D) PRAGMA auto_increment = TRUE; Answer: A

Analysis Exam

Question 38. Which of the following timestamps is used by macOS “Absolute Time” (also known as Cocoa time)? A) Seconds since 1970‑ 01 ‑01 UTC B) Milliseconds since 1970‑ 01 ‑01 UTC C) Seconds since 2001‑ 01 ‑01 00:00:00 UTC D) Nanoseconds since 1601‑ 01 ‑01 UTC Answer: C Explanation: macOS “Absolute Time” counts seconds (as a floating‑point value) from the reference date 2001‑ 01 ‑01.


Question 39. In SQLite, which clause is required to retrieve rows that have no matching entry in a second table when using a LEFT JOIN? A) WHERE second_table.id IS NULL B) HAVING second_table.id = NULL C) ON second_table.id = NULL D) GROUP BY second_table.id Answer: A Explanation: After a LEFT JOIN, rows without a match have NULL in the columns of the right‑hand table; filtering with WHERE … IS NULL selects those rows.

Analysis Exam

Question 40. Which SQLite command can be used to list all tables, indexes, and triggers in the current database? A) .schema B) .tables C) SELECT name FROM sqlite_master WHERE type='table'; D) PRAGMA table_list; Answer: D Explanation: PRAGMA table_list returns a result set containing the names, types (table, index, view, trigger), and other metadata for all schema objects.


Question 41. When an SQLite database is opened in read‑only mode, which of the following operations is still possible? A) INSERT INTO table … B) CREATE INDEX … C) SELECT queries D) VACUUM Answer: C Explanation: Read‑only mode permits only SELECT (and other read‑only) statements; any write operation is blocked.