SQLite Database Manager

[Exit]

Database

[Create] [Load]

Name

File

Location

[Delete] [Tables] [Export]

Test Album

album.db

c:\data\temp\

[Delete] [Tables] [Export]

cma

cms.db

c:\data\temp\

[Delete] [Tables] [Export]

erp

testErp.db

C:\data\temp\

[Delete] [Tables] [Export]

test

test.db

c:\data\temp\

Here you can:
[Create] a database
[Load] an existing database
[Delete] a database
Look at the
[Tables] in a database
[Export] the databse schema and data.


Creating a Database
To create a database, give it a name, such as Inventory
Tell it where you want to create the database and the file name. Example c:\rbp\inventory_project\inv.db

Create Database

Name

File

[Create] [Exit]


Loading a Database.
Used to load existing databases into the system.

Give it a name, such as Sales
Tell it where you want the database is located. Example c:\rbp\sales_project\sales.db

Load Database

Name

File

[Create] [Exit]


Delete a database.
Deleteing a database does not delete it from disk. It only deletes it from the SQLite management system.

Database

[Create] [Load]

Name

File

Location

[Delete] [Tables] [Export]

Test Album

album.db

c:\data\temp\

[Delete] [Tables] [Export]

cma

cms.db

c:\data\temp\

[Delete] [Tables] [Export]

erp

testErp.db

C:\data\temp\

[Delete] [Tables] [Export]

test

test.db

c:\data\temp\

Delete Database:Test Album

This will delete the database from your management list,
but not the database file.

[Delete] [Exit] 


Tables.
This will show you all the tables in a database.
You can :
Look at the fields in a table
Browse a table
Query the table with your sql statement
Empty a table of all it's data
Dropping a table will delete it from the database
Add a table to the database
** Note when adding a talbe a field "X" is created. That is because SQLite will not let you create a empty table. So after it is created you can delete the "X" field

Database:cma

c:\data\temp\cms.db 5 Tables

[Fields] [Browse] [Query] [Empty] [Drop]

form

[Fields] [Browse] [Query] [Empty] [Drop]

formDtl

[Fields] [Browse] [Query] [Empty] [Drop]

tblField

[Fields] [Browse] [Query] [Empty] [Drop]

webMenu

[Fields] [Browse] [Query] [Empty] [Drop]

webPage

[Add Table] [Exit]


Fields
This shows all the fields in a table. Shown is the field name, type of field, the length and decimal places, the Default, Is it Null and is it a primary key.
You can [Change] or [Delete] a field
If you add, enter the number of fields you want to add
You can add fields [Before] a field
You can add fields [At End]

Index
It shows all the indecies.
You can Delete a index or add a index. You cannot change a indes.

Database:cma Table:form

Maint

Add
Field(s)

Name

Type

Length

Dec

Def

Null

Primary

[Change] [Delete]

[Before]

formId VARCHAR

20

 

 

 

 

[Change] [Delete]

[Before]

formType CHAR

1

 

 

 

 

[Change] [Delete]

[Before]

numRows INT

2

 

 

 

 

[Change] [Delete]

[Before]

numCols INT

2

 

 

 

 

[Change] [Delete]

[Before]

formColor CHAR

6

 

 

 

 

[Change] [Delete]

[Before]

formBorder INT

1

 

 

 

 

[Change] [Delete]

[Before]

formDec DECIMAL

5

2

 

 

 

[Change] [Delete] 

[At End]

 

 

 

 

 

 

 

[Exit]

Database Keys

Action

Key Name

Type

Field

[Delete] Form_

INDEX

formId

[Add Index]


Add Change and Delete brings up this form.
Give the field a unique name
Select the field type.
Give the length and decimals if any
Give it a default value if any. If you give it a default value, you must set the Null field to NOT NULL

Datbase:cmaTable:webPage

Num

Name

Type

Length

Decimal

Default

Null

1

Change Exit


Query
Here you can test out your SQL commands.
Any valid sql command will be accepted.
If you use a SELECT statement without a LIMIT the system will default to LIMIT 0,20
Remember that SQL engines will not accept the double qoute (")
Therefore if you do something like UPDATE abc SET a = "B" will be in error the be must be enclosed in single qoutes as 'B'
It shows all fields available in all talbes of the database to the right for your convenience.

Database:Test Album

Table.Name

On SELECTS if you do not specify a LIMIT the system defaults to LIMIT 0,20
Remember that SQL commands will not allow the double qoute (") only single quotes (')

[Execute] [Exit]


Execute Query
You query will bring up this screen if it is a SQL select statement.
You can generate the RunBasic code that generated this query.
The Generated RB code is shown on the screen. You can cut and paste it into a Run Basic Program.

Database:Test Album

albNum

medNum

medId

medDate

medLoc

medName

medDescr

medWide

medHigh

medSeq

4 18 mmas01.jpg       Johnna is Santa 320 240 10
4 20 mmas03.jpg       Santa is busy 320 240 20
4 21 mmas04.jpg         320 240 30
4 22 mmas07.jpg         320 240 40
4 23 mmas08.jpg         320 240 50

[Gen RB Code] [Query] [Exit]


Export
You can export:
1 A CSV file
2. Schema Only
3 Schema and Data
4 Data only.
Data export is necessary to backup your files.
Export Database:Test Album

[CSV] [SQL]

If you request a CSV file you can choose all the tables in the database or select the individual tables.
You have the option of how you want fields terminated, and weather you want them enclosed or not.

Also you can select your escape character

Optionally you can place the field names on the first row

Tables

 *All*
 admin
 album
 media

Fields terminated by

Fields enclosed by

Fields escaped by

 Put field names on first row

[Export] [Exit]

Exporting Sql
You have choices of what to export. Optionally you can add the Drop command to your export. You can also do complete inserts. If you plan on changing the database then complete inserts may be your best option.

Export

1 Structure only
2 Structure and Data
3 Data only

Structure

 Add Drop

Data

 Complete Inserts

Export File:erp.sql

[Export] [Exit]