Using DBGate for Database Configuration and Access
Table of Contents
- What is DBGate
- How it works
- How to use DBGate
- How to configure REST service models
- Notes for SaveToDB and DBEdit customers
What is DBGate
DBGate is a cross-platform ASP.NET Core application paired with a JavaScript client.
You can install it on Windows with IIS, on Linux with Apache, or on Linux with Nginx.
The server-side component dynamically creates REST endpoints 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 enables you to view and edit data. Here's what it looks like:
You can explore online samples at dbgate.savetodb.com.
How it works
DBGate reads connection strings from the app settings file and generates REST endpoints for each string.
Here's an example 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 for enabling authentication.
The REST service supports GET, POST, PUT, and DELETE methods.
You can also use the 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
For more details, check out the DBGate endpoints.
How to use DBGate
DBGate serves as a web viewer and editor for database data.
You can use the built-in editor page or embed DBGate controls into your own web pages.
Additionally, DBGate functions as a REST service that third-party clients can consume.
To get started with DBGate, we recommend the following steps:
- Experiment with online samples at dbgate.savetodb.com (10-15 minutes)
- Test DBGate using the QuickStart steps (5-10 minutes)
- Install DBGate (10-20 minutes)
You can set up a REST service and a web editor for your databases in under an hour.
Note that DBGate is free for five users (identified by logins), making it ideal for development and personal use.
When you're ready to scale for more users, activate the trial version.
How to configure REST service models
DBGate generates service models by reading database metadata under the user's credentials.
This means each user receives a model based only on their available objects.
DBGate analyzes SQL definitions of views and stored procedures, automatically adding numerous features.
We recommend starting with the default models, which should suffice for viewing and editing data in well-designed databases.
Developers can then customize features as needed, step by step.
For more information, see Configuring Models.
Notes for SaveToDB and DBEdit customers
DBGate shares the same data and customization layers as DBEdit and the SaveToDB add-in for Microsoft Excel.
As a result, you can expect similar application features with the built-in JavaScript client.
Additionally, the SaveToDB add-in supports DBGate as a data source, allowing you to use DBGate as a proxy to connect to your databases via the HTTP API.