# 資料庫 [TOC] ###### tags: `DBMS` `資料庫概論` ## 資料庫系統DBMS ### 資料庫系統與前後端資料庫說明圖  ---- ### 資料庫系統內部細圖(components in the DBMS)  ---- ### What is 資料庫管理系統(DBMS)? #### 以資料庫PostgreSQL實作範例 ##### Create a PostgreSql database 相關指令  * 從後端伺服器連線資料庫  ---- ##### DBMS使用的是pgAdmin4  * 檢查 pgAdmin4 中 schema table  ---- ##### Flask-SQLAlchemy(後端python Flask 的擴充套件)操作DBMS * 從 pgAdmin4資料庫系統中 看到成功讓資料庫得到我從前端介面輸入的資料  ###### 後端server與資料庫連線 程式碼說明 ``` python = # main.py from flask_sqlalchemy import SQLAlchemy from flask import Flask db = SQLAlchemy() app = Flask(__name__) app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False#config:設定資料庫連線 app.config['SQLALCHEMY_DATABASE_URI'] = "postgresql://user_name:password@IP:5432/db_name" # 建立一個叫 postgresSQL 的 db # 填入剛建立的 db username,password,IP,db名字 ``` ---- * 參考資料 * [資料庫設計概念 - ORM](https://ithelp.ithome.com.tw/articles/10207752) * [第一次設計架構就上手 - 資料庫架構](https://ithelp.ithome.com.tw/articles/10157292)
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up