版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、數(shù)據(jù)庫系統(tǒng)課程實(shí)踐任務(wù)報(bào)告任務(wù)名稱;某單位人事管理系統(tǒng)班級(jí):2013 計(jì)科本學(xué)號(hào):38241313115姓名:陳雄學(xué)號(hào):38241313122姓名:汪磊完成日期:2015年6月30日信息工程學(xué)院計(jì)算機(jī)系任務(wù)名稱1任務(wù)的描述人事管理系統(tǒng)是非常通用的管理信息系統(tǒng),是企事業(yè)單位實(shí)現(xiàn)辦公自動(dòng)化的前提和基礎(chǔ)。一 個(gè)公司要正常運(yùn)作必定有一個(gè)健全的人事管理系統(tǒng),來管理員工的信息,包括員工編號(hào)、姓 名、性別、民族工資及獎(jiǎng)懲考勤情況。除此之外,系統(tǒng)還供員工查詢個(gè)人和公共信息,管理 員對(duì)員工信息進(jìn)行更改或刪除,管理公司的人事變更和管理,大大提高公司內(nèi)部員工管理的 工作效率,并要求實(shí)現(xiàn)以下功能。1 員工信息管理:實(shí)
2、現(xiàn)記錄在該單位中所有人員的在該單位的員工信息,實(shí)現(xiàn)對(duì)員工信息的管理,也包括對(duì)員工信息的增加、刪除、修改等功能。2 部門信息管理:實(shí)現(xiàn)對(duì)該單位中的各個(gè)部門的編號(hào)、 部門相關(guān)信息的統(tǒng)計(jì),此時(shí)也將 單位中的所有人員進(jìn)行分類管理。3 職位調(diào)動(dòng)管理:實(shí)現(xiàn)當(dāng)員工的就職信息發(fā)生更改的時(shí)候, 系統(tǒng)進(jìn)行相應(yīng)關(guān)聯(lián)信息的更 改,即增加相應(yīng)的修改信息的同時(shí),員工的信息管理中的對(duì)應(yīng)信息進(jìn)行修改。4 系統(tǒng)管理人員信息管理:實(shí)現(xiàn)對(duì)相應(yīng)的系統(tǒng)管理人員的帳號(hào)、 密碼等基本信息的管理 功能。5 出勤信息管理:實(shí)現(xiàn)對(duì)每一位員工的出勤狀況的記錄, 記錄對(duì)應(yīng)的出勤刷卡機(jī)號(hào)以及 出勤時(shí)間的信息管理。6 獎(jiǎng)懲管理:實(shí)現(xiàn)針對(duì)于不同的獎(jiǎng)懲類型
3、、獎(jiǎng)懲金額等信息的管理,實(shí)現(xiàn)輸入獎(jiǎng)懲信息 的修改相應(yīng)的工資信息。7工資管理:實(shí)現(xiàn)各個(gè)員工工資條目信息的管理。2.需求分析本系統(tǒng)主要包括的外部實(shí)體有:?jiǎn)T工、部門、員工職位調(diào)動(dòng)等,要實(shí)現(xiàn)的功能主要有: 員工、部門、員工職位調(diào)動(dòng)、管理人員信息管理、出勤信息、工資、獎(jiǎng)懲等信息管理。2.1系統(tǒng)包含的實(shí)體1、員工(員工編號(hào),姓名,性別,出生日期,學(xué)歷,身份證號(hào),民族,職稱,部門號(hào), 職務(wù))2、個(gè)人經(jīng)歷(年份,員工編號(hào),學(xué)習(xí)經(jīng)歷,任職經(jīng)歷)3、家庭關(guān)系(關(guān)系編號(hào),員工編號(hào),親屬關(guān)系,親屬姓名)4、管理人員(管理員帳號(hào),職工編號(hào),密碼,級(jí)別)5、出勤(出勤號(hào),員工編號(hào),上班日期,上班時(shí)間,下班時(shí)間,刷卡機(jī)號(hào))
4、6、刷卡機(jī)(刷卡機(jī)號(hào))7、部門(部門號(hào),部門名,領(lǐng)導(dǎo)人員,員工人數(shù))&職位調(diào)動(dòng)(調(diào)動(dòng)編號(hào),員工編號(hào),調(diào)動(dòng)前職務(wù),調(diào)動(dòng)后職務(wù),調(diào)動(dòng)前部門號(hào),調(diào)動(dòng)后 部門號(hào),調(diào)動(dòng)日期,批復(fù)日期,調(diào)動(dòng)原因)9、獎(jiǎng)懲記錄(獎(jiǎng)懲編號(hào),員工編號(hào),獎(jiǎng)懲類型,獎(jiǎng)懲金額,獎(jiǎng)懲日期,批復(fù)部門號(hào),批 復(fù)日期,獎(jiǎng)懲原因)10、請(qǐng)假記錄(請(qǐng)假編號(hào),員工編號(hào),請(qǐng)假時(shí)間,銷假時(shí)間,請(qǐng)假天數(shù),審批人編號(hào))11、工資(工資編號(hào),員工編號(hào),基本工資,罰款,獎(jiǎng)金,結(jié)算工資,起始日期,截止日期,發(fā)信日期)2.2 系統(tǒng)包含的實(shí)體間聯(lián)系 根據(jù)“任務(wù)描述”中提供某單位人事管理系統(tǒng)信息的實(shí)際情況,本系統(tǒng)中實(shí)體之間應(yīng)具 有如下的聯(lián)系:屬于部門:部門
5、fi 員工,包含屬性。類型:一對(duì)多。 屬于家庭:家庭 fi 員工,不包含屬性。類型:一對(duì)一。 關(guān)于管理員:管理員 fi 員工,不包含屬性。類型 : 一對(duì)多 關(guān)于出勤:?jiǎn)T工 fi 出勤, 不包含屬性。類型:一對(duì)多 屬于部門:部門 fi 職位調(diào)動(dòng),不包含屬性。類型:一對(duì)多2.3 系統(tǒng)需實(shí)現(xiàn)的功能 根據(jù)“任務(wù)描述”中提供的信息以及本學(xué)校的實(shí)際情況,本系統(tǒng)需具有如下的功能:1、對(duì)本系統(tǒng)中具有的實(shí)體及實(shí)體間聯(lián)系的信息的存儲(chǔ);2、具有如下的靜態(tài)查詢:1)對(duì)員工、部門、家庭情況、管理人員、獎(jiǎng)懲記錄、請(qǐng)假記錄、工資等信息的查詢(用 視圖實(shí)現(xiàn))2)對(duì)員工出勤情況整體的查詢(用視圖實(shí)現(xiàn))3)對(duì)員工獎(jiǎng)懲記錄情況整體
6、的查詢(有視圖實(shí)現(xiàn))4)對(duì)員工請(qǐng)假記錄整體的查詢(用視圖實(shí)現(xiàn))5)對(duì)員工工資整體查詢(用視圖實(shí)現(xiàn))3、具有如下的動(dòng)態(tài)查詢1)給定員工,查詢?cè)搯T工總的工資、每月的工資。2)給定部門號(hào),查詢?cè)摬块T總的工資金額、每月的工資金額3)給定員工,查詢?cè)搯T工總的獎(jiǎng)懲金額、每月的獎(jiǎng)懲金額2.4 數(shù)據(jù)字典 數(shù)據(jù)字典名:?jiǎn)T工 表示對(duì)象:?jiǎn)T工實(shí)體 數(shù)據(jù)結(jié)構(gòu):?jiǎn)T工編號(hào)( char )+姓名( char )+性別( char )+出生日期( datetime )+ 學(xué) 號(hào)( varchar ) + 身份證號(hào)(varchar ) + 民族(varchar ) + 職稱(char) + 部門號(hào)(char)+ 職 務(wù)(cha
7、r)數(shù)據(jù)字典名:個(gè)人經(jīng)歷 表示對(duì)象:個(gè)人經(jīng)歷實(shí)體 數(shù)據(jù)結(jié)構(gòu):年份(datetime)+ 員工編號(hào)(char)+學(xué)習(xí)經(jīng)歷(varchar)+ 任職經(jīng)歷( varchar) 數(shù)據(jù)字典名:部門 表示對(duì)象:部門實(shí)體數(shù)據(jù)結(jié)構(gòu):部門號(hào)( char )+部門名( char )+領(lǐng)導(dǎo)人員 (char )+員工人數(shù) (int ) 表示對(duì)象:家庭關(guān)系實(shí)體數(shù)據(jù)結(jié)構(gòu):關(guān)系編號(hào)( char)+ 員工編號(hào)( char)+ 親屬關(guān)系( char)+ 親屬姓名( char ) 數(shù)據(jù)字典名:職位調(diào)動(dòng)表示對(duì)象:職位調(diào)動(dòng)實(shí)體數(shù)據(jù)結(jié)構(gòu):調(diào)動(dòng)編號(hào)(char) +員工編號(hào)(char) +調(diào)動(dòng)前職務(wù)(char) +調(diào)動(dòng)后職務(wù)(char)
8、+調(diào)動(dòng)前部門號(hào)(char) +調(diào)動(dòng)后部門號(hào)(char) +調(diào)動(dòng)日期(datatime ) +批復(fù)日期(datatime ) +調(diào)動(dòng)日期( varchar數(shù)據(jù)字典名:出勤 表示對(duì)象:出勤實(shí)體數(shù)據(jù)結(jié)構(gòu):出勤號(hào)( char +員工編號(hào)( char +上班日期( datatime +下班時(shí)間( datatime +刷卡機(jī)號(hào)( char數(shù)據(jù)字典名:管理人員 表示對(duì)象:管理人員實(shí)體 數(shù)據(jù)結(jié)構(gòu):管理人員帳號(hào)(char) +職工編號(hào)(char)+密碼(char) +級(jí)別(char) 數(shù)據(jù)字典名:刷卡機(jī)表示對(duì)象:刷卡機(jī)實(shí)體 數(shù)據(jù)結(jié)構(gòu):刷卡機(jī)號(hào)( char數(shù)據(jù)字典名:獎(jiǎng)懲記錄 表示對(duì)象:獎(jiǎng)懲記錄實(shí)體數(shù)據(jù)結(jié)構(gòu):獎(jiǎng)懲
9、編號(hào)( char +員工編號(hào)( char +獎(jiǎng)懲類型( char +獎(jiǎng)懲金額( char+獎(jiǎng)懲日期( datatime+批復(fù)部門號(hào)( char +批復(fù)日期( datatime+獎(jiǎng)懲原因( varchar數(shù)據(jù)字典名:工資表示對(duì)象:工資實(shí)體數(shù)據(jù)結(jié)構(gòu):工資編號(hào)( char +員工編號(hào)( char +基本工資( money +罰款( money + 獎(jiǎng)金( money +結(jié)算工資( money +起始時(shí)間( datatime+截止時(shí)間 (datatime)+ 發(fā)信時(shí)間( datatime數(shù)據(jù)字典名:請(qǐng)假記錄 表示對(duì)象:請(qǐng)假記錄實(shí)體數(shù)據(jù)結(jié)構(gòu):請(qǐng)假編號(hào)( char +員工編號(hào) (char)+ 請(qǐng)假時(shí)間(
10、datatime +銷假時(shí)間 ( datatime)+ 請(qǐng)假天數(shù)( int+審批人編號(hào)( char管理人員管理員帳號(hào) <pi> Characters(4)<M>職工編號(hào)Characters(4)密碼Characters(6)級(jí)另 UCharacters(4)Ide ntfier 1<pi>家庭關(guān)系大系編號(hào)<pi> Characters (10)<M>員工編號(hào)3Characters (4)親屬關(guān)系Characters (50)親屬姓名Characters (10)Ide ntifier_l<pi>個(gè)人經(jīng)歷年份學(xué)習(xí)經(jīng)歷 任職經(jīng)
11、歷員工編號(hào)3<pi> Date & TimeVariable characters (50)Variable characters (50)Characters (4)<M>Ide ntifier 1<pi>信息屬于員工員丄編號(hào)1<pi> Characters (4)<M>姓名Characters (10)性別Characters (2)出生日期Date & Time學(xué)歷Variable characters (32)身份證號(hào)Variable characters (32)民族Variable characters (
12、16)職稱Characters (10)職務(wù)Characters (4)部門號(hào)1Characters (4)Ide ntifier 1<pi>擁有請(qǐng)假記錄請(qǐng)假編號(hào)<pi> Characters (6)<M>員工編號(hào)3Characters (4)請(qǐng)假時(shí)間Date & Time銷假時(shí)間Date & Time請(qǐng)假天數(shù)In teger審批人編號(hào)Characters (4)Ide ntifier 1<pi>請(qǐng)假從出出勤岀勤號(hào)<pi> Characters (6)<M>員工編號(hào)3Characters (4)上班日期Da
13、te & Time上班時(shí)間Date & Time下班時(shí)間Date & Time刷卡機(jī)號(hào)1Characters (4)Ide ntifier 1<pi>刷卡獎(jiǎng)懲記錄獎(jiǎng)懲編號(hào)<pi> Characters (6)<M>員工編號(hào)3Characters (4)獎(jiǎng)懲類型Characters (4)獎(jiǎng)懲金額Money獎(jiǎng)懲日期Date & Time批復(fù)部門號(hào)Characters (4)批復(fù)日期Date & Time獎(jiǎng)懲原因Variable characters (50)Ide ntifier_1<pi>A職位調(diào)動(dòng)調(diào)動(dòng)編號(hào)
14、<pi> Characters (6)<M>員工編號(hào)3Characters (4)調(diào)動(dòng)前職務(wù)Characters (10)調(diào)動(dòng)后職務(wù)Characters (10)調(diào)動(dòng)前部門號(hào)Characters (4)調(diào)動(dòng)后部門號(hào)Characters (4)調(diào)動(dòng)日期Date & Time批復(fù)日期Date & Time調(diào)動(dòng)原因Variable characters (50)<pi>Ide ntifier_1依賴部門部門號(hào)<pi> Characters (4)<M>部門名Characters(4)領(lǐng)導(dǎo)人數(shù)Characters(4)員工人數(shù)
15、In teger1 1Ide ntifier 1<pi>工資工資編號(hào)<pi> Characters (6)<M>員工編號(hào)3Characters (4)基本工資Money罰款Money獎(jiǎng)金Money結(jié)算工資Money起始時(shí)間Date & Time截至?xí)r間Date & Time發(fā)信日期Date & TimeIde ntifier 1<pi>對(duì)應(yīng)刷卡機(jī)刷卡機(jī)號(hào)<pi> Characters (4)Ide ntifier_1<pi><M>管理人員#管理員帳號(hào)Characters(4)o職工編號(hào)C
16、haracters(4)o密碼Characters(6)o級(jí)另UCharacters(4)家庭關(guān)系#關(guān)系編號(hào)Characters (10)*員工編號(hào)1Characters (4)o員工編號(hào)3Characters (4)o親屬關(guān)系Characters (50)o親屬姓名Characters (10)個(gè)人經(jīng)歷#年份Date & Time*員工編號(hào)1Characters (4)o學(xué)習(xí)經(jīng)歷Variable characters (50)o任職經(jīng)歷Variable characters (50)o員工編號(hào)3tCharacters (4)(D)屬于(D)信息2信息#ooooI。請(qǐng)假編號(hào) 員工編號(hào)3
17、 請(qǐng)假時(shí)間 銷假時(shí)間 請(qǐng)假天數(shù) 審批人編號(hào)請(qǐng)假記錄Characters (6)Characters (4) Date & Time Date & Time In tegerCharacters (4)嚴(yán)員工#員工編號(hào)1Characters (4)*管理員帳號(hào)Characters (4)*關(guān)系編號(hào)Characters (10)*年份Date & Timeo姓名Characters (10)o性別Characters (2)o出生日期Date & Timeo學(xué)歷Variable characters (32)o身份證號(hào)Variable characters (32)
18、o民族Variable characters (16)o職稱Characters (10)o職務(wù)Characters (4)o部門號(hào)1Characters (4)(D)擁有2(D)擁有請(qǐng)假出勤#出勤號(hào)Characters (6)*刷卡機(jī)號(hào)Characters (4)o員工編號(hào)3Characters (4)o上班日期Date & Timeo上班時(shí)間Date & Time'、o下班時(shí)間Date & Time獎(jiǎng)懲員工編號(hào)1 Characters (4)L丁獎(jiǎng)懲編號(hào)Characters (6)嚴(yán)1r懲出勤#請(qǐng)假Ji 請(qǐng)假# 員工編號(hào)1Characters (4)# 請(qǐng)假
19、編號(hào)Characters (6)獎(jiǎng)懲記錄#獎(jiǎng)懲編號(hào)Characters (6)*工資編號(hào)Characters (6)o員工編號(hào)3Characters (4)o獎(jiǎng)懲類型Characters (4)o獎(jiǎng)懲金額Moneyo獎(jiǎng)懲日期Date & Timeo批復(fù)部門號(hào)Characters (4)o批復(fù)日期Date & Timeo獎(jiǎng)懲原因Variable characters (50)應(yīng)岀勤2# 岀勤號(hào) Characters (6)# 員工編號(hào)1 Characters (4)11(D)11刷卡2出勤刷1卡(D)刷卡機(jī)# 刷卡機(jī)號(hào) Characters (4)* 岀勤號(hào) Characters
20、 (6)服從# 調(diào)動(dòng)編號(hào)Characters (6)# 員工編號(hào)1Characters (4)1服從工資職位調(diào)動(dòng)1#工資編號(hào)Characters (6)#調(diào)動(dòng)編號(hào)Characters (6)o員工編號(hào)3Characters (4)*部門號(hào)Characters (4)o基本工資Mo neyo員工編號(hào)3Characters (4)o罰款Mo neyo調(diào)動(dòng)前職務(wù)Characters (10)o獎(jiǎng)金Mo neyo調(diào)動(dòng)后職務(wù)Characters (10)o結(jié)算工資Mo neyo調(diào)動(dòng)前部門號(hào)Characters (4)o起始時(shí)間Date & Timeo調(diào)動(dòng)后部門號(hào)Characters (4)o截至
21、時(shí)間Date & Timeo調(diào)動(dòng)日期Date & Timejo發(fā)信日期Date & Timeo批復(fù)日期Date & Time對(duì)#ooo依賴部門號(hào) 部門名 領(lǐng)導(dǎo)人數(shù) 員工人數(shù)部門Characters (4)Characters (4)Characters (4)In teger管埋人員 管理員帳號(hào) 職工編號(hào) 密碼 級(jí)別家庭關(guān)系 關(guān)系編號(hào) 員工編號(hào)1 員工編號(hào)3 親屬關(guān)系 親屬姓名個(gè)人經(jīng)歷 年份 一 員工編號(hào)1 學(xué)習(xí)經(jīng)歷 任職經(jīng)歷 員工編號(hào)3員工信息2言息屬于請(qǐng)假記錄請(qǐng)假編號(hào) 員工編號(hào)3請(qǐng)假時(shí)間 銷假時(shí)間請(qǐng)假天數(shù) 審批人編號(hào)獎(jiǎng)懲員工編號(hào)1 管理員帳號(hào) 關(guān)系編號(hào) 年份
22、 姓名 性別出生日期 學(xué)歷身份證號(hào) 民族 職稱 職務(wù) 部門號(hào)1擁有擁有2請(qǐng)假請(qǐng)假員工編號(hào)1請(qǐng)假編號(hào)出勤出勤出勤號(hào) 刷卡機(jī)號(hào) 員工編號(hào)3 上班日期 上班時(shí)間 下班時(shí)間矽征 心、員工編號(hào)1獎(jiǎng)懲編號(hào)獎(jiǎng)懲記錄獎(jiǎng)懲編號(hào) 工資編號(hào) 員工編號(hào)3 獎(jiǎng)懲類型 獎(jiǎng)懲金額 獎(jiǎng)懲日期 批復(fù)部門號(hào) 批復(fù)日期 獎(jiǎng)懲原因出勤2 出勤號(hào) 員工編號(hào)1/服從調(diào)動(dòng)編號(hào)員工編號(hào)1對(duì)應(yīng)服從刷卡2出勤刷卡機(jī) 刷卡機(jī)號(hào) 出勤號(hào)部門工資工資編號(hào) 員工編號(hào)3 基本工資 罰款 獎(jiǎng)金結(jié)算工資 起始時(shí)間 截至?xí)r間 發(fā)信日期職位調(diào)動(dòng)調(diào)動(dòng)編號(hào) 部門號(hào) 員工編號(hào)3 調(diào)動(dòng)前職務(wù) 調(diào)動(dòng)后職務(wù) 調(diào)動(dòng)前部門號(hào) 調(diào)動(dòng)后部門號(hào) 調(diào)動(dòng)日期 批復(fù)日期部門號(hào) 部門名 領(lǐng)導(dǎo)
23、人數(shù) 員工人數(shù)依賴if exists(select 1 from sys.sysforeig nkey where role='FK_ the n個(gè)人經(jīng)歷擁有_員工')alter table 個(gè)人經(jīng)歷 delete foreig n key FK_ end if;個(gè)人經(jīng)歷擁有_員工if exists(select 1 from sys.sysforeig nkey where role='FK_ the nalter table 出勤出勤刷卡2_刷卡機(jī)')delete foreig n key FK_出勤刷卡2刷卡機(jī)end if;if exists(select
24、 1 from sys.sysforeignkey where role='FK_alter table 出勤 2delete foreign key FK_出勤 2_出勤 _出勤end if;if exists(select 1 from sys.sysforeignkey where role='FK_ thenalter table出勤 2delete foreign key FK_出勤 2_ 出勤 2_員工end if;if exists(select 1 from sys.sysforeignkey where role='FK_ thenalter tabl
25、e刷卡機(jī)delete foreign key FK_刷卡機(jī) _ 刷卡 _出勤end if;if exists(select 1 from sys.sysforeignkey where role='FK_') thenalter table員工delete foreign key FK_員工 _ 信息 2_ 家庭關(guān)系end if;if exists(select 1 from sys.sysforeignkey where role='FK_ thenalter table員工delete foreign key FK_員工 _屬于 _管理人員end if;if exi
26、sts(select 1 from sys.sysforeignkey where role='FK_出勤 2_出勤 _出勤 ') then出勤 2_出勤 2_員工 ')刷卡機(jī) _刷卡 _出勤')員工 _信息 2_家庭關(guān)系員工_屬于_管理人員 ')員工 _擁有 2_個(gè)人經(jīng)歷') thenalter table員工delete foreign key FK_員工 _ 擁有 2_ 個(gè)人經(jīng)歷end if;if exists(select1 from sys.sysforeignkey where role='FK_alter table獎(jiǎng)懲de
27、lete foreign key FK_獎(jiǎng)懲 _獎(jiǎng)懲 _員工end if;獎(jiǎng)懲_獎(jiǎng)懲 _員工 ') thenif exists(select 1 from sys.sysforeignkey where role='FK_ ') thenalter table獎(jiǎng)懲delete foreign key FK_獎(jiǎng)懲 _ 獎(jiǎng)懲 2_ 獎(jiǎng)懲記錄end if;if exists(select 1 from sys.sysforeignkey where role='FK_ thenalter table獎(jiǎng)懲記錄delete foreign key FK_獎(jiǎng)懲記錄 _對(duì)應(yīng)
28、_工資end if;if exists(select 1 from sys.sysforeignkey where role='FK_ thenalter table家庭關(guān)系delete foreign key FK_家庭關(guān)系 _信息 _員工end if;if exists(select 1 from sys.sysforeignkey where role='FK_ thenalter table服從delete foreign key FK_服從 _服從 _職位調(diào)動(dòng)獎(jiǎng)懲 _獎(jiǎng)懲 2_獎(jiǎng)懲記錄獎(jiǎng)懲記錄 _對(duì)應(yīng) _工資 ')家庭關(guān)系 _信息 _員工 ')服從_服
29、從_職位調(diào)動(dòng) ')end if;服從_服從 2_員工 ') thenif exists(select 1 from sys.sysforeignkey where role='FK_ alter table服從delete foreign key FK_服從 _ 服從 2_ 員工職位調(diào)動(dòng) _依賴_部門')end if;if exists(select 1 from sys.sysforeignkey where role='FK_ thenalter table職位調(diào)動(dòng)delete foreign key FK_職位調(diào)動(dòng) _依賴 _部門請(qǐng)假_請(qǐng)假 _員工
30、 ') thenend if;if exists(select 1 from sys.sysforeignkey where role='FK_ alter table請(qǐng)假delete foreign key FK_請(qǐng)假 _請(qǐng)假 _員工請(qǐng)假 _請(qǐng)假 2_請(qǐng)假記錄end if;if exists(select 1 from sys.sysforeignkey where role='FK_ ') thenalter table請(qǐng)假delete foreign key FK_請(qǐng)假 _ 請(qǐng)假 2_ 請(qǐng)假記錄end if;drop index if exists個(gè)人經(jīng)歷
31、 . 擁有 _FK;drop index if exists個(gè)人經(jīng)歷 . 個(gè)人經(jīng)歷 _PK;drop table if exists個(gè)人經(jīng)歷;drop index if exists出勤. 刷卡 2_FK;drop index if exists出勤.出勤_PK;drop table if exists出勤;drop index if existsdrop index if existsdrop table if existsdrop index if existsdrop index if existsdrop table if existsdrop index if existsdrop
32、index if existsdrop index if existsdrop index if existsdrop table if existsdrop index if existsdrop index if existsdrop index if exists出勤 2. 出勤 2_FK;出勤 2. 出勤 2_PK;出勤 2;刷卡機(jī).刷卡_FK;刷卡機(jī) . 刷卡機(jī) _PK;刷卡機(jī) ;員工 . 擁有 2_FK;員工 . 信息 2_FK;員工 . 屬于 _FK;員工 . 員工 _PK;員工;獎(jiǎng)懲 . 獎(jiǎng)懲 _FK;獎(jiǎng)懲 . 獎(jiǎng)懲 2_FK;獎(jiǎng)懲 . 獎(jiǎng)懲 _PK;drop index if
33、 exists獎(jiǎng)懲記錄 . 獎(jiǎng)懲記錄 _PK;drop table if exists獎(jiǎng)懲記錄 ;drop index if exists家庭關(guān)系信息_FK;drop index if exists家庭關(guān)系 . 家庭關(guān)系 _PK;drop table if exists家庭關(guān)系 ;drop index if exists工資 . 工資 _PK;drop table if exists工資;drop index if exists服從 . 服從 _FK;drop index if exists服從 . 服從 2_FK;drop index if exists服從 . 服從 _PK;drop ta
34、ble if exists服從;drop index if exists管理人員.管理人員_PK;drop table if exists管理人員 ;drop index if exists職位調(diào)動(dòng) . 依賴 _FK;drop index if exists職位調(diào)動(dòng) . 職位調(diào)動(dòng) _PK;drop index if exists 請(qǐng)假請(qǐng)假2_FK;drop index if existsdrop table if existsdrop index if existsdrop table if existsdrop index if existsdrop table if exists請(qǐng)假請(qǐng)假_
35、PK;請(qǐng)假;請(qǐng)假記錄請(qǐng)假記錄_PK;請(qǐng)假記錄 ;部門 . 部門 _PK;部門;/*=/* Table: 個(gè)人經(jīng)歷*/*=create table(年份個(gè)人經(jīng)歷timestampnot null,員工編號(hào) 1char(4)not null,學(xué)習(xí)經(jīng)歷varchar(50)null,任職經(jīng)歷varchar(50)null,員工編號(hào)char(4)null,constraint PK);_ 個(gè)人經(jīng)歷 primary key (年份)/*=/* Index: 個(gè)人經(jīng)歷 _PK*/*=*/*/*/*/create unique index 個(gè)人經(jīng)歷 _PK on 個(gè)人經(jīng)歷 ( 年份 ASC);/*= /*
36、Index: 擁有 _FK*/*= create index 擁有 _FK on 個(gè)人經(jīng)歷 ( 員工編號(hào) 1 ASC);/* Table: 出勤 */ create table 出勤 (出勤號(hào)char(6)not null,刷卡機(jī)號(hào)char(4)not null,員工編號(hào)char(4)null,上班日期timestampnull,上班時(shí)間timestampnull,下班時(shí)間timestampnull,刷卡機(jī)號(hào) 1char(4)null,constraint PK_出勤 primary key (出勤號(hào)));/*= /* Index: 出勤 _PK */ /*=create unique in
37、dex出勤 _PK on 出勤(出勤號(hào) ASC);/* Index: 刷卡 2_FK */ create index 刷卡 2_FK on 出勤 ( 刷卡機(jī)號(hào) ASC);/* Table: 出勤 2 */ create table 出勤 2(出勤號(hào) char(6) not null, 員工編號(hào) 1 char(4) not null,constraint PK_ 出勤 2 primary key ( 出勤號(hào) , 員工編號(hào) 1) );/*=/* Index: 出勤 2_PK*/*= create unique index 出勤 2_PK on 出勤 2 ( 出勤號(hào) ASC, 員工編號(hào) 1 ASC)
38、;/*=/* Index: 出勤 2_FK*/*= create index 出勤 2_FK on 出勤 2 ( 員工編號(hào) 1 ASC);*/create index 出勤 _FK on 出勤 2 ( 出勤號(hào) ASC);*/* Table: 刷卡機(jī)*/*/create table 刷卡機(jī)(刷卡機(jī)號(hào) char(4)not null,出勤號(hào) char(6) not null, constraint PK_ 刷卡機(jī) primary key ( 刷卡機(jī)號(hào) );/* Index: 刷卡機(jī) _PK*/ create unique index 刷卡機(jī) _PK on 刷卡機(jī) ( 刷卡機(jī)號(hào) ASC );/*=/
39、* Index: 刷卡 _FK*/*= create index 刷卡 _FK on 刷卡機(jī) ( 出勤號(hào) ASC);*/*/* Table: 員工create table 員工 (員工編號(hào) 1char(4)not null,管理員帳號(hào)char(4)not null,關(guān)系編號(hào)char(10)not null,年份timestampnot null,姓名char(10)null,性別char(2)null,出生日期timestampnull,學(xué)歷varchar(32)null,身份證號(hào)varchar(32)null,民族varchar(16)null,職稱char(10)null,職務(wù)char(4
40、)null,部門號(hào) 1char(4)null,constraint PK_員工 primary key (員工編號(hào) 1)/* Index: 員工 _PK*/*=create unique in dex員工 _PK on 員工(員工編號(hào) 1 ASC );/*=/* In dex:屬于 _FK*/*=create index屬于_FK on 員工 (管理員帳號(hào) ASC);/* Index: 信息 2_FK*/*=create index 信息 2_FK on 員工 (關(guān)系編號(hào) ASC);/*=/* Index: 擁有 2_FK/*=*/create index 擁有 2_FK on 員工 ( 年份
41、 ASC);*/*/* Table: 獎(jiǎng)懲*/create table 獎(jiǎng)懲(員工編號(hào) 1獎(jiǎng)懲編號(hào)constraint PKchar(4)char(6) 獎(jiǎng)懲 primary key (not null,not null,員工編號(hào) 1, 獎(jiǎng)懲編號(hào) );/*=/* Index: 獎(jiǎng)懲 _PK*/*= create un ique in dex獎(jiǎng)懲 _PK on 獎(jiǎng)懲(員工編號(hào) 1 ASC,獎(jiǎng)懲編號(hào) ASC);/*=create index 獎(jiǎng)懲 2_FK on 獎(jiǎng)懲 (獎(jiǎng)懲編號(hào) ASC);/*=/* Index: 獎(jiǎng)懲 _FK*/*=create index 獎(jiǎng)懲 _FK on 獎(jiǎng)懲 (員工編號(hào)
42、 1 ASC );/*=/* Table: 獎(jiǎng)懲記錄*/*=create table 獎(jiǎng)懲記錄I獎(jiǎng)懲編號(hào)char(6)not null,工資編號(hào)char(6)not null,員工編號(hào)char(4)null,獎(jiǎng)懲類型char(4)null,獎(jiǎng)懲金額numeric(8,2)null,獎(jiǎng)懲日期timestampnull,批復(fù)部門號(hào)char(4)null,批復(fù)日期timestampnull,獎(jiǎng)懲原因varchar(50)null,constraint PK_ 獎(jiǎng)懲記錄 primary key (獎(jiǎng)懲編號(hào) );*/*/* Index: 獎(jiǎng)懲記錄 _PK 獎(jiǎng)懲編號(hào) ASC );/*=/* Index:
43、對(duì)應(yīng) _FK*/*= create index 對(duì)應(yīng) _FK on 獎(jiǎng)懲記錄 ( 工資編號(hào) ASC);/* Table: 家庭關(guān)系 */ create table 家庭關(guān)系 (關(guān)系編號(hào)char(10)not null,員工編號(hào) 1char(4)not null,員工編號(hào)char(4)null,親屬關(guān)系char(50)null,親屬姓名char(10)null,constraint PK_家庭關(guān)系 primary key (關(guān)系編號(hào));/*= /* Index: 家庭關(guān)系 _PK */ /*= create unique index家庭關(guān)系 _PK on 家庭關(guān)系 (關(guān)系編號(hào) ASC );=*/
44、*/=*/*= /* Index: 信息 _FK /*=create index 信息 _FK on 家庭關(guān)系 ( 員工編號(hào) 1 ASC);/* Table: 工資 */ create table 工資 (工資編號(hào)char(6)not null,員工編號(hào)char(4)null,基本工資numeric(8,2)null,罰款numeric(8,2)null,獎(jiǎng)金numeric(8,2)null,結(jié)算工資numeric(8,2)null,起始時(shí)間timestampnull,截至?xí)r間timestampnull,發(fā)信日期timestampnull,constraint PK_工資 primary ke
45、y (工資編號(hào) );/*=/* Index: 工資 _PK*/*=create unique in dex工資 _PK on 工資(工資編號(hào) ASC);*/*/* Table: 服從*/create table 服從 (調(diào)動(dòng)編號(hào)char(6)not null,員工編號(hào) 1char(4)not null,constraint PK_服從 primary key (調(diào)動(dòng)編號(hào) , 員工編號(hào) 1)Index:服從_PK*/);*/*/create unique in dex 服從 _PK on 服從(調(diào)動(dòng)編號(hào) ASC,員工編號(hào) 1 ASC);*/* Index: 服從 2_FK*/*/create i
46、ndex 服從 2_FK on 服從 (員工編號(hào) 1 ASC);*/* Index: 服從 _FK*/*/create index 服從 _FK on 服從 ( 調(diào)動(dòng)編號(hào) ASC);*/* Table: 管理人員*/*/create table 管理人員(管理員帳號(hào)char(4)not null,職工編號(hào) char(4) null,密碼char(6)null,級(jí)別char(4)null,constraint PK_ 管理人員 primary key ( 管理員帳號(hào) ) );/* Index: 職位調(diào)動(dòng) _PK*/*=/* Index: 管理人員_PK*/*=create unique index 管理員帳號(hào) ASC );管理人員_PK on管理人員(/*=/* Table: 職位調(diào)動(dòng)*/*=create table 職位調(diào)動(dòng)調(diào)動(dòng)編號(hào)char(6)not null,部門號(hào)char
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年華東師大版九年級(jí)生物上冊(cè)月考試卷含答案
- 2025年北師大新版選修4地理下冊(cè)月考試卷含答案
- 二零二五版拌合料行業(yè)技術(shù)交流與合作開發(fā)合同4篇
- 二零二五年度陶瓷面磚研發(fā)及采購合同4篇
- 二零二五版美團(tuán)外賣外賣配送高峰期應(yīng)急預(yù)案合同4篇
- 2025年新型共享辦公空間租賃合同3篇
- 掛鉤生產(chǎn)單位的合同(2篇)
- 2025年度木門安裝工程招標(biāo)合同4篇
- 2025年度門窗安裝工程設(shè)計(jì)與施工一體化合同4篇
- 2025年度民間借貸融資租賃與資產(chǎn)證券化合同4篇
- 射頻在疼痛治療中的應(yīng)用
- 和平精英電競(jìng)賽事
- 四年級(jí)數(shù)學(xué)豎式計(jì)算100道文檔
- “新零售”模式下生鮮電商的營銷策略研究-以盒馬鮮生為例
- 項(xiàng)痹病辨證施護(hù)
- 職業(yè)安全健康工作總結(jié)(2篇)
- 懷化市數(shù)字經(jīng)濟(jì)產(chǎn)業(yè)發(fā)展概況及未來投資可行性研究報(bào)告
- 07FD02 防空地下室電氣設(shè)備安裝
- 教師高中化學(xué)大單元教學(xué)培訓(xùn)心得體會(huì)
- 彈簧分離問題經(jīng)典題目
- 部編版高中歷史中外歷史綱要(下)世界史導(dǎo)言課課件
評(píng)論
0/150
提交評(píng)論