達夢資料庫DM8建立表空間和表的步驟

2021-10-24 05:47:34 字數 1707 閱讀 2409

在資料庫中新建立一張表,儲存在dx_test表空間上,資訊由pony使用者管理,密碼123***123

employees表使用者存放所有員工的資訊,表結構如下:

連線資料庫

連線資料庫成功後顯示如下:

開啟表空間選單,滑鼠右鍵單擊,選擇「新建表空間」選單:

進入新建表空間的對話方塊中,輸入表空間名稱:tbs,並新增兩個表空間資料檔案,設定相關的儲存路徑/大小等引數。

在「新建使用者」對話方塊中,輸入相關的資訊,建立pony使用者。注意選擇表空間為dx_test

(employeeid int not null, //非空 主鍵,自增列

nationalno varchar(18) not null, //非空 身份證號碼

personid int not null, //非空 指向 person.personid 的外來鍵

loginid varchar(256) not null, //非空 使用者登入 id

title varchar(50) not null,// 非空 職位

managerid int, //空

birthdate date not null, //非空 出生日期

maritalstatus char(1) not null,// 非空 s=未婚 m=已婚

photo image,// 空 **

hairdate date not null, //非空 入職時間

salary dec(19,4) not null,// 非空 薪資(元)

primary key(「employeeid」)

);insert into employees (employeeid,nationalno,personid,loginid,title,birthdate,maritalstatus,hairdate,salary) values (『1001』,『110112199709072789』,『88』,『1101』,『master』,『1997-09-07』,『s』,『2008/5/30』,『12000』);

insert into employees (employeeid,nationalno,personid,loginid,title,birthdate,maritalstatus,hairdate,salary) values (『1002』,『110112199809032789』,『10』,『1101』,『master』,『1998-09-07』,『s』,『2008/5/30』,『15000』);

測試select * from employees ;

達夢(DM8)資料庫例項

達夢 dm8 資料庫由例項和資料庫共同組成。例項由一組正在執行的後台程序及其所fork出的一系列執行緒和分配記憶體組成。資料庫是由一系列存放在作業系統上的檔案組成。體系結構圖大致為 本文只要針對體系結構中的例項,也就是達夢 dm8 資料庫中記憶體結構與執行緒結構進行介紹。達夢 dm8 例項記憶體池包...

DM達夢資料庫 表空間

dm達夢資料庫表空間基本介紹 主要表空間介紹 system 資料字典和全域性的系統資料。roll 存放了資料庫執行過程中產生的回滾記錄。temp 臨時表空間 main 資料庫預設的表空間,建立資料物件時,如果不指定存放的位置,預設存放在該錶空間。hmain huge表空間。undo retentio...

達夢資料庫DM8配置DEM

達夢資料庫的dem類似於oracle的oem,使用dem可以對達夢資料庫進行監控等操作。本文主要講述如何配置dem,以及如何將主機 資料庫納入dem監控。主要工作為 1 首先基礎環境檢查配置,如防火牆,內外網ip配置。2 準備乙個資料庫作為dem後台資料庫,並修改dm.ini檔案中快取等幾個引數的大...