使关联式数据库开发更便利的开源数据建模工具
- UI 现在是全宽屏,带有下拉式选单,可提供更多显示与操作空间。
- 「储存」、「载入」和「删除」功能现在采用档案名,并且可以储存资料库结构和数据。
- 删除表当中的某些元素现在可以定位,并且还可以正确删除连接到其他表上的元素。
- 实现了一种演算法来显示连接到当前所选表格所有连接的线。
- 修正了无法从连接的资料库中删除某些元素的几个问题。
- 修正了显示数据按钮会导致网页崩溃的几个问题。
- 修正了连接线重复渲染导致拖影且未成功删除的几个问题。
- 连接到现有的远程 PostgreSQL、MySQL、MicroSoftSQL、OracleSQL 数据库
- 为现有数据库的架構和數據生成 ER 图,并为用户提供一个界面,既可以修改现有表格,也可以创建新表格。更改的日志被存储起来,用户随时可以生成包含这些更改的查询,以便这些更改反映在现有数据库中。
- 上传您的数据库 SQL 文件
- 上傳的 SQL 文件(数据库转储)生成 ER 图,并为用户提供一个界面,既可以修改现有表格,也可以创建新表格。更改被转换为相应的查询,用户可以在 dbSpy 外部的自己的数据库上查看并执行这些查询。
- 无缝可视化关系数据库(包括架構和數據)
- 在相互连接数据库表之后,用户可以通过点击表格来渲染个别表的关系连接。
- 从头开始创建数据库+ER 图
- 提供一个画布,用户可以使用 ER 图创建数据库,从而为工程数据库结构创建蓝图。
-
数据库上传: 连接远程 SQL 数据库或上传本地 SQL 文件
-
ER 图视觉效果: 通过动态句柄放置来可视化数据库的实体关系图
-
表格关系视觉效果 单击表格时可以轻松识别各个表格的关系
-
架构修改: 单击按钮即可轻松在架构和数据之间切换
-
数据/架构修改: 通过简单的 UI 轻松修改数据库的架构或数据
-
引导数据库构建: 使用实体关系图从头开始创建新数据库,以确保数据库的完整性
-
数据库撤消/重做: 提供编辑历史记录,以便于回溯(尚未修復幾個 Bug)
-
查询生成器: 查询生成器生成可执行的 SQL 查询
-
用户会话: 使用 Google/Github OAuth 或 JWT/Bcrypt 安全地注册/登录
-
保存/加载: 通过您的用户帐户存储和重新加载过去的数据库会话
-
深色模式: 视觉设置,在弱光环境下提供更舒适的观看体验
You will need your own MySQL database for backend functions.
- Fork and clone this repo
- Add a db_schemas folder in server directory
- Add a .env file to the root directory with the information below:
# production environment variables
USER_DB_URL = <MySQL url for storing user data>
USER_DB_USER = <user string from USER_DB_URL>
USER_DB_PW = <password string from USER_DB_URL>
TOKEN_KEY = <any string>
# testing environment variables
## encoded SSL data required for GitHub Actions
SSL_KEY = <base64 encoded SSL key (see SSL Configuration)>
SSL_CERT = <base64 encoded SSL cert>
## MySQL and Postgres databases to test remote connection functionality
MYSQL_TEST_URL = <MySQL url for a test database>
MYSQL_TEST_USERNAME = <user string from MYSQL_TEST_URL>
MYSQL_TEST_PW = <password string from MYSQL_TEST_URL>
PG_TEST_URL = <PostgreSQL url for a test database>
PG_TEST_USERNAME = <user string from PG_TEST_URL>
PG_TEST_PW = <password string from PG_TEST_URL>
## test user with saved schema to test save/load functionality
TEST_USER_EMAIL = <email string>
TEST_USER_PW = <password string>
GOOGLE_OAUTH_CLIENT_ID = <Google Oauth client id>
GOOGLE_OAUTH_CLIENT_SECRET= <Google Oauth client id>
GOOGLE_OAUTH_REDIRECT_URI = 'http://localhost:8080/display'
GITHUB_OAUTH_CLIENT_ID = <Github Oauth client id>
GITHUB_OAUTH_CLIENT_SECRET= <Github Oauth client id>
GITHUB_OAUTH_REDIRECT_URI = 'http://localhost:8080/display'
- Run the following below:
$ npm install
- Execute the following command to populate your mySql database with a users table:
$ npm run seed
- Run the project in development mode:
$ npm run dev
To connect with the SQL database, we must create and configure SSL certificates.
- Install mkcert; you can learn more about mkcert here
npm install -g mkcert
- Run the following script
npm run cert
- Check mkcert is up to date (v1.5.1 as of publishing)
mkcert --version
- Run the following script
npm run cert:linux
- Click on the "Connect Database" button under the Action section on the left side of the page. This will open a sidebar on the right side of the page.
- Select the database type from the dropdown.
- Input your database URI information OR database connection credentials and click on "Connect".
- Once the connection to your database is established, the canvas will render and generate the tables and their relationships.
- OracleSQL requires the download of the OCI - here
- Locate and click on the "Upload SQL File" button under the Action section on the left side of the page. This will open a dialog box for you to select the SQL file you wish to upload.
- Once the file uploads, the canvas will render and generate the tables and their relationships.
- Locate and click on the "Build Database" button under the Action section on the left side of the page. This will render the canvas for you to create your database schema.
- Click on "Add Table" to name the first table and start building your database.
-
To add a new column/row in a table, click on the add/plus icon on the top right of the table node.
-
This will render a new column/row in the table in edit mode.
-
Add in the data you would like in each column/row.
-
Click on the confirm icon to save the column/row.
-
The changes made in DATA table will be updated in your database.
-
Click on the cancel icon to cancel the addition.
- Click on the edit icon of the specific column that you want to edit.
- You can make changes to column fields based on the selections provided.
- Click on the save icon to keep your changes.
- Click on the cancel icon to cancel your changes.
- Click on the delete icon of the specific column that you want to delete.
- Click on the confirm icon to delete the column.
- Click on the cancel icon to cancel the deletion.
- While editing a column, if setting Foreign Key (FK) to "true", the Foreign Key Reference sidebar will appear on the right side of the screen.
- In the Foreign Key Reference sidebar, use the displayed dropdowns to create references between tables.
- Click save or cancel to proceed.
- Click on the save icon to keep your changes or click on the cancel icon to cancel your changes.
- When on the display page, click the 'Add Table' icon after you have either connected to a database or clicked 'Build Database'.
- Fill in the required information about the first column of your table along with a name.
- If you would like to include additional columns, click the 'Add Column' button in the top right corner.
- Click confirm to create your table.
- After you have either connected to a database or started a new database, the 'Delete Table' icon will appear on the left side of the display page
- This will open a pop out with a list of tables from the database.
- Select which table that you would like to have removed, and confirm to have it deleted.
- Located on the bottom left corner of the canvas, you will find the canvas control panel.
- Zoom On [+] - this button zooms into the canvas.
- Zoom Out [-] - this button zooms out of the canvas.
- Fit View [[]] - this button zooms to fit all the tables in focus.
- Toggle Interactivity [lock] - this button toggles on and off all table and column interactivity.
- Screenshot [camera] - this button saves a .png file of the current canvas view.
- If you'd like to contribute, please find a list of possible contributions here
- If you have any requests, please submit an appropriately tagged GitHub issue
- PRs are welcome otherwise
- David Jones • LinkedIn • Github
- John Ruiz • LinkedIn • Github
- Minh Chang • LinkedIn • Github
- Darius Okafor • LinkedIn • Github
- Parwinder Singh • LinkedIn • Github
- Yichung Chiu • LinkedIn • Github
- Joseph Tejeda • LinkedIn • Github
- Stephen Havig • LinkedIn • Github
- Das Kang • LinkedIn • Github
- Alexander Tu • LinkedIn • Github
- Michael Costello • LinkedIn • Github
- Steven Geiger • LinkedIn • Github
- Yufa Li • LinkedIn • Github
- Angel Giron • LinkedIn • Github
- John Paul Adigwu • LinkedIn • Github
- Kevin Park-Lee • LinkedIn • Github
- Tarik Mokhtech • LinkedIn • Github
- Brett Guidry • LinkedIn • Github
- Emil Mebasser• LinkedIn • Github
- Mimi Le • LinkedIn • Github
- Samson Lam • LinkedIn • Github
- Adrian Reczek • LinkedIn • Github
- Anthony Al-Rifai • LinkedIn • Github
- Kevin Wang • LinkedIn • Github
- Kris Magat • LinkedIn • Github
- Santiago Gil Maya • LinkedIn • Github test
dbSpy is developed under the MIT license.