You are on page 1of 5

1.

SQLite
1.1 Introduction SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine. The code for SQLite is in the public domain and is thus free for use for any purpose, commercial or private. SQLite is currently found in more applications than we can count, including several high-profile projects. SQLite is an embedded SQL database engine. Unlike most other databases, SQLite does not have a separate server process. SQLite reads and writes directly to ordinary disk files. A complete SQL database with multiple tables, indices, triggers, and views, is contained in a single disk file. These features make SQLite a popular choice as an Application File Format. There is a tradeoff between memory usage and speed. 1.2 Unique Features No configuration. Just drop in the C library and go. No server process to administer or user accounts to manage. Easy to backup and transmit database (just copy the file) Dynamic typing for column values, variable lengths for column records Query can reference multiple database files A few non-standard SQL extensions (mostly for conflict resolution)

1.3 Specifications for SQLite SQLite is different from most other SQL database engines in that its primary design goal is to be simple. It works well with: Application file format transactions guarantee ACID, triggers provide undo/redo feature Temporary data analysis command line client, import CSV files and use SQL to analyze & generate reports Testing stand-in for enterprise DB during application testing (limits potential damage) Embedded devices small, reliable and portable

1.4 SQLite with Command Prompt

To create database, we have involved Command Prompt with SQLite. By using this, we created multiple tables and then transferred this to SQLite. The following steps show te creation of tables with the corresponding screenshots 1.4.1 Database name and Table Creation Initially the command prompt window is opened and the corresponding directory is chosen using the change directory command. The example below shows the creation of DB with name pump (pump.db). By using create table with table name pumpdata the following fields pressure1,pressure2 speed are created. The data types should be assigned along with the fields. It should also be noted that the ending of each line should be terminated with ;

1.4.2 Inserting values in table In order to insert values in the table the following figure givers the guidance. Insert into tablename values is the statement used. Thereby, the values corresponding to the fields can be assigned. The syntax .schema helps to see the table. The .db file is created and hence the file can be opened in SQLite Manager

2.

SQLite Manager

SQLiteManager is a powerful database manager for SQLite databases, it combines an incredible easy to use interface with blazing speed and advanced features. The software used in our project is SQLite 3 (v.3.8.5) coded by SQLabs Group. It allows you to create and browse tables, views, triggers and indexes. It enables to insert, delete and updates records in a very intuitive way, it supports arbitrary SQL commands. This software is also available as a freeware in the internet. Some of the features of this Manager are: Powerful GUI Print Preview Database Recovery Chart Panel Print Options Bug Reporting Scripting Language

In the following topics, we see how to create and use SQLite manager with the help of screenshots
2.1

Start Up wizard:

Within the Start up Wizard you can: Open an existing database Open a recently used database Create a new database (sqlite2, sqlite3, encrypted database or in-memory) Connect to a REAL Server or cubeSQL Server Convert a local sqlite 2 database Exit from SQLiteManager

2.2

SQLiteManager Design Panel:

The Design panel is where you create, inspect and update tables, views, indexes, triggers, report templates, SQL and Notes in a database.

2.3

To create tables:

Under the Database menu one can find the option to create table or shortcut key (Ctrl + T). You can name your table, and then add columns to it. You may also set the properties of each field, such as whether a field is a Primary Key, not null, Unique.

2.4

ProMA PumpData Query:

The final queried database can be seen as follows for the pump

You might also like