Link your spreadsheets with cloud-based databases (r) (r)

Jul 19, 2024

-sidebar-toc>

Spreadsheets can be useful for organizing and managing customer data Particularly for small-scale enterprises dealing with small-sized data files that have few complex relations.

As your data grows and grows more complicated with many users requiring access to it, handling data using spreadsheets becomes very inefficient. In addition, tracking and observing modifications made to spreadsheets is more complicated, often creating different versions of the information.

Prerequisites

To follow along with this guide, make sure you have the following:

Excel spreadsheets are the foundation of data integration

A few of them include:

  • A robust open-source relational database that is known for its dependability, extensible features and its high-performance. It supports integration with numerous applications and tools, allowing developers build robust applications.
  • -- a popular open-source relational database that offers users flexibility, scale, and reliability for building SQL as well as NoSQL applications. It is a highly-performing and accessible database to power business-critical applications for a low price.
  • MariaDB is a different open-source relational database which can manage both small and large amount of data. This makes it a reliable option for all businesses. Although it has numerous similarities with MySQL however, it's more flexible and offers an increased speed of querying, so it is ideally suited for high-performance tasks.

Cloud-hosted databases guarantee continuous business operations with a variety of options, including automated backups, version control as well as disaster recovery. The additional benefits are:

  • Scalability
  • Flexibility
  • Achieving business agility
  • Security
  • Cost savings

Create and arrange the spreadsheet information

Fresh spreadsheet data can contain imperfections, including double figures, noise, outliers, and other flaws and can affect the data's quality and impact the integration.

1. Prepare your data

Here are a few suggestions to manage and prepare your data for database integration:

  • Utilize templates templates Google Sheets and Excel contain various spreadsheet templates designed to improve your formatting and organizing. Although finding a template that fits your company's needs may seem tedious or difficult, utilizing one can set you up on the right course.
  • Create a format for your data Formatting alters the data in order to assist you visualize and understand it. This process may involve splitting one sheet of data into many sheets, sorting columns numerically or alphabetically by ascending or descending order, to make it easier for you to read the data or altering the color of cells in order to emphasize the importance.
  • Cleansing data Cleansing data removes outliers, duplicated values and special characters. It could also mean breaking up a single text row into several columns in order to prevent parsing errors during integration or by using conditional formatting to detect incorrect data.
  • Hide unnecessary data Sometime, your data might contain information that's not currently helpful but may be valuable later. Excel and Google Sheets provide features that allow you to hide unnecessary data.

2. Structure your data for integration

If you are preparing spreadsheets to integrate databases, here are some best methods:

  • Metadata for records -- Metadata provides important information regarding the current structure of your data as well as the source of your data. The recording of metadata can help guarantee a consistent and complete mapping of your data to ensure a successful integration of databases.
  • represent zero and null values--Zero values are different from null values and can affect the quality of your data. Be sure to accurately record zero values while preparing data sheets for integration because the database could consider them null values and create constraint-related errors.
  • Avoid the use of special characters in field names Introduce numbers, special characters, or other Unicode characters in your column names can result in parsing issues when you import information from spreadsheets. Best practices when naming fields is to use camel case (for instance, studentName) or underscores in order to make the names more descriptive.

With your data structured, you're ready to integrate it into a cloud-based database.

How do you integrate MariaDB Step-by-step guide

Connect MySQL workbench with MariaDB

The first step is to provide the details of your MariaDB database instance with external connection details.

  1. Unlock the     External connections    Page and copy the     Hostname of the external host    ,     Username    ,     Password,    and     Name of database     fields.
The External connections page shows the External hostname, External port, Username, Password, Database name, and External connection string fields
External Connections page that lists the fields needed to connect to external hosts.

This is where you connect MySQL Workbench, which provides a user interface that is graphically designed for interaction with the MariaDB instance. It connects MySQL Workbench to your database instance by adding a new connection.

  1. On the Welcome to MySQL Workbench page, select MySQL Connection in the lower-left corner.
  2. On the     Installation New Connection    page, enter the information for your external connection that is that are provided by the MariaDB database instance.
