diff --git a/docs/source/overview/connect-to-data-sources.rst b/docs/source/overview/connect-to-data-sources.rst index e3ae055683..6f32281c25 100644 --- a/docs/source/overview/connect-to-data-sources.rst +++ b/docs/source/overview/connect-to-data-sources.rst @@ -6,7 +6,7 @@ EvaDB supports a wide range of data sources including SQL database systems, obje Connect to an Existing SQL Database System ------------------------------------------ -1. Use the :ref:`CREATE DATABASE<create-database>` statement to connect to an **existing** SQL database. +1. Use the :ref:`CREATE DATABASE<create-database>` statement to connect to an **existing** SQL database server. For example, here is the SQL command to connect EvaDB with a locally running :ref:`PostgreSQL<postgresql>` database server running on port ``5432``. .. code-block:: @@ -20,13 +20,20 @@ Connect to an Existing SQL Database System "database": "restaurant_reviews" }; -.. note:: +For quick prototyping, you can use an embedded :ref:`SQLite<sqlite>` database. Here, the SQLite database file is called ``evadb.db``. - Go over the :ref:`CREATE DATABASE<create-database>` statement for more details. The :ref:`Databases<databases>` page lists all the database systems that EvaDB currently supports. +.. code-block:: + + CREATE DATABASE restaurant_reviews + WITH ENGINE = 'sqlite', + PARAMETERS = { + "database": "evadb.db" + }; .. note:: - For prototyping, users can opt to establish a connection to :ref:`SQLite<sqlite>`. + Go over the :ref:`CREATE DATABASE<create-database>` statement for more details. The :ref:`Databases<databases>` page lists all the database systems that EvaDB currently supports. + 2. Preview the data using ``SELECT`` diff --git a/docs/source/reference/databases/postgres.rst b/docs/source/reference/databases/postgres.rst index 5c1309b7d8..de5a130a0b 100644 --- a/docs/source/reference/databases/postgres.rst +++ b/docs/source/reference/databases/postgres.rst @@ -1,3 +1,5 @@ +.. _postgresql: + PostgreSQL ========== diff --git a/docs/source/shared/postgresql.rst b/docs/source/shared/postgresql.rst index 3af309e67a..049cb0ea3f 100644 --- a/docs/source/shared/postgresql.rst +++ b/docs/source/shared/postgresql.rst @@ -1,7 +1,12 @@ Connect EvaDB to PostgreSQL Database Server ------------------------------------------- -We will assume that you have a ``PostgreSQL`` database server running locally that contains the data needed for analysis. Follow these instructions to install `PostgreSQL <https://www.postgresql.org/download/>`_. +We will assume that you have a :ref:`PostgreSQL<postgresql>` database running locally that contains the data needed for analysis. Follow these instructions to install `PostgreSQL <https://www.postgresql.org/download/>`_. + +.. note:: + If find it challenging to install the ``PostgreSQL`` database on your machine, here is an alternative for quick prototyping. + + You can use an embedded :ref:`SQLite<sqlite>` database. If you go with the ``sqlite`` database, alter the SQL commands in this tutorial to use the ``sqlite`` engine and the ``evadb.db`` SQLite database file as explained in the :ref:`SQLite<sqlite>` page. EvaDB lets you connect to your favorite databases, data warehouses, data lakes, etc., via the ``CREATE DATABASE`` statement. In this query, we connect EvaDB to an existing ``PostgreSQL`` server: diff --git a/docs/source/usecases/classification.rst b/docs/source/usecases/classification.rst index 1fbb2823d9..a1fb192d92 100644 --- a/docs/source/usecases/classification.rst +++ b/docs/source/usecases/classification.rst @@ -31,10 +31,6 @@ In this tutorial, we present how to to create and train a machine learning model We will assume that the input data is loaded into a ``PostgreSQL`` database. To load the home rental data into your database, see the complete `home rental prediction notebook on Colab <https://colab.research.google.com/github/georgia-tech-db/eva/blob/staging/tutorials/17-home-rental-prediction.ipynb>`_. -.. note:: - - For prototyping, users can opt to establish a connection to :ref:`SQLite<sqlite>`. - Preview the Home Rental Price Data ---------------------------------- diff --git a/docs/source/usecases/forecasting.rst b/docs/source/usecases/forecasting.rst index d6f1b62bc4..8f7bb8575b 100644 --- a/docs/source/usecases/forecasting.rst +++ b/docs/source/usecases/forecasting.rst @@ -31,10 +31,6 @@ In this tutorial, we present how to create and train a machine learning model fo We will assume that the input data is loaded into a ``PostgreSQL`` database. To load the home sales dataset into your database, see the complete `home sale forecasting notebook on Colab <https://colab.research.google.com/github/georgia-tech-db/eva/blob/staging/tutorials/16-homesale-forecasting.ipynb>`_. -.. note:: - - For prototyping, users can opt to establish a connection to :ref:`SQLite<sqlite>`. - Preview the Home Sale Price Data -------------------------------- diff --git a/docs/source/usecases/sentiment-analysis.rst b/docs/source/usecases/sentiment-analysis.rst index 74d6eade77..a7dfeb2d98 100644 --- a/docs/source/usecases/sentiment-analysis.rst +++ b/docs/source/usecases/sentiment-analysis.rst @@ -31,10 +31,6 @@ To load the food review data into your database, see the complete `sentiment ana .. include:: ../shared/postgresql.rst -.. note:: - - For prototyping, users can opt to establish a connection to :ref:`SQLite<sqlite>`. - Sentiment Analysis of Reviews using ChatGPT -------------------------------------------