Storing data in Oracle
Oracle is the most popular commercial SQL database. Dart can talk to Oracle using the pub package oracledart
by Alexander Aprelev (https://github.com/aam/oracledart). This is a Dart native extension of C++, using the dart_api
interface to integrate into Dart. It requires Oracle Instant Client to be present on the machine, and its OCCI binaries must be included in the PATH variable.
In this section, we will demonstrate how to use this driver step by step. You can see it in action in the project using_oracle
.
Getting ready
To get the database software, download and execute the Oracle installer from http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index-092322.html.
- The database server is started through the menu option Start Database.
- We need to create a table to store data. Start the SQL command-line terminal and paste the contents of the script
jobs.txt
. This creates the tablejobs
, together with thedbKey
,type
,salary
,company
,posted
, andopen...