How to create a database if you already have a company website

In one article you understood why it all starts with data and you need to preserve it with the appropriate IT solution. In the videos I showed how to create free databases, with increasing difficulty. These services are potentially useless if the provider hosting your company’s (or organization’s) Web site also allows you to host a database at no additional cost. So, not reading this article could become another opportunity cost.

 

I will use SiteGround, Enterprise Statistics’ provider, as my source, but there are others that offer the same additional service. If you don’t know who hosts your site, you can use https://digital.com/who-is-hosting-this/

and it might make you angry because maybe the person who made your site chose a service that was apparently cheap and without the ability to create a database at no extra cost.

 

Step-by-step guide

Warning: SiteGround may change the user interface of its site, as it has done in the past, so the steps below may have conceptual validity in the future but the steps may change.

 

First I will need to go to the “Websites” section of SiteGround

and then click on “Site tools”. I end up with this screen

I click on “Site” on the left. First “not trivial” step

At this point you find two entries that will sound familiar to you: two different solutions to have a database. MySQL and PostgreSQL. I will select the latter.

I find myself on this screen, I proceed by creating a database. I remind you that SiteGround allows an unlimited number of databases, on non-cloud plans, but each with a limit of 1GB, for a total of less than 10 GB. If you compare it to the memory of your smartphone, the space for a single database seems like a pittance, but I assure you that if you use that space only to store numbers and strings (e.g. name, surname, etc.), as a micro and small company it will be enough for years. Obviously it becomes stringent to store images, but I remind you that Enterprise Statistics does not perform image analysis.

After clicking on “Create a database”:

 

As you may have read, we need to associate a user with a database. I will do this by clicking on

and

and then I’ll click:

automatically:

It is necessary to associate the user with the previously created database by clicking on

and confirming

be careful: whoever will analyze that data, for example Enterprise Statistics, may only need read privileges, also for security reasons. It is better to separate users who move data, such as the data engineer, from those who analyze.

Going to the 3 points on the right we can do two things

 

renaming the user is optional but useful to have order, also considering the consideration above. We should also reset the password, and we will need this at a later point.

At this point we need to set “from where” you can access the database, by going to the “Remote” tab

 

If we enter in IP 0.0.0.0/0 , we are saying that anyone with the credentials, i.e. username and password, can access, and this can become a security problem.

We need to add another IP address, second non-trivial step: that of the person hosting our database, in this case SiteGround.

You can find it by returning to the dashboard:

 

at the bottom right you will find the IP to insert and once added in the tab of the previous page “Remote”, you will find it at the bottom in “remote hosts”.

 

Let’s test it

Now we want to check if we can access what we just created. One way to do this is to download and install pgAdmin 4, which is the postgre database administrator software (pg). Once we have set a general password, we can create a new server:

with which we obviously connect:

as name I will put ArticoloSiteGround

At this point we need to go to the “Connection” tab:

 

on host we will put the last IP, the one you find at the bottom right of the dashboard page. Port, as you may know from the videos, is standard, so we do not touch it. Database, we give it the name dbuiosn1egodtg, username obviously u8wrtt64m8is6 and as password what you chose a little while ago, or the password that it generates automatically if you have not changed it. Click on “Save”. Et voilà:

on the left we find the database created, obviously without tables. Obviously you will not see the other names.

Do you want to access and connect the database to a Google spreadsheet? In this case you have various solutions with varying difficulty: create a custom function with a dialect of JavaScript from Extensions->App Script, use an extension like StackIt, PowerFormulas, third-party services (Zapier, Make, etc.) or data engineering solutions (like Airbyte).

 

 

Conclusions

With this guide you have created a database that is not free, and therefore without possible limitations of various kinds even though perhaps the free ones offer more space, using a service you already pay for, hence the opportunity cost mentioned at the beginning. Some paid solutions price the database by the hours you have it on, and you may get a bill to take your breath away for a few seconds.

Still feeling doubtful and not sure if you need to implement this type of solution? Let’s hear you on a free call, where this solution, or a database hosted in a different way, can become a part of your company or organization’s data facility.

If this guide has even inspired you to switch vendors for your corporate site, you can also do so through Enterprise Statistics’s referral link, which will provide you with additional time benefits.

 

Privacy Policy