Data base logo

Importing a database

By Javier PĂ©rez, Artelnics.

You can use your favourite database with Neural Designer.

Contents:

  1. Import database wizard
  2. Oracle Database
  3. MySQL
  4. Microsoft SQL Server
  5. Microsoft Azure SQL Database
  6. SQLite
  7. Microsoft Access
  8. Querying a database

1. Import database wizard

Once a project has been created, you can import a database by clicking on the Import database button at the Data set page. The following figure shows the Data set page of Neural Editor where you can find Import database button.

Data set page screenshot
Data set page.

By clicking on the "import database" button, it shows up the Import database wizard. This wizard contains the following two pages:

  1. The Database connection page.
  2. The Database query page.

The Database connection page allows you to connect to your database. The DBMS supported are:

  • Database server type: Oracle Database, MySQL, SQL Server (Microsoft SQL Server and Microsoft Azure SQL Database).
  • Flat-file databases: SQLite, Microsoft Access.

The next figure shows a screenshot of Database connection page for database server type.

Database server connection page screenshot
Database server connection page.

As we can see, this page contains a set of fields to be filled:

  • Type: the type of database server.
  • Name: the name of your database.
  • Host: the FQDN or the IPv4 direction of your database server.
  • Port: the port to connect to your database server.
  • User: a user from your database server.
  • Password: the password of the user above.

The following figure shows a screenshot of Database connection page for flat-file databases.

Flat-file database connection page screenshot
Flat-file database connection page.

As we have seen in the previous section, this page contains a set of fields to be filled:

  • Type: the type of flat-file database.
  • Path: the path to your database file.
  • User: a user from your database (not required).
  • Password: the password of the user above (not required).

When all the required fields are completed, the next step is to click on the Test connection button in order to connect to your database. If there is not an error, you can click on the Next button to querying your database.

The Database query page allows you to check your database and import the results to your project. You can only introduce SELECT statements for retrieving information, and not other statements for manipulating the database. The figure below shows a screenshot of Database query page.

Database query page screenshot
Database query page.

For watching the results of your introduced query, click on the Test query button. If there is not any error you can watch the results in the nether tableview.

Query test results
Query test results.

If the results from your query are data that you want to import to your project, click on Finish button.

At the moment that you click on Finish button, a csv file called as your project will be created into your project folder. That file contains all the results of your query. Also the data from this csv will be in Neural Designer to be used.

Data set page with the data from database
Data set page with the data from database.

2. Oracle Database

Oracle logo picture
Oracle.

Oracle Database is an object-relational database management system produced and marketed by Oracle Corporation.

To import data from an Oracle Database you need to know the following information:

  • Name: the database name. The database must exist on your database server.
  • Host: the FQDN or the IPv4 direction of your Oracle database server. You must write localhost or 127.0.0.1 if Neural Designer is hosting in the same machine than server.
  • Port: this port allows you to connect to your database server. It will be set to 1521 as default value.
  • User: the username you will use to connect to database server. The user must exist on your database server.
  • Password: the password of the user you will use to connect to database server.

To import the database from your Oracle Database server properly, you must configure your database firewall if there is any.

3. MySQL

MySQL logo picture
MySQL.

MySQL is an open-source relational database management system.

To import data from a MySQL database you need to know the following information:

  • Name: the database name. The database must exist on your database server.
  • Host: the FQDN or the IPv4 direction of your MySQL database server. You must write localhost or 127.0.0.1 if Neural Designer is hosting in the same machine than server.
  • Port: this port allows you to connect to your database server. It will be set to 3306 as default value.
  • User: the username you will use to connect to database server. The user must exist on your database server.
  • Password: the password of the user you will use to connect to database server.

To import the database from your MySQL server properly, you must configure your database firewall if there is any.

4. Microsoft SQL Server

SQL Server logo picture
SQL Server.

Microsoft SQL Server is a relational database management system developed by Microsoft.

To import data from a Microsoft SQL Server database you need to know the following information:

  • Name: the database name. The database must exist on your database server.
  • Host: the FQDN or the IPv4 direction of your Microsoft SQL Server database server. You must write localhost or 127.0.0.1 if Neural Designer is hosting in the same machine than server.
  • Port: this port allows you to connect to your database server. It will be set to 1433 as default value.
  • User: the username you will use to connect to database server. The user must exist on your database server.
  • Password: the password of the user you will use to connect to database server.

To import the database from your Microsoft SQL Server properly, you must configure your database firewall if there is any.

5. Microsoft Azure SQL Database

Azure logo picture
Azure.

Microsoft Azure SQL Database is a cloud-based service from Microsoft wich uses a special version of Microsoft SQL Server as its backend.

To import data from a Microsoft Azure SQL Database database you need to know the following information:

  • Name: the database name. The database must exist on your database server.
  • Host: the FQDN of your Microsoft Azure SQL Database server.
  • Port: this port allows you to connect to your database server. It will be set to 1433 as default value.
  • User: the username you will use to connect to database server. The user must exist on your database server.
  • Password: the password of the user you will use to connect to database server.

To import the database from your Microsoft Azure SQL Database properly, you must configure your database firewall if there is any.

6. SQLite

SQLite logo picture
SQLite.

SQLite is a relational database management system contained in a C programming library.

To import data from a SQLite database you need to know the following information:

  • Path: the path to your database file. The path must be valid and the file must exist
  • User: the username you will use to connect to database. Only if the database needs a valid user. The user must exist on your database.
  • Password: the password of the user you will use to connect to database.

7. Microsoft Access

Access logo picture
Access.

Microsoft Access is a relational database management system from Microsoft.

To import data from a Microsoft Access database you need to know the following information:

  • Path: the path to your database file. The path must be valid and the file must exist
  • User: the username you will use to connect to database. Only if the database needs a valid user. The user must exist on your database.
  • Password: the password of the user you will use to connect to database.

8. Querying a database

Import database wizard only allows you SELECT statements in your queries to select data from your database. The basic sintax is the following:

				SELECT column_name,column_name,...
				FROM table_name
				

The Import database wizard doesn't distinguish uppercase, you can write your queries in lowercase.

Also you can uses clauses like WHERE, DISTINC, JOIN,... and you can concatenate SELECT statements.

Query example
Query example.