Database systems
A5 SQLite guide
1) Save A5pm.txt and SQLite (sqlite3.exe) in the same folder. Files can also be called using complete path from other folders.
2) Open SQLite command line interface by double clicking on SQLite.exe or it can be called from cmd.exe with path provided.
3) Setting initiation commands:
a. .header on
b. .mode col
4) Making in-memory database
a. Output file can be set in A5pm.txt or in sqlite console as
.echo on
b. .read A5pm.txt in SQLite command line interface
c. OutputTables.txt file will be created in the same folder
d. Use Notepad++ to get a better view of the file
5) Query database and get results in command line interface
a. .output off
b. .echo on
c. Apply query in the command line and get output in the same interface
6) Query database and get results in an output file
a. .output outFile.txt
b. .echo on
Enter query in command line and the results will be written in the specified output file
c. Read output from the file in Notepad++ for better viewing
7) Query database using a query file and get results written in an output file specified (a more convenient option)
a. Create a queryFile.txt as follows and call this file as .read queryFile.txt
b. Output can be obtained in commandline interface using .output off in the queryFile.txt
c. Output can be written in an outfile specified in the queryFile.txt