05 - SQlite Flashcards
1
Q
What is SQLite?
A
Public-domain, lightweight RDBMS, follows nearly entire SQL-92. Designed by D. Richard Hipp, 2000.
Main features:
- Serverless
- Zero configuration
- Cross-platform
- Small Runtime Footprint
- Highly Reliable
- Self-contained
Many applications use SQLite3: WhatsApp, Skype, Mozilla Firefox, Chrome.
2
Q
Name the commands for:
- Display tables
- Display schema of a table
- To change the output
- To quit
A
- .tables
- .schema
- .output
- .quit
3
Q
What are the five data types in SQLite?
A
- INTEGER
- TEXT (CHAR, VARCHAR, TEXT, …)
- REAL (REAL, DOUBLE, FLOAT, …)
- NUMERIC (BOOLEAN, DATETIME, NUMERIC, …)
- NONE
4
Q
How can you auto increment a field in SQL?
A
CREATE TABLE person (
PID INTEGER PRIMARY KEY AUTOINCREMENT
Name TEXT
);
5
Q
What is the SQLite_Master table?
A
Contain information on all tables, indexes and keys.
Get information from sqlite_master table:
SELECT * FROM sqlite_master;
Show the structure of the sqlite_master table:
.schema sqlite_master;
6
Q
What are the five steps to analysis unknown databases?
A
- Understand / Use the Application
- Find the SQLite files
- Gather information on each database file
- Perform common application tasks
- Develop SQL queries to extract information