Using DBGate

Using DBGate

Table of Contents

What is DBGate

DBGate is a cross-platform ASP.NET Core application and a JavaScript client.

You can install it on Windows with IIS, on Linux with Apache, or Linux with Nginx.

The server-side part creates REST endpoints on the fly for all connection strings specified in the application settings file.

DBGate supports SQL Server, Oracle Database, MySQL, MariaDB, and PostgreSQL.

The built-in JavaScript client allows viewing and editing data. It looks like this:

DBGate Samples - s02.cashbook

You can try online samples at dbgate.savetodb.com.

How it works

DBGate reads connection strings from the app settings file and creates REST endpoints for every string.

Here is a sample of a connection string:

  "ConnectionStrings": {
    "mssql": {
      "ProviderName": "System.Data.SqlClient",
      "ConnectionString": "Data Source=mssql.savetodb.com;Initial Catalog=AzureDemo100;User ID=user;Pwd=pass"
    },

In this case, DBGate creates the mssql endpoint for the AzureDemo100 database on the mssql.savetodb.com server:

  • https://dbgate.savetodb.com/api/mssql/

The user and pass are placeholders to turn on the authentication.

The REST service supports GET, POST, PUT, and DELETE.

Also, you can use a built-in JavaScript client to view and edit data:

  • https://dbgate.savetodb.com/edit/mssql/

You can test this sample with the following credentials:

Username: sample02_user3
Password: Usr_2011#_Xls4168

See more details about DBGate endpoints.

How to use DBGate

First of all, DBGate is a web viewer and editor for database data.

You can use a built-in editor page or embed DBGate controls into other web pages.

Also, DBGate is a REST service that third-party clients can consume.

We recommend taking the following steps to start using DBGate:

You will have a REST service and a web editor for your databases in less than an hour.

Note that DBGate is free for two users (identified by logins).

So, you can use it for development purposes and yourself for free.

Activate the trial version when you are ready to try it for a large number of users.

How to configure REST service models

DBGate creates service models, reading the database metadata under the user's credentials.

So, every user gets a model based on available objects only.

DBGate analyses SQL definitions of views and stored procedures and adds a lot of features automatically.

We recommend trying the default models first. It should be enough to view and edit the data of well-designed databases.

Then developers can customize all the required features step-by-step.

See more details at Configuring OData Models.

Notes for SaveToDB and DBEdit customers

DBGate uses the same data and customization layers as DBEdit and the SaveToDB add-in for Microsoft Excel.

So, you might get almost the same application features with the built-in JavaScript client.

Moreover, the SaveToDB add-in supports DBGate as a data source. So, you can use DBGate as a proxy to connect to your databases via HTTP API.