How to manipulate a Database in SPRING System

This page describes the procedures to create, activate and delete a Database.


In order to enter data in SPRING System, it is first required to create a Data Base and define its
Data Model. In order to perform any task a Database has to be active and the data categories that will be handled in the Database have to be declared.

Once the Database is created, it will be necessary to define a Project with its geographical or planar coordinates and the projection system. Once these parameters are defined then it is possible to enter or handle data in SPRING System. This SPRING system structure guarantees an geographical Database organization allowing and efficient data recover and data storage

An Spring Database corresponds physically to a directory where the Data Model, with its Classes and Categories definitions, as well as the Database projects will be stored. The projects will be stored in sub directories together with its data files: points, lines, orbital and aerial images, thematic images, texts. grids and objects.

First we should create the Database and then we can activate it and enter data in it.


See also:
Conceptual Model
Modeling Processes
Main Steps Main Steps to work with SPRING



How to create a Database

Creating a Database means to create a folder where data will be stored, and also to select the Database management system that will be used to store and retrieve tabular data. The user has the following options: DBase, Access, Oracle, MySQL, PostgreSQL or SQLite. The DBase or SQLite manager doesn't need to be installed in the computer, because SPRING installation already provides the required tools to handle DBase and SQLite tables. The Access can be used without the MS Office system, in this case, the JET (drive for Access) has to be installed. To use MySQL, the user must install the 5.x version (or compatible) and, to use PostgreSQL, the 8.2 version must be installed. For the Oracle option the Oracle manager has to be installed in a server.

The SPRING System works in its original form with a Database manager, it doesn't matter what Database manager is selected, the user will handle all data using SPRING interface.

It is required though that the user logged in SPRING System has permission to write in the Database directory. It is strongly suggested that the user creates the springdb directory and a sub directory and also check that the hard drive has enough space to store the Database that will be created. Creating a Database is not enough, in order to write or change data in the Database it is required to activate the Database.

NOTE: The "Database" window will be displayed together with the Main Menu in the "spring" module initialization.

Creating a Database:

  • click in File - Database...in the main menu or in the icon in the tools bar, if the window does not open;
  • click in Directory... to select a directory where the Database will be created. The "Select a Directory" window is shown ( how to use it);
  • type the Database Name that will be created, you can use at most 32 characters without spaces;
  • click in Manager and select among Dbase, Access, Oracle, MySQL, PostgreSQL or SQLite - READ more about the Database managers bellow;
  • click in Create to create a Database. Notice that the name typed will be included in the list above.
    • for the Access manager, it will be asked if the user wants to define a password to protect the Database. Answer "Yes" to add a password;
    • for the Oracle manager, the Database name will be requested (Databases) local or remote, the user name (User) has to have permissions to create tables in the Database and a password (Password) for this user;

NOTES:

  1. - Use only letters and numbers in the Database name. Special characters (! @ # $ % ^ & * ( ) - + = | \ { [ } ] : ; " ’, < > . / ?) or blanks will be automatic deleted from the name when you click in Create.
  2. - As SPRING automatically saves any handled data, we would like to emphasize that you should make security copies of the files you are handling periodically, because any interruption in the system execution or if the power goes down, can damage the data integrity (see security copies procedures)
  3. - The SPRING knows how to recognize any Database created in the current path, because some files in the Database folder will help SPRING system to recognize the folder in the Database list.

Considerations about some Database MANAGERS

The SPRING 5.2 versions of SPRING for Windows and Linux works with the same five Database managers (SGDB), plus the following differences:

·        The MySQL Manager: For the MySQL manager in this new version works with MySQL 5.x and compatibles.

·        The PostgreSQL Manager: For the PostgreSQL manager in this new version works with PostgreSQL 8.x and compatibles. This driver works in Windows an Linux plataform.

·        The Oracle Manager: For the Oracle manager in this new version works with Oracle 10i and compatibles. This driver works in Windows an Linux plataform.

·        The ACCESS Manager: In the 5.2 version SPRING creates a data base compatible to the Access version installed in the computer (97, 2000, or XP). If the computer being used has no version of the Access system the database creation will depend on the JET drive installation (either in the versions 3.5 or 4.0). The JET installation will allow table creations in the Access 97 format (for JET 3.5) or in the Access 2000 format (for JET 4.0).  The installation files for the drives JET 3.5 and JET 4.0 are available in the download page of the SPRING software.

The table bellow presents different scenarios using SPRING 5.2 and the Access manager in a computer that has only the Windows installed and another with Windows and the Access manager installed.

 

Create or Edit a DB using SPRING 5.2

 

Create a DB

Editing DB 97 (1)

Editing DB 2000 (2)

Windows with JET 3.5

97

97

- (5)

Windows with JET 4.0

2000

97 (3)

2000

Windows with JET 3.5 and 4.0

2000

97

2000

Windows and Access 97

97

97

- (6)

Windows and Access 97 and JET 4.0

2000

97

2000

Windows and Access 2000 or XP

2000

97 (4)

2000

(1) In this case we have a Database created by the Access 97 in a computer and using it in a different computer.
(2) In this case we have a Database created by the Access 2000 in a computer and using it in a different computer.
(3) A computer using Jet 4.0 allows reading and writing in a Database in the Access 97 format without any kind of conversion.
(4) The SPRING will not make the conversion of an Access 97 Database into an Access 2000. The user is allowed to do it using the SGDB.
(5) It can only be used if the computer has either Jet 4.0 or Access 2000 installed.
(6) It can only be used if the computer has Jet 4.0 installed, in this case, only SPRING can edit the DB. The user can update the manager for the Access 2000.


See also:
How to create a Project.
How to create an Information Layer.

Handling a Database


Activating a Database

Activating a Database means that the Database will be opened to define its own structure (projects, categories, classes), and also to add new data. The Database can only be activated by the user who is currently “logged in” and that has written permissions for the Database directory.

Only one Database at a time can be active in a working session.

Activating a Database:

  • click in File - Database...in the main menu or in the icon in the tools bar;
  • click in Directory... to select a directory where the Database is stored. The "Select Directory" window is shown ( see how to use it). Don't forget that the path for the Database directory has to point to a directory one level above so SPRING can recognize the Database.
  • select the Database from the list;
  • click in Load. If there is an active Database a confirmation message will be shown asking you to confirm deactivation of the Database. Notice that the name of the active Database is presented in SPRING title bar between brackets ([ Df ]). Confirming the deactivation the window closes and the new Database becomes active.
    • if the Database was created with an Access manager with a password, the system will ask for the password. In this case the "Access Database password..." window is presented (see how to use it)

NOTES:

  1. Closing the " Spring" module, SPRINGDB variable will be automatically updated if the Spring next session in the " Environment setup" window the Current Configuration is selected. In this case the last used Database will be automatically selected when SPRING starts a new session. Otherwise the user can always select a Database following the steps described above. If SPRINGDB variable has no value the system will automatically asks for a Database.
  2. In order to define or change a password in an Access Database it is first required to activate the Database. See how to change a password .

 

See also:
How to activate a Project.
How to activate an Information Layer.

 

Manipulating data in a Database


To delete a Database

Deleting a Database also deletes the directory with the Database's name, that is everything related to the Database will be deleted.

To delete a Database the user “logged in” has to have permission to write in the Database directory.

Deleting a Database:

  • activate the Database you want to delete,;
  • click in Delete and confirm the delete message in the confirmation window.

ATTENTION: Once the Database is deleted there is no way to recover it, unless you have a backup copy for this Database.


See also:
How to delete a Project.
How to delete an Information Layer.

 

Manipulating data in a Database