Setup New Connection page shows the Connection Name, Connection Method, Hostname, Username, Password, and Default Schema fields. It has Configure Server Management, Test Connection, Cancel, and OK buttons on the bottom
Setup New Connection page showing the external connection details.
  1. Select to test connectionat the lower right on the screen . A connection message about an uncompatible or unstandard version of the server appears. Do not ignore the warning. Your database is now linked account with MySQL Workbench.
  2. Next, create a table titled     diabetes_table    by using columns with columns using SQL statement.
CREATE TABLE `diabetes_table` (
 `id` int(11) NOT NULL AUTO_INCREMENT,
 `Pregnancies` varchar(45) NOT NULL,
 `Glucose` int(11) NOT NULL,
 `BloodPressure` int(11) NOT NULL,
 `BMI` decimal(3,1) NOT NULL,
 `DiabetesPedigreeFunction` decimal(4,3) NOT NULL,
 `Age` int(11) NOT NULL,
 `Outcome` tinyint(4) NOT NULL,
 PRIMARY KEY (`id`),
 UNIQUE KEY `id_UNIQUE` (`id`)
 ) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb3

Join Google Sheets to MariaDB

  1. Open     Google Sheets    . The spreadsheet already has a comma-separated values (CSV) file (     diabetes.csv    ) that has seven columns.
Google Sheets showing the diabetes.csv file. The Pregnancies, Glucose, Blood Pressure, BMI, Diabetes Pedigree, Age, and Outcome columns are visible
Google Sheets showing the diabetes.csv file.
  1. Click     Extensions    .
The Google Sheets menu bar shows the File, Edit, View, Insert, Format, Data, Tools, Extensions, and Help menus
Google Sheets menu bar. Google Sheets menu bar.
  1. Go to     Coefficient Salesforce, Hubspot Data Connector,    and then click     Launch    .
The Extensions menu shows the Coefficient Salesforce, Hubspot Data Connector item with the Launch, Chat with support, and Help options
The Extensions menu.

This step opens up the Coefficient connector to the right of your sheet, which allows you to import or export data between Google Sheets and the MariaDB database.

  1. Click Export in Coefficient and then select MySQL. Even though you're connecting to the MariaDB Database, choose MySQL since MariaDB is a fork of MySQL. It's also an MySQL database that has additional features.
  2. Connect to the information provided by your MariaDB instance, and then click     Connect    .
Coefficient shows the Host, Database name, Username, Password, Port, and Nickname fields needed to connect to the MariaDB.
Coefficient that outlines the necessary information in order to connect to MariaDB.
  1. In the     Source Data    section, select     diabetes    From the     Tab    list and     Row 1    From the     Row Header     list.
The Source Data section shows the Tab and Header row fields
The Source Data section shows the Tab and Header row fields.
  1. In the section titled Destination section, choose the Sheets-db table for diabetes in the Table List .
  2. Select     Insert    from the     Action    The spreadsheet data can be added to the list. table of data.
The Destination section shows the Table and Action lists
The Destination section showing the Table and Action lists.

In the Schemas panel there are spreadsheet columns.

The Schemas panel shows the id, Pregnancies, Glucose, Blood Pressure, BMI, Diabetes Pedigree, Age, and Outcome columns
The Schemas panel that shows the columns of spreadsheet.
  1. The spreadsheet columns should be mapped to the headings on the MariaDB table. Click     Save    .
Field Mappings panel shows columns mapped to MariaDB headings
The Field Mappings panel has columns mapped to MariaDB table headings.
  1. Select particular rows of the sheetand then click next.
  2. Make sure you test the mapping by clicking on a the row     12    Click and     Do you have to pick rows?    .
Google Sheets table shows the selection of row 12. The Done selecting rows button appears in the bottom right corner
Google Sheets table shows the rows 12 and 12.
  1. Confirm your selection by clicking     Insert 1 row in MySQL    .The spreadsheet has now a     Record ID    column, a     Result    column that displays     OK     And a     Timestamp    column that shows the date of the export.
