Menu

User documentation

Máté Kovács

User documentation

About the program

This program simulates a database handling system. It's not a relational
database system, it can handle simple databases. The user can make data-
bases and tables in a database. Tables have header line, which determine the
types of the columns in the rows. Types can be string, int (integer), double
(foating number) or bool (boolean). These values can be null as well, if the
isNull flag is set to true.

Conditions of usage

The user doesn't have to do preparations before the usage of the program.
The handler creates all the files which they are needed for the running of the
program. The user should not delete the created files! It's needed to give
rights of creating files and directories in the main directory to the program.

Installing and running the program

The user doesn't have to install the program. Running the program is single.
There's an exe file (szofttek.exe) which is the whole database handling sys-
tem. Files and directories will be created by the exe.

Known errors and repairs

There's no known error. The handling system handles every exception which
is thrown by the classes in the program. These exceptions will be written
into the screen by the handler and this gives informations about the error.
Tables can be damaged by manually modifying the table and database .dat
files. Please don't do that, it can occur that the user can't load databases.

Roles and functions

The user can operates the database via a command line. The command line
has two kinds of commands. One of them is the commands which won't
modify the database itself. The other type of commands can modify the
database itself. These commands are case sensitive.

First type of commands:
  1. exit
    This command closes the program.
  2. help
    This command shows the help section of the program.
    Variants: ?, h
  3. clear
    This command clears the command prompt.
Second type of commands:
  1. DATABASE LIST
    This command lists the existing databases.
  2. DATABASE CLOSE
    This command closes the opened database.
    If there's no opened database, the handler'll alert the user.
    The database is saved when this command is given.
  3. DATABASE CREATE <NAME>
    This command creates a new database with the name <NAME>. (e.g. DATABASE CREATE testdatabase)
    <NAME> has to be have only lower-case characters. (e.g. <NAME> = testdatabase)
  4. DATABASE OPEN <NAME>
    This command opens an existing database with the name <NAME>. (e.g. DATABASE OPEN testdatabase)
    If there's no database with the given name <NAME>, the handler'll alert the user.
  5. DATABASE REMOVE <NAME>
    This command removes an existing database with the name <NAME>. (e.g. DATABASE REMOVE testdatabase)
    If there's no database with the given name <NAME>, the handler'll alert the user.
  6. TABLE CREATE <TABLENAME> WITH [<COL1NAME>:<COL1CANBENULL>:<COL1TYPE>,...,<COLNNAME>:<COLNCANBENULL>:<COLNTYPE>]
    This command creates a table into the opened database.
    <TABLENAME> has to be have only lower-case characters. This <TABLENAME> has to be an non-existing table. (e.g. <TABLENAME> = testtable)
    <COLXNAME> is a string.
    <COLXCANBENULL> is one of the following values: 0 or 1. 1 if this column can be NULL, 0 if not. NULL is an unset value.
    <COLXTYPE> is one of the following values: STRING, INT, DOUBLE or BOOL.
  7. TABLE ADD <COLNAME:COLTYPE> TO <TABLENAME>
    This command adds a new column to the existing table.
    <COLNAME> and <COLTYPE> are the same types as in the section TABLE CREATE.
    <TABLENAME> has to be have only lower-case characters. This <TABLENAME> has to be an existing table. (e.g. <TABLENAME> = testtable)
  8. TABLE REMOVE <COLNAME> FROM <TABLENAME>
    This command removes a column from the existing table.
    <TABLENAME> has to be have only lower-case characters. This <TABLENAME> has to be an existing table. (e.g. <TABLENAME> = testtable)
  9. TABLE DELETE <TABLENAME>
    This command deletes an existing table.
    <TABLENAME> has to be have only lower-case characters. This <TABLENAME> has to be an existing table. (e.g. <TABLENAME> = testtable)
  10. TABLE EMPTY <TABLENAME>
    This command cleares the data in an existing table.
    <TABLENAME> has to be have only lower-case characters. This <TABLENAME> has to be an existing table. (e.g. <TABLENAME> = testtable)
  11. ROW ADD [<VALUE1>,...,<VALUEN>] TO <TABLENAME>
    This command adds a new row to a existing table.
    <VALUE1> should fit the tpye of that column.
    <VALUE1> is a normal string without quotation marks if the type is string (e.g apple). It's TRUE or FALSE if the type is bool. It's a number if the type is int or double (e.g. 4 or 5.43). If the value can be NULL, than NULL value is NULL.
    <TABLENAME> has to be have only lower-case characters. This <TABLENAME> has to be an existing table. (e.g. <TABLENAME> = testtable)
  12. ROW LIST <TABLENAME>
    This command lists the header line and the rows of an existing table.
    <TABLENAME> has to be have only lower-case characters. This <TABLENAME> has to be an existing table. (e.g. <TABLENAME> = testtable)
  13. ROW LIST <TABLENAME> WHERE <COLNAME><OPERATOR><VALUE>
    This command lists the header line and the rows which are fit the condition.
    <COLNAME> is a name of a column.
    <OPERATOR> can be = if the type is string or bool. It can be =, >, < if the type is int or double.
    <VALUE> should match the type of the column.
    <TABLENAME> has to be have only lower-case characters. This <TABLENAME> has to be an existing table. (e.g. <TABLENAME> = testtable)
  14. ROW DELETE <TABLENAME> WHERE <COLNAME><OPERATOR><VALUE>
    This command deletes rows from an existing table which fit the condition.
    <COLNAME>, <OPERATOR> and <VALUE> are the same as in section ROW LIST.
    <TABLENAME> has to be have only lower-case characters. This <TABLENAME> has to be an existing table. (e.g. <TABLENAME> = testtable)

The documentation can be downloaded here in pdf format: http://sourceforge.net/projects/softwaretechnologykovcsmt/files/user.pdf/download


Related

Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.