The selected row is exported successfully with some timestamp information
The row you have selected is exported successfully with some details about the timestamp.
  1. Click to finish.
  2. Select more rows to export. Then, click Insert X rows in MySQLand the Done.
  3. Make use of this query to display import data that has been imported into the MariaDB table.
SECT * FROM your_db_name>.diabetes_table;
MariaDB shows the imported data
MariaDB showing the imported data.

Connect Excel sheets with MariaDB

Ensure you have ensure that you are using the Devart plugin. The plugin allows you to connect to your Excel spreadsheet to MariaDB to import and modify your data in Excel as well as update data to your database. It comes with a guide to help with the installation.

  1. Open a blank Excel sheet.
  2. Click     Devart    The top navigation bar. You see the     Devart    Tab if you have added the plugin.
Excel sheet shows the Devart tab
Excel sheet displaying the Devart Tab.
  1. Click     Find the information you need.    to make the     Import Data Wizard    .
Devart tab shows the Get Data button on the left
Devart tab, which shows that there is a Get Data button on the left.
  1. Select     MySQL database    as well as     Data Source    Enter and enter MariaDB database information for connecting to it.
Import Data Wizard showing the fields needed to connect to the MariaDB
Import Data Wizard showing the necessary fields for connecting to the MariaDB.
  1. Click to test connection. A "Successfully connected" message appears.
  2. Select OK and then select next.
  3. Use the     Visual Query Builder    or a or an SQL query to import all of the information from the diabetes table into or from the Excel spreadsheet.
Import Data Wizard shows a custom SQL query to import data into the Excel sheet
Import Data Wizard showing a specific SQL query to import data into the Excel spreadsheet.
  1. Click     End    . You now have an Excel spreadsheet that contains data from the cloud-hosted database.
Excel sheet with data from the cloud-hosted database
Excel sheet that displays information from the cloud-hosted database.
  1. For editing and updating this sheet and the database, just click     Edit Mode    .
Excel sheet shows the Edit Mode button in the Edit Session group on the Devart tab
Excel sheet showing the Edit Mode button in the Edit Session group on the Devart tab.

If you choose not to keep the password in mind when creating the connection, it prompts you to enter your database password.

  1. Check the connection again to confirm you're still connected entering your password.
  2. Choose two records that you want to add to the database.
Excel sheet shows two new records highlighted in yellow
The Excel sheet contains two newly created record entries, highlighted with yellow.
  1. Click "Commit," then click OK. Click Commit, and select Okay to save the changes and then commit these changes to the MariaDB database.
  2. Make a query for the latest database. You now have two newly created records.
MariaDB shows two new records
MariaDB with two new records.

Making a connection to PostgreSQL

Before connecting and import information in Google Sheets to your PostgreSQL database, you must create a secure connection in order to ensure a seamless data import process.

As with the previous section As with the previous section, connect your database to Google Sheets with the help of Coefficient.

Connect and transfer Google as well as Excel data to PostgreSQL

  1. In the     Server - Register     dialog box, provide your PostgreSQL connection details. Details comprise:
  • Hostname/address
  • Port
  • Maintenance database
  • Username
  • Password
Register - Server dialog box shows the fields needed to connect to PostgreSQL. The fields are Host name/address, Port, Maintenance database, Username, and Password
PostgreSQL connection details.
  1. Make a series of table IDs using the SQL table ID sequence following:
CREATE SEQUENCE IF NOT EXISTS public.diabetes_table_id_seq
 INCREMENT 1
 START 1
 MINVALUE 1
 MAXVALUE 2147483647
 CACHE 1
 OWNED BY diabetes_table.id;
  1. Then, you can create an PostgreSQL table named     diabetes_table    with columns whose data type and restraints match the spreadsheet table.
CREATE TABLE IF NOT EXISTS public.diabetes_table
 (
 "Pregnancies" smallint NOT NULL,
 "BloodPressure" smallint NOT NULL,
 "BMI" numeric(3,1) NOT NULL,
 "Glucose" smallint NOT NULL,
 "DiabetesPedigree" numeric(4,3) NOT NULL,
 "Age" smallint NOT NULL,
 "Outcome" boolean,
 id integer NOT NULL DEFAULT nextval('diabetes_table_id_seq'::regclass),
 CONSTRAINT diabetes_table_pkey PRIMARY KEY (id)
 )
 WITH (
 OIDS = FALSE
 )
 TABLESPACE pg_default;
  1. Then, open diabetes.csv in Google Sheets.
  2. Select Extensions and go to Coefficient: Salesforce, Hubspot Data Connector and click to launch.
  3. To export the spreadsheet data into PostgreSQL database, click Export to. PostgreSQL database, click "Export to".
  4. Click Connect beside PostgreSQL.
  5. Fill in the details of your PostgreSQL connection information and then select     Connect    .
Connect PostgreSQL using Coefficient
Coefficient showing the fields needed to connect to PostgreSQL.
  1. Decide how you would like to export your data. This can be done by choosing     Diabetes    From the     Tab    List as well as     Row 1    From the     Row of Headers    list.
The Source Data section shows the Tab and Header row fields
This is the Source Data section shows rows for the Tab and Header row list.
  1. Select public.diabetes_table from the Table list in the Destination section.
  2. Select     Insert    from the     Action     list.
The Source Data section shows the Tab and Header row lists
The section describing the destination shows Table and Action lists.
  1. Connect the columns of the worksheet onto the table in your PostgreSQL table.
  2. Choose the next row, then Click to finish selecting rows.
  3. Make sure you confirm your choice by pressing inserting one row into PostgreSQL.The spreadsheet now displays a Record ID column, a Result column showing OK, as well as a Timestamp column that shows the date of export.
  4. Check your integration's functionality by exporting additional rows.
  5. Perform a query to view the data that was recently imported.
Select * FROM the table on diabetes;

This query displays all data in the diabetes table.

Connect and export Postgres information to Excel

First, you need your PostgreSQL connection details.

  1. Create a new Excel sheet and click Devart.
  2. Click "Get Data" to launch the Import Data Wizard.
  3. Select     PostgreSQL database    in the sources of data, and also in the      Import Data Wizard    , enter the connection details in order to connect your database.
Import Data Wizard shows the Host, Port, User Id, Password, Database, and Schema fields needed to connect to the MariaDB. The Test Connection button is on the bottom
Import Data Wizard shows the necessary fields for connecting to MariaDB.
  1. Click "Test Connection" to check for the connection is working.
  2. Choose your object, and then query your database by using the visual query. The query can be used to search for data.     Visual Building Query    Or write your own custom SQL query for your database.
Visual Query Builder shows the lists of Objects and Filters.
Visual Query Builder shows the lists of Objects and Filters.
  1. Click     Final    . You now have an Excel spreadsheet with information. Click     Refresh    Make sure your worksheet is up to the current.
Refresh button in the Import group on the Devart tab
Refresh button located under the Import group of the Devart tab.
  1. Click "Yes" for confirmation.
  2. Next, click Edit Mode to modify and edit this spreadsheet and database.
  3. Make a record new to the spreadsheet. Click     Commit    to make the change permanent.
Edit Mode and Commit buttons in the Edit Session group on the Devart tab
the buttons Edit Mode and Commit in the Edit Session section on the Devart tab.
  1. Then, run a query to check the latest database. It will show that the data base has been updated.

Summary

Cloud-hosted databases offer a collaborative workspace that allows you to manage, retrieve, create relations, and keep track of dynamic interactions with your data.

Utilizing this tool, you are able to start up PostgreSQL as well as MySQL databases and utilize the details of connection provided to connect to your spreadsheets. By connecting to this then, you are able to build databases, connect your spreadsheet fields to that of your cloud database, and begin exporting your data.

   Are you managing large amount of data by using spreadsheets? Discuss how you manage huge data effectively in the comments below!

Jeremy Holcombe

Content & Marketing Editor at , WordPress Web Developer, and Content Writer. Apart from everything related to WordPress I like playing golf, at the beach as well as movies. I also have tall people problems ;).