Tröôøng Ñh Noâng Laâm Tp.hcm

Tröôøng Ñh Noâng Laâm Tp.hcm

TRNG H NONG LAM TP.HCM KHOA QUAN LY AT AI & BAT ONG SAN Bai giang mon hoc C S D LIEU Giang vien: ThS. Le Ngoc Lam Bo mon: Cong Nghe a Chnh Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 1 GII THIEU MON HOC

Thi lng Pham vi mon hoc oi tng nghien cu Muc ch nghien cu Yeu cau mon hoc Cau truc mon hoc Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 2 NI DUNG

1. 2. 3. 4. 5. NHP MN CSDL C S D LIU QUAN H CHUN HO CSDL THIT K H THNG CSDL TI NGUYN T AI Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu

3 CHNG 1 NHAP MON CSDL CAC KHAI NIEM MOT SO V DU CAU TRUC MOT HE CSDL TNH OC LAP D LIEU MO HNH D LIEU HE QUAN TR C S D LIEU Tuesday, February 4, 20 20 ThS. L Ngc Lm

C S D Liu 4 KHAI NIEM CSDL Khai niem ve d lieu Nhu cau quan ly va truy xuat thong tin Cac hnh thc to chc d lieu Cac tnh chat cua d lieu Cac dang d lieu Tuesday, February 4, 20 20

ThS. L Ngc Lm C S D Liu 5 n th Son; 19 tuoi; que quan: Bnh nh Sinh vien n v hanh chanh Thai Lan; dan so 60 trieu ngi Tnh Bnh Thuan; cach Tp.HCM 150km Quoc gia Lao; dan so 30 trieu ngi rung Quoc; 1,2 ty ngi Tnh Long An; Cach Tp.HCM 50km en th Men; 20 tuoi; Que quan: Tien Giang

Tnh ong Nai; cach Tp.HCM 30km t nam; dan so 80 trieu ngi Le Van Lua; 21 tuoi; que quan: Long An Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 6 CAU TRUC 1 HE CSLD Mc Mc Mc vat ly

khai niem khung nhn NGI SD 1 NGI S DUNG NGI SD 2 . NGI SD n CSDL KHAI NIEM CSDL VAT LY NGI THIET KE HE THONG MAY TNH

Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 7 TNH OC LAP D LIEU Mc oc lap vat ly (Physical data ( independence) l kh nng sa i s vt l khng lm cho cc chng trnh ng dng phi vit li. Cc sa i mc vt l l cn thit ci thin hiu nng. c lp d liu lun l (Logical data independence) l kh nng sa i s lun l khng lm cho cc chng trnh ng dng phi vit li. Cc sa i mc lun l l cn thit khi cu trc lun l ca

c s d liu b thay th. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 8 MO HNH D LIEU Mo hnh Mo hnh Mo hnh hp Mo hnh Tuesday, February 4, 20 20

mang phan cap thc the ket quan he ThS. L Ngc Lm C S D Liu 9 MO HNH MANG (Network model) Muc tin D lieu gop Ban ghi Tuesday, February 4, 20

20 ThS. L Ngc Lm C S D Liu 10 MO HNH PHAN CAP (Hierarchical model) Cay (Tree) oan (Segment) Trng (Field) Cay cac oan (Tree of segments) Tuesday, February 4, 20 20

ThS. L Ngc Lm C S D Liu 11 MO HNH QUAN HE (Relational model) Bi cnh ra i Trc khi co RM, d lieu c quan ly bang tap tin he tap tin vi cac ngon ng: COBOL, FORTRAN, PASCAL Nhng han che cua he tap tin: - Co s lien ket chat che gia cau truc vat ly luan ly va chng trnh ng dung - D tha d lieu qua ln - Ngi SD t co kha nang tiep can va khai thac d lieu Tuesday, February 4, 20

20 ThS. L Ngc Lm C S D Liu 12 MO HNH QUAN HE (Relationship model) Quan he (Relationship) Thuoc tnh (Attribute) Mien gia tr (Domain) Bo trong quan he (Record) Khoa va thuoc tnh khoa

(Primary key) Thuoc tnh khong kha(None primary key) Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 13 MO HNH THC THE KET HP (Entities relationship model) Thc the (Entities) Moi ket hp (Join) Quan he (Relationship)

Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 14 HE QUAN TR CSLD (Database Management System) Mt c s d liu (CSDL/ DB: DataBase) l mt tp hp cc tp tin c lin quan vi nhau, c thit k nhm lm gim thiu s lp li d liu. Mt h qun tr c s d liu (HQTCSDL/ DBMS: DataBase Management System) l mt h thng

gm mt CSDL v cc thao tc trn CSDL , c thit k trn mt nn tng phn cng, phn mm v vi mt kin trc nht nh. Mt h c s d liu (HCSDL/ DBS: DataBase System) l mt phn mm cho php xy dng mt HQTCSDL. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 15 Cu trc vt l v lun l Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu

16 TNH CHAT HE QUAN TR CSDL 1. 2. 3. 4. 5. 6. 7. 8. oc lap vat ly oc lap logic Ngon ng phi thu tuc Quan tr d lieu Quan ly d tha d lieu Tng hp d lieu (chuan hoa) Chia se d lieu (dung chung) An Toan d lieu

Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 17 LCH S HE QUAN TR CSDL au thap nien 60 the ky XX Gia thap nien 60 Thap nien 70 Thap nien 80 Thap nen 90 en nay

Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 18 CHC NANG HE QUAN TR CSDL Mo ta d lieu Tm kiem d lieu Cap nhat d lieu

Chuyen hoa d lieu ieu khien tnh toan ven d lieu Quan ly giao tac va an toan d lieu Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 19 Chng 2 M HNH D LIU QUAN H (RELATIONAL MODEL) MT S KHI NIM

CC PHP TON I S QUAN H PH THUC HM RNG BUC TON VN Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 20 V d quan ly thong tin ve sinh vien ang ky mon hoc nh sa Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu

21 V d (tt) Nhng han che tren se c khac phuc neu to chc d lieu theo mo hnh sau: Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 22 M S KHI NIM THUC TNH (ATTRIBUTE) MIN GI TR CA THUC TNH

(DOMAIN) B (TUBLE hay RECORD) SO_THUA LOAI_DAT 001 LUC Tran van 1.050 Thanh 002 BHK Nguyen Be 003

ONT Le Thanh Nam Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu TEN_CSD DIEN_TICH (M2) Th 2.500 500 23 M S KHI NIM

Thuc tnh: l tnh cht m t i tng hay ni cch khc 1 i tng c m t thng qua thuc tnh ca n. Min gi tr: Thuc tnh c th l mt chui cc k t hay l mt con s hoc ngy thng nm. Ngoi ra c th cn l gi tr tin t hay mt n v o lng no . Tp hp cc gi tr ny gi l Min gi tr ca thuc tnh. B: Tp hp cc thuc tnh cng m t mt i tng gi l B. Nh vy c th ni b l mt i tng c th. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu

24 M S KHI NIM QUAN H (RELATIONSHIP) Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 25 Lc quan h Tap tat ca cac thuoc tnh can quan ly cua mot oi tng cung vi moi lien he gia chung c goi la lc o quan he. Lc o quan he Q vi tap thuoc tnh {A1,A2,...,An} c viet la

Q(A1,A2,...,An). Tap cac thuoc tnh cua Q c ky hieu la Q+. Chang han lc o quan he sinh vien (at ten la Sv) vi cac thuoc tnh nh tren la: Sv(MASV, HOSV,TENSV,NU, NGAYSINH, MALOP, HOCBONG, TINH) Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 26 QUAN H Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu

27 Khoa - Khoa ngoai cua Quan he Sieu khoa Khoa Khoa ngoai Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 28 Khoa - Khoa ngoai cua Quan he

Siu kho: l mt tp cc thuc tnh phn bit gia cc i tng vi nhau trong mt quan h. Kho: Trong trng hp siu kho ch bao gm 1 thuc tnh th gi l kho. Cc thuc tnh trong siu kho gi l thuc tnh kho. Thuc tnh kho thng ng vai tr lin kt gia cc quan h vi nhau. Kho ngoi: Trong trng hp 2 quan h lin kt vi nhau thng qua 1 thuc tnh nu thuc tnh ny ng vai tr l kho chnh trong mt quan h xc nh th n chnh l kho ngoi ca quan h cn li. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu

29 V d 1 ng giao thng ca huyn Hc Mn c phn thnh 4 cp: ng quc l, ng tnh l, ng lin x v ng hm. ng quc l c l gii 60m; ng tnh l c l gii 40m; ng lin x c l gii 15m v ng hm c l gii 8m. Mi cp ng cng c kt cu b mt khc nhau; Quc l v tnh l c kt cu b-tng nha; ng lin x v hm thng l ng cp phi hoc ng t. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu

30 V d 2 Theo s liu thng k nm 2005 Huyn Hc Mn c 02 tuyn ng quc l vi chiu di trn 40km; 06 tuyn ng tnh l vi chiu di trn 80km; 15 tuyn ng lin x v ng ni b vi chiu di 150km v 60 con hm vi tng chiu di trn 30km Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 31

V d 3 Cng ty A kinh doanh rt nhiu mt hng thuc nhiu chng loi khc nhau, mi mt hng u c m ring tng ng vi mt mc gi nht nh. Mi nhn vin cng ty c giao cho ph trch mt mt hng nht nh, cc nhn vin c qun l thng qua m nhn vin. Cc thng tin m cng ty qun l v nhn vin bao gm: m nhn vin, tn nhn vin, ngy sinh, a ch, v mt hng m nhn vin ph trch. Mi mt hng u c tn v m mt hng cng vi xut x ngun gc ca mt hng m nhn vin cn bit nhp hng khi c yu cu. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 32

CAC PHEP TOAN AI SO QUAN HE Cac phep toan ai so quan he la phep toan ma tat ca cac he quan tr c s d lieu eu cai at cu the bang cac lenh theo ngon ng rieng. Cac phep toan nay c thc hien trc tiep tren cac bo cua cac quan he lu tr trong may tnh. Viec to chc cac quan he va cac bo cua no co the c xem nh bieu dien tng ng mot mot qua cac tep(file) va cac ban ghi(Records). Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu

33 Phep chen(Insert) Muc ch cua phep chen la them mot bo vao mot quan he nhat nh. Ket qua cua phep chen co the gay ra mot so sai sot vi nhng ly do sau ay: - Bo mi c them vao khong phu hp vi lc o quan he cho trc. - Mot so gia tr cua mot so thuoc tnh nam ngoai mien gia tr cua thuoc tnh o. - Gia tr khoa cua bo mi co the la gia tr a co trong quan he ang lu tr. Do o tuy tng quan he cu the ma co cach khac phuc khac nhau. Tuesday, February 4, 20 20 ThS. L Ngc Lm

C S D Liu 34 Phep chieu (project) Cho Q la mot quan he vi tap thuoc tnh Q+, Q+=A1,A2,...,An, X Q+: X la mot tap con cac thuoc tnh cua Q. Phep chieu Q len tap thuoc tnh X la phep trch cot t Q gom nhng thuoc tnh co trong X, cac bo la mot phan cua cac bo trong Q, c ky hieu Q[X] V du: Ngi ta ch can biet MA_LD (ma loai at) va thi han s dung cua loai at o (TH_SD), thc hien phep chieu tap con gom cac thuoc tnh MA_LD va TH_SD len quan he LOAIDAT. Ket qua ta c mot quan he vi hai thuoc tnh MA_LD va TH_SD, hai thuoc tnh nay eu nam trong quan he LOAIDAT. Tuesday, February 4, 20

20 ThS. L Ngc Lm C S D Liu 35 Phep chieu (v du) Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 36 Phep chon:(select) Cho Q la mot quan he vi tap thuoc tnh Q+,

Q+=A1,A2,...,An, goi D(x) la mot ieu kien xac nh tren Q+. Phep chon t Q nhng bo thoa D(x) la mot quan he Q' vi cac phan t (bo) thuoc Q va thoa ieu kien D(x). Q' = q /q Q /q thoa D(x) Noi cach khac phep chon thc hien Q theo ieu kien D(x) la phep trch cac bo t Q thoa ieu kien D(x) c ky hieu Q:D(x) V du:Xac nh nhng tha co dien tch >10.000 m2 trong quan he DANGKY Thc hien phep chon vi ieu kien D_TICH>10.000 tren quan he DANGKY nhng cac phan t trong quan he mi ch co nhng bo co thuoc tnh D_TICH> 10.000 (trong MAPINFO s dung lenh SELECT). Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 37

Phep chon (v du) Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 38 Phep tch e-cac (cartesian product) Cho hai quan he Q1(A1,A2,...,Am) va Q2( B1,B2,...,Bn), tch e-cac cua hai quan he Q1 va Q2 la quan he Q3 co cac thuoc tnh la hp cac thuoc tnh Q1 va Q2, cac n bo la noi cua cac n bo trong Q1 va Q2. Ky hieu:

Q3= Q1* Q2=q3=(q1,q2)Q3/q1Q1 q2Q2, Q3 co m+n ngoi (co m+n thuoc tnh) Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 39 Phep tch e-cac (v du) Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 40

Phep han che mot quan he (Restriction) Phep han che mot quan he la phep toan mot ngoi cho ket qua la mot quan he co cac bo thoa man mot ieu kien han che. ieu kien han che co the ap dung tren mot hoac nhieu thuoc tnh cua quan he. Co hai chuan viet ve ieu kien han che cua mot quan he: Chuan va (AND) va chuan hoac (OR). Han che cua quan he Q bang tieu chuan T la quan he Q' co cung lc o (so ngoi) trong o cac n bo thoa man tieu chuan T. V du: Trong quan he THUA xac nh nhng tha co dien tch >1000 va loai at la nong nghiep. Quan he mi t ieu kien tren se la cac quan he co n bo co ay u nhng thuoc tnh cua quan he THUA cac bo thoa ieu kien DT> 1000 LD ="NN" Tuesday, February 4, 20 20

ThS. L Ngc Lm C S D Liu 41 Phep lien ket:(join) Cho hai quan he Q1(A1,A2,...,Am) va Q2( B1,B2,...,Bn) va hai thuoc tnh Ai A1,A2,...,Am ; Bj B1,B2,...,Bn sao cho MGT (Ai)=MGT(Bj) va phep lien ket <,<=,>,>=,=,<> Phep lien ket thc hien tren hai quan he Q1 va Q2 cung vi cac thuoc tnh Ai va Bj la phep tch e-cac cua hai quan he Q1 va Q2. tao ra mot quan he mi co cac thuoc tnh va cac n bo la ghep noi cac n bo va cac thuoc tnh cua hai quan he Q1 va Q2., ch lay ra nhng n bo thoa man ieu kien han che Ai va Bj Tuesday, February 4, 20

20 ThS. L Ngc Lm C S D Liu 42 Phep lien ket(v du) Ai = Dj Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 43 Cu lnh SQL Tuesday, February 4, 20 20

ThS. L Ngc Lm C S D Liu 44 Truy vn chn

Select [Distinct|Top n[%]] field1 [As alias1][,field2 [As alias2][,...]] From table1 [Inner Join table2 On table1.field1 table2.field2] ... Where dieuKien] Order By field1[Asc|Desc][,field2[Asc|Desc]][,...]]]; Distinct: loai bo cac bo trung trong quan he ch Top n[%]: Chon n hay n% mau tin au tien. table: Ten table hay query cha d lieu. field: Ten field hay mot bieu thc. Alias: Trng hp field la mot bieu thc th la mot ten mi cua bieu thc. Inner Join: moi mau tin cua table1 noi vi bat ky mau tin nao cua table2 co d lieu cua field1 thoa man ieu kien so sanh vi d lieu cua field2 tao thanh mau tin cua query. ieu kien: Bieu thc ma d lieu mau tin phai thoa man Chu y: Khi neu ro thuoc tnh o thuoc ve quan he nao ta viet theo cu phap tenQuanHe.tenThuocTnh. Tuesday, February 4, 20 20 ThS. L Ngc Lm

C S D Liu 45 Truy vn chn v d Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 46 Truy vn nhm

Select [Distinct|Top n[%]] field1 [As alias1][,field2 [As alias2][,...]] From table1 [Inner Join table2 On table1.field1 table2.field2] ... [Where dieuKienLocMauTinNguon] [Group By fieldGroupBy[,fieldGroupBy[,...]] [Having dieuKienLocMauTinTongHop] [Order By field1[Asc|Desc][,field2[Asc|Desc]][,...]]]; ieuKienLocMauTinNguon: ieu kien ma cac mau tin nguon phai thoa man (phep chon) fieldGroupBy: ten field ma cac mau tin co d lieu giong nhau tren ay c xep vao cung nhom. ieuKienLocMauTinTongHp: ieu kien ma cac mau tin tong hp phai thoa man (phep chon) Tuesday, February 4, 20 20 ThS. L Ngc Lm

C S D Liu 47 Truy vn nhm v d V du: em so lng sinh vien n cua moi khoa SELECT Kh.MAKHOA,TENKHOA,COUNT(Kh.MAK HOA) AS SOLUONG FROM (Sv Inner Join Lop On Sv.MALOP = LOP.MALOP) INNER JOIN Kh On lop.MAKHOA=Kh.MAKHOA

WHERE NU GROUP BY Kh.MAKHOA,TENKHOA; Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 48 Truy vn lng nhau La nhng cau lenh truy van ma trong thanh phan

WHERE hay HAVING co cha them mot cau lenh Select khac. Cau lenh select khac nay goi la subquery. Ta long cau Select vao phan Where hay Having theo cu phap sau: o bieuthuc toanTuSoSanh [ANY | ALL | SOME] (cauLenhSQL) ANY, SOME la bat ky, ALL la tat ca Cac mau tin cua query chnh thoa man toan t so sanh vi bat ky/ tat ca mau tin nao cua subquery o bieuThuc [NOT] IN (cauLenhSQL) Cac mau tin cua query chnh co gia tr bang vi mot gia tr trong subquery o [NOT] EXISTS (cauLenhSQL). Cac mau tin cua query chnh thoa man khi subquery co mau tin Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 49

Truy vn lng nhau v d V du: Lap danh sach sinh vien co hoc bong cao nhat SELECT * FROM Sv WHERE HOCBONG>=ALL(SELECT HOCBONG FROM SV); V du: Lap danh sach sinh vien co iem thi mon CSDL cao nhat SELECT SV.MASV,HOTEN,NU,NGAYSINH,DIEMTHI FROM sv Inner Join kq On Sv.MASV = Kq.MASV

WHERE MAMH='CSDL' AND DIEMTHI >= ALL (SELECT DIEMTHI FROM KQ WHERE MAMH='CSDL'); Hieu va van dung tot lenh truy van d lieu la mot viec lam cc ky can thiet e tao ra cac ket qua cho bao cao, thong ke so lieu. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 50 Chng 2 MT S KHI NIM CC PHP TON I S QUAN H RNG BUC TON VN

PH THUC HM Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 51 Rng buc ton vn (Entegrity constraint) Trong moi CSDL luon ton tai nhieu moi lien he gia cac thuoc tnh, gia cac bo. S lien he nay co the xay ra trong mot lc o quan he hoac trong cac lc o quan he cua mot c s d lieu. Cac moi lien he nay la nhng ieu kien bat bien ma tat ca cac bo cua nhng quan he co lien quan trong CSDL eu phai thoa man moi thi iem. Nhng ieu kien bat bien o c goi la rang buoc toan ven. Trong thc te rang buoc toan ven la cac quy tac quan ly c ap at tren cac oi tng cua the gii thc. V du 1: Xet c s d lieu ve quan ly sinh vien, t CSDL nay ta co the xac nh c mot so rang buoc toan ven sau:

R1: khong the co >1 sinh vien co cung MASV R2: Tuoi sinh vien phai >= 18 R3: Gii tnh ( phai) phai la nam hoac n. V du 2: Xet CSDL ve ang ky at ai ta co cac rang buoc toan ven sau: R1: So tha phai la duy nhat trong mot t ban o. R2: Dien tch so tha phai >0. R3: Thi han s dung phai >50 nam. R4: Loai at phai la mot trong cac loai at theo qui nh cua Luat . Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 52 Kim tra Rng buc ton vn Trong ho s phan tch thiet ke he thong CSDL can phai xac nh ay u cac rang buoc toan ven va

can phai co thu tuc cu the e kiem tra cac rang buoc toan ven moi khi no b vi pham. Rang buoc toan ven co the c kiem tra theo hai cach: + Cach 1: Kiem tra ngay khi nhap d lieu: cach nay thng s dung oi vi viec kiem tra n gian, t ton thi gian. V du: kiem tra mien gia tr, gii tnh... + Cach 2: Kiem tra nh ky hoac khi can; cach nay thng s dung vi viec kiem tra phc tap ton nhieu thi gian. V du kiem tra ve thi han s dung tong dien tch trong ranh gii hanh chnh. Rang buoc toan ven noi len cac quy tac quan ly cua he thong can tin hoc hoa. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 53 Cc yu t ca RBTV

1. iu kin c mo ta mot cach hnh thc bang ngon ng t nhien hoac ai so. V du: Cho hai quan he: LOAIDAT( MA_LD, TEN_FAO, TEN_VN, KY_HIEU) R1: mald1 LOAIDAT mald2 LOAIDAT loaidat1 loaidat2: mald1.MA_LD mald2.MA_LD. (hai loai at khac nhau th co MA_LD khac nhau) Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 54 Cc yu t ca RBTV 2) Boi canh:

Boi canh cua mot rang buoc toan ven la nhng quan he ma rang buoc o co hieu lc hay noi mot cach khac, o la nhng quan he can phai c kiem tra rang buoc toan ven. Boi canh cua mot rang buoc toan ven co the la mot hoac nhieu quan he. .V du: Xet CSDL ve ang ky at ai bao gom cac thc the (quan he) sau: LOAIDAT( MA_LD, TEN_FAO, TEN_VN, KY_HIEU) DOITUONGSD(MA_DTSD, TEN_DTSD, NGAY_DK) HIENTRANG( KY_HIEU, MD_SD) DANGKY( SOTO_BD, SO_THUA, MA_LD, MA_DTSD, KY_HIEU, D_TICH, THOIHAN_SD). Vi cac RBTV sau: Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 55

Cc yu t ca RBTV R1: ieu kien: nhng loai at khac nhau se anh MA_LD khac nhau Boi canh: trong mot quan he R2: ieu kien: Cac oi tng s dung khac nhau se anh MA_DTSD khac nhau Boi canh: trong mot quan he R3: ieu kien: Muc ch s dung at khac nhau se anh KY_HIEU khac nhau Boi canh: Trong mot quan he R4: ieu kien: trong cung mot t ban o SO_THUA phai khac nhau Boi canh: trong cung mot quan he R5: ieu kien: MA_LD trong DANGKY phai co trong LOAIDAT Boi canh: Trong hai quan he DANGKY va LOAIDAT R6: ieu kien: MA_DTSD trong DANGKY phai co trong DOITUONGSD Boi canh: Trong hai quan he DANGKY va DOITUONGSD Tuesday, February 4, 20 20

ThS. L Ngc Lm C S D Liu 56 Tam anh hng Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 57 Phan loai RBTV 1) Rang buoc toan ven co boi canh la mot quan he (tren mot quan he) a.) Rang buoc toan ven ve mien gia tr: Rang buoc nay anh hng en nhng thuoc tnh ve mien gia tr. b.) Rang buoc toan ven lien thuoc tnh: La rang buoc toan ven c xac nh tren nhieu thuoc tnh.

c.) Rang buoc toan ven lien bo: La loai rang buoc toan ven xac nh lien quan en nhieu bo trong mot quan he, khi can kiem tra en rang buoc toan ven loai nay ta phai xet en nhieu bo trong quan he, thng gap nhat la khoa va phu thuoc ham (R2 trong V du 2, phan a) d.) Rang buoc toan ven khoa noi: nh ngha khoa : Khoa cua mot quan he la tap toi thieu cua cac thuoc tnh ma moi trng hp cu the cua no xac nh duy nhat mot bo trong quan he. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 58 Phan loai RBTV 2) Rang buoc toan ven co boi canh tren nhieu quan he: a.) Phu thuoc ton tai: RBTV kieu phu thuoc ton

tai la s ton tai cua mot bo trong quan nay phu thuoc vao s ton tai cua 1 bo trong quan he khac. Thng gap nhat la do s hien dien cua khoa ngoai hoac long khoa. b) RBTV lien bo va lien quan he: La RBTV lien quan en mot nhom cac bo gia cac quan he v du hang mc at. c) RBTV lien bo, lien thuoc tnh va lien quan he: La RBTV ma gia tr cua mot thuoc tnh lien quan en cac thuoc tnh khac nhau cua nhieu bo tren cac quan he v du ve nh gia at. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 59 Chng 2

MT S KHI NIM CC PHP TON I S QUAN H RNG BUC TON VN PH THUC HM Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 60 Ph thuc hm (Functional dependency) Phu thuoc ham la s bieu dien rang buoc toan ven di hnh thc toan hoc e bao am thong tin khong b ton that khi phan ra hoac ket noi gia cac quan he.

Cho Q la mot quan he Q+ la tap thuoc tnh cua Q; X,Y Q+, XY( :tap rong). Ta noi: X xac nh Y hay Y phu thuoc ham vao X, ky hieu:X Y neu: (luon xac nh cung trng hp cu the Y khi cho cung trng hp cu the X) q1,q2Q+:q1*X=q2*Xq1Y=q2Y S PTH c th c ca Q(A1, A2An) l 22n Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 61 Ph thuc hm v d Tuesday, February 4, 20 20

ThS. L Ngc Lm C S D Liu 62 Ph thuc hm v d Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 63 Ph thuc ham(v du) MASV TEN_SV: Mi m sv c mt tn MAMH TEN_MH: Mi m mn hc c mt

tn MSGV TEN_GV: Mi m gio vin c mt m s cng chc SHTHUA TEN_CSD: Mi s tha c mt tn ch s dng Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 64

Ph thuc ham(v du) Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 65 Ph Thuc Hm v d Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 66 Ph Thuc Hm Chu y : Phu thuoc ham X xac nh Y lien quan

en tat ca cac gia tr co the co cua X va Y trong bang ch khong phai ch da tren vai gia tr hien tai. Thc chat phu thuoc ham c xac nh khi biet ngha cua cac thuoc tnh trong X va Y. Viec xac nh cac phu thuoc ham la da vao the gii thc do mo ta trong lc o khai niem. Xac nh c cac phu thuoc ham la mot phan quan trong trong qua trnh hieu y ngha cua c s d lieu. Chnh ngi quan tr c s d lieu se thc hien cong viec nay. Ngoai ra con co phu thuoc ham tren nhieu thc the Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 67

Ph Thuc Hm v d Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 68 Tnh cht ph thuc hm Cho quan he Q vi tap thuoc tnh Q+, X, Y, +Z thuoc Q * Tnh chat 1: Tnh phan xa: Neu Y XXY (Y la con hoac = X) V du: SOTO_BD, SO_THUA SO_THUA * Tnh chat 2: Tnh them vao Neu X Y th X Z Y Z (X Z= XZ) * Tnh chat 3: Tnh bac cau: Neu X Y va Y Z th X Z Tuesday, February 4, 20

20 ThS. L Ngc Lm C S D Liu 69 Tnh cht ph thuc hm Ba tnh chat tren la noi dung he tien e Amstrong a ra nam 1974. T ba tnh chat tren ta co the suy dien ra mot so phu thuoc ham khac goi la luat dan suy dien. Trong mot c s d lieu vi tap phu thuoc ham F, gia s f la mot phu thuoc ham c suy ra t F. Neu cac phu thuoc ham trong F c kiem tra ung th F hien nhien la ung. V du: Xet c s d lieu sau: DANGKY(SOTO_BD, SO_THUA, CHU_SD, L_.DAT, D_TICH, DT_SD) vi cac phu thuoc ham sau: f1: SOTO_BD, SO_THUA CHU_SD, L_DAT, D_TICH f2: CHU_SD DT_SD f3: SOTO_BD, SO_THUA DT_SD

Qua o ta thay phu thuoc ham f3 c suy ra t phu thuoc ham f1 va f2 thong qua tnh chat bac cau Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 70 Mt s lut dn suy din 1) Luat phan ra: Neu XY va Z Y th X Z Chng minh: Z Y YZ (phn x), ma XY X Z (bc cau) V du: Cho quan he: DVDAT(SO_DV, D_TICH, L_DAT, DO_DOC, T_DAY, N_NUOC, HT_SDD) khoa la SO_DV SODV D_TICH, L_DAT, T_DAY, N_NUOC, HT_SDD. Neu biet c so n v at ai th se biet tat ca

cac thong tin khac co lien quan en n v o SO_DVL_DAT, D_TICH (Ch muon biet loai at va dien tch cua n v o) Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 71 Mt s lut dn suy din 2) Luat bac cau gia: Neu XY va WYZ WX Z Chng minh: Ta co: W W XY W XWY ( Them vao) ma WY Z WX Z(bac cau) V du : Co hai quan he sau: KEHOACH( G_VIEN, M_HOC, GIAM_THI, NG_THI) the hien viec phan cong gac thi cho cac giam th vi mot

so quy tac quan ly sau: QT1: G_VIEN M_HOC: moi giao vien day mot mon hoc QT2: M_HOC, NG_THI GIAM_THI: moi mon hoc c mot giam th gac thi vao mot ngay. Do G_VIEN M_HOC G_VIEN, NG_THI M_HOC, NG_THI Do o: G_VIEN,NG_THI GIAM_THI Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 72 Mt s lut dn suy din 3) Luat hoi: Cho XY va XZ X YZ Chng minh: XY XXY ( them vao) XZ XYZY (them vao) XYZ(bac cau)

Bai tap: Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 73 NOI DUNG CHNG TRNH NHAP MON C S D LIEU C S D LIEU QUAN HE

CHUAN HOA C S D LEU PHAN TCH VA THIET KE HE THONG C S D LIEU TAI NGUYEN AT AI C S D LIEU KHONG GIAN Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 74 CHNG 3: CHUAN HOA CSDL MOT SO KHAI NIEM

CAC DANG CHUAN CUA LC O QUAN HE CHUAN HOA LC O CSDL THONG QUA PHEP TACH Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 75 MOT SO KHAI NIEM 1. Lc o c s d lieu: Lc o c s d lieu la mot tap cac quan he con va cac phu thuoc ham lien quan en mot ng dung nao o. Co nhieu cach e lu tr, to chc thong tin oi

vi mot ng dung cu the( co the xay dng mot hoac nhieu quan he e mo ta cung mot noi dung). Do o e quan ly, lu tr thong tin khong b d tha, de dang truy xuat, them, bt th viec chuan hoa cac lc o quan he la rat can thiet. Chuan hoa mot quan he la qua trnh bien oi nhng d lieu cap nhat( them, xoa, sa) gay nen nhng d thng cho quan he thanh cac dang phu hp. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 76 MOT SO KHAI NIEM Tuesday, February 4, 20 20

ThS. L Ngc Lm C S D Liu 77 MOT SO KHAI NIEM 2. Thuoc tnh khoa (primary key) Thuoc tnh khong khoa (nonprimary key) Cho lc o quan he Q (Q+), K Q+ la khoa ch nh cua Q neu: Thuoc tnh AK A la thuoc tnh khoa Thuoc tnh A K A la thuoc tnh khong khoa Tuesday, February 4, 20 20

ThS. L Ngc Lm C S D Liu 78 MOT SO KHAI NIEM 3. Phu thuoc ham ay u (Fully functional dependency) Cho lc o quan he Q vi tap thuoc tnh Q+ X,Y la hai tap con khac nhau cua Q+, Y c goi la phu thuoc ham ay u vao X neu co phu thuoc ham khong hien nhien X Y va Y khong phu thuoc ham vao bat ky tap con nao cua X. Ghi chu: e chng minh mot tap thuoc tnh Y la khong phu thuoc ay u vao tap thuoc tnh X ta can chng minh X Y hoac XY nhng X'X : X'Y

Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 79 MOT SO KHAI NIEM 4. Phu thuoc bac cau cua mot tap thuoc tnh vao mot tap thuoc tnh khac. Cho lc o quan he Q vi tap thuoc tnh Q+ X va Y la hai tap con cua Q+,X Y, ta noi Y phu thuoc bat cau vao tap thuoc tnh X neu ton tai mot tap thuoc tnh A Q+ sao cho X A va A Y nhng A X (A khong xac nh X) Tuesday, February 4, 20 20

ThS. L Ngc Lm C S D Liu 80 CAC DANG CHUAN CUA LC O QUAN HE Quan he c chuan hoa la quan he trong o moi mien cua mot thuoc tnh ch cha nhng gia tr nguyen to (atomic), tc la khong phan nho c na va do o, moi gia tr trong quan he cung la nguyen to. Quan he co cha cac mien gia tr la khong nguyen to goi la quan he khong chuan hoa. Mot quan he c chuan hoa co the thanh mot hoac nhieu quan he chuan hoa khac va khong lam mat mat thong tin. e anh gia chat lng cua lc o quan he

ngi ta a ra cac tieu chuan goi la dang chuan. Lc o c s d lieu dang chuan cang cao th chat lng cang tot. Thong thng khi thiet ke c s d lieu ta co gang a cac quan he ve dang chuan 3 hoac tot hn la dang chuan BC. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 81 Dang chuan 1 1NF (First Normal Form) Mot lc o quan he Q c goi la at dang chuan neu va ch neu toan bo cac mien ( thuoc tnh) co mat trong Q eu ch cha cac gia tr nguyen to( thuoc tnh n) nh ngha tren cho thay bat ky quan he chuan hoa nao cung dang chuan 1NF neu quan he

o khong co thuoc tnh gop. Do o khi mo ta mot bang ch nen gi gia tr n tranh dung cac mien thuoc tnh gia tr kep nh ten bao gom ho va ten. Trong trng hp nay khi mot quan he khong thuoc 1NF ngi ta tach thuoc tnh kep ra thanh cac thuoc tnh n hoac tach quan he ban au ra thanh hai hoac nhieu quan he khac. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 82 Dng chun 1 v d Tuesday, February 4, 20 20

ThS. L Ngc Lm C S D Liu 83 Dang chuan 2 2NF (Second Normal Form) Cho lc o quan he Q vi tap thuoc tnh Q+, Q c goi la at dang chuan 2 neu: Q at dang chuan 1 va Cac thuoc tnh khong khoa phu thuoc ay u vao khoa. Mot bang thuoc dang chuan mot luon co the c tach ra thanh cac bang tng ng thuoc dang chuan hai. V khong co thong tin nao b mat trong viec tach quan he, bat ky thong tin nao co

the suy ra c t cau truc ban au cung co the nhan c t cac quan he con theo cau truc mi. Dang chuan hai cho phep loai tr d tha ve khoa thuoc tnh. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 84 Dang chuan 2 2NF (Second Normal Form) V du: Cho lc o quan he SINHVIEN(MA_SV, MON_HOC, TEN_SV, DIA_CHI, DIEM) , Vi cac phu thuoc ham sau: f1: MA_SV TEN_SV, DIA_CHI f2: MA_SV, MON_HOC DIEM Khoa la MA_SV, MON_HOC Tuesday, February 4, 20

20 ThS. L Ngc Lm C S D Liu 85 Dang chuan 3 3NF (Third Normal Form) Mot lc o quan he c goi la at dang chuan 3 neu: at c dang chuan 2 va Cac thuoc tnh khong khoa khong phu thuoc bac cau vao khoa chnh. V du 1: Cho lc o quan he HOADON(SO_HD, NGAY_LAP, K_HANG, M_HANG, SO_LG, DON_GIA,THANHTIEN) HOADON CHA AT DANG CHUAN 3 Tuesday, February 4, 20 20

ThS. L Ngc Lm C S D Liu 86 DANG CHUAN BC (BOYE CODD) Cho lc o quan he Q vi tap phu thuoc ham F, lc o quan he nay c goi la at dang chuan BC neu vi moi phu thuoc ham f: XY xac nh tren lc o quan he (X (XY la khong hien nhien) th X la mot khoa cua lc o quan he Q. Nh vay mot lc o quan he at c dang chuan BC th ch co phu thuoc ham ma ve trai la khoa. Lc o quan he nay hien nhien at c dang chuan 3.

e chng minh van e tren, gia s rang lc o quan he Q la dang BCNF nhng khong thuoc 3NF. Nh vay se ton tai t nhat mot phu thuoc ham thanh phan hoac phu thuoc ham bat cau. f1: X XY f2: Y YA Trong o X la khoa cua Q, A A X, va A A Y,Y Y,Y X XF( khong ton tai phu thuoc ham nay trong tap phu thuoc ham cua Q) Do o Y khong phai la khoa cua Q, ma Y A F (la mot phu thuoc ham) cho nen vi pham ieu kien cua BCNF. Tuesday, February 4, 20 20 ThS. L Ngc Lm

C S D Liu 87 PHU THUOC A TR Gia s cho R vi cac thuoc tnh A1, A2 , An la mot lc o quan he vi cac tap thuoc tnh X,Y R, ta noi rang X Y (X xac nh a tr Y hay Y phu thuoc a tr vao X) neu cho nhng gia tr X, co mot tap gia tr Y lien quan va tap nay oc lap vi cac thuoc tnh Z = R-X-Y. Tuesday, February 4, 20 20 ThS. L Ngc Lm

C S D Liu 88 Dang chuan 4 4NF (Fourth Normal Form) Dang chuan 4 la dang tong quat cua chuan BCNF e tach cac quan he co phu thuoc a tr. Nh vay mot quan he dang chuan 4 khi va ch khi nhng phu thuoc a tr c s la phu thuoc trong o xac nh mot thuoc tnh tc la neu co phu thuoc a tr th no co dang X A. Mot quan he dang chuan 4 se thuoc dang BCNF va 3NF. v du tren neu tach quan he SINH_VIEN thanh SV_M_HOC vi cac thuoc tnh MA_SV va MON_HOC va quan he SV_T_THAO bao gom cac thuoc tnh MA_SV va THE_THAO th cac quan he mi nay se at dang chuan 4.

Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 89 Chuan hoa lc o quan he thong qua phep tach nh ly: Cho lc o quan he Q vi tap thuoc tnh Q+ phu thuoc ham khong hien nhien f: XY xac nh tren Q. Phep tach Q thanh hai quan he con Q1 (X,Y) va Q2 (Q+\Y) la phep tach bao toan thong tin ngha laQ(Q+) = Q1 Q2 Tuesday, February 4, 20 20

ThS. L Ngc Lm C S D Liu 90 Chuan hoa lc o quan he thong qua phep tach Da vao nh ly tren ta co the chuan hoa lc o quan he thong qua phep tach nh sau: Cho lc o quan he Q(Q+) vi tap thuoc tnh F xac nh tren Q. Thuat toan chuan hoa nh sau: Bc 1: Xac nh tat ca cac phu thuoc ham F sao cho: F:=F \ fF : VT( f) VP( f) = Q+ Q+, trong o (VT: Ve trai, VP: Ve phai) Bc 2: + Neu F = ( khong co PTH) th ket qua la lc o quan he Q va ket thuc: + Neu F th: . Lay mot PTH f: X

X Y trong F (nen lay nhng PTH mang tnh bat cau hoac phu thuoc bo phan hay tng phan vao khoa chnh). . Tach quan he Q thanh hai quan he Q1 va Q2 da vao PTH f Q1 (X,Y) vi tap Pth F1 F1= f/ VT( f) VP( F) XY XY Q2(Q+\ Y) vi tap Pth F2: F2 = f/ VT( f) VP( F) Q+\ Y Y Bc 3: Neu cac quan he con van con cac pth bat cau hoac phu thuoc bo phan hay tng phan th tiep tuc thc hien t bc 1 cho cac quan he o cho en khi khong the tach c na. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 91

NOI DUNG CHNG TRNH NHAP MON C S D LIEU C S D LIEU QUAN HE CHUAN HOA C S D LEU PHAN TCH VA THIET KE HE THONG C S D LIEU TAI NGUYEN AT AI C S D LIEU KHONG GIAN Tuesday, February 4, 20 20

ThS. L Ngc Lm C S D Liu 92 Chng 4 PHAN TCH VA THIET KE HE THONG KHAI NIEM HE THONG HE THONG TIN QUAN LY CAC GIAI OAN PHAN TCH VA THIET KE MOT HE THONG THONG TIN QUAN LY Tuesday, February 4, 20 20

ThS. L Ngc Lm C S D Liu 93 KHAI NIEM HE THONG He thong la mot tap hp cac phan t tng tac c to chc theo mot mo hnh nhat nh nham thc hien mot muc ch nao o. Phan t trong he thong la tap hp cac phng tien vat chat va ke ca nhan lc. Cac phan t nay co the tng tac vi nhau theo mot qui luat nhat nh goi la qui tac hoat ong cua he thong. He thong m: la he thong ma cac phan t trong o co tng tac vi moi trng ben ngoai.

V du ve he thong: cac c quan to chc eu la nhng he thong song va phat trien. Mot he thong thong tin luon la he thong m. Do o ngi thiet ke mot he thong thong tin quan ly phai chu y en kha nang trao oi thong tin vi mot he thong khac. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 94 HE THONG TIN QUAN LY La mot he thong tch hp ngi may tao ra cac thong tin giup con ngi trong san xuat, quan ly va ra quyet nh s dung cac thiet b tin hoc,

phan mem, c s d lieu, cac thu tuc thu cong, cac mo hnh e phan tch va lap ke hoach. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 95 CAU TRUC 1 HE THONG TIN QUAN LY Mot he thong thon tin quan ly bao gom 04 thanh phan c ban: Lnh vc, d lieu, thu tuc x ly(mo hnh) va cac qui tac quan ly. Lnh vc quan ly: La lnh vc hoat ong cua he thong. D lieu: bao gom cong cu va oi tng quan ly, hay noi cach khac, ay la nguyen lieu cua he thong.

Mo hnh: mo ta phng thc van hanh cua he thong. Tuy thuoc vao tng giai oan cua qui trnh phan tch va thiet ke ma co cac mo hnh khac nhau. Moi mo hnh mo ta he thong mot goc o khac nhau. Qui tac quan ly: the hien s ran buoc cua he thong. Cac qui tac nay nham bien oi, x ly d lieu phuc vu theo yeu cau at ra. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 96 CAC GIAI OAN PHAN TCH VA THIET KE HE THONG 1. 2.

3. Phan tch hien trang Xay dng mo hnh Cai at he thong Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 97 PHAN TCH HIEN TRANG Noi dung cong viec trong giai oan nay gan vi the gii thc, hoan toan oc lap vi may tnh. a) Tm hieu hien trang

Phong van ban lanh ao:. Phong van cac v tr lam viec: b) Tong hp Tong hp x ly: Tong hp d lieu: c) Hp thc hoa ay la qua trnh nhan thc he thong thong tin hien hu bi phan tch vien nham am bao xam nhap chnh xac hien trang thong qua cac buoi phong van. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 98

XAY DNG MO HNH ay la giai oan trung gian, Phan tch vien sau khi tm hieu va thu thap nhng d lieu can thiet co lien quan en he thong tien hanh mo hnh hoa lai he thong va co the mo ta hoat ong cua he thong thong qua cac mo hnh nay. Co cac mo hnh nh: - Mo hnh y niem; - Mo hnh thc the ket hp; - Mo hnh quan he; - Mo hnh chc nang. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 99 CAC BC XAY DNG MO HNH

Bc 01: Tao cac thc the va cac ket hp. Bc 02: Chuan hoa cac thc the nham lam thong tin khong b trung lap Bc 03: Giam so chieu cac ket hp. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 100 CAI AT HE THONG ay la giai oan sau cung trong phan tch va thiet ke he thong, giai oan nay gan lien vi may tnh. Giai oan nay ngi thiet ke se chon mot moi trng hay mot phan mem thch hp nham

van dung cau truc cua d lieu a c xac nh. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 101 MO HNH Y NIEM SINHVIEN LOPHOC ANG KY MONHOC Tuesday, February 4, 20

20 DAY ThS. L Ngc Lm C S D Liu GIAOVIEN 102 Ngaysinh Ten MO HNH THC THE KET HP X nghiep Lng So CMND

NGI La CONG CHC SINHVIEN La Thuoc Nhan vien Giam oc Tuesday, February 4, 20 20 H Nong lam ThS. L Ngc Lm

C S D Liu H Can th H Angiang 103 MO HNH QUAN HE Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 104 MO HNH PHAN CAP BAN GIAM OC GIAM OC

P.GIAM OC PHONG BAN KE TOAN TONG TONG HPVAT T KINH DOANH KT.TRNG KT.VIEN TO TIEP TH TO PT.TH TRNG CAN TH LONG XUYEN Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 105

MO HNH CHC NANG Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 106 NOI DUNG CHNG TRNH

NHAP MON C S D LIEU C S D LIEU QUAN HE CHUAN HOA C S D LEU PHAN TCH VA THIET KE HE THONG C S D LIEU TAI NGUYEN AT AI C S D LIEU KHONG GIAN Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 107 Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu

108 Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 109 Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 110 CHNG 5 C S D LIEU TAI NGUYEN AT AI

GII THIEU HE THONG PHAN TCH HE THONG XAY DNG MO HNH CAC HE QUAN TR C S D LIEU - FAMIS - CADDB - VILIS - CILIS Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 111 GII THIEU HE THONG

Nguon tai nguyen at ai c quan ly thong nhat trong ca nc theo nhng nguyen tac va nh chuan nhat nh. Ngoai muc ch phuc vu cho cong tac quan ly Nha nc ve at ai con phuc vu cho cac chuyen nganh khac. oi tng cua he thong rat a dang: bao gom nhieu dang d lieu khac nhau e the hien moi quan he gia ngi s dung at the che phap ly va tha at. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 112 OI TNG CUA HE

THONG oi tng cua he thong c s d lieu tai nguyen at ai bao gom: Tha at, Chu s dung at va cac nguyen tac quan ly, cac nguyen tac nay c the che hoa thanh luat va cac van ban di luat. Thong tin at ai khong giong nh d lieu cac nganh khac ngoai yeu to so lng va s a dang ve cac nguyen tac quan ly no con phai the hien nhng thong tin o di dang o hoa theo v tr a ly nhat nh. Hay noi cach khac d lieu cua nganh a chnh bao gom hai dang: d lieu thuoc tnh(Attribute data) va d lieu khong gian(None attribute Data). D lieu thuoc tnh mo ta tnh chat cua oi tng, nhng tnh chat nay co c co the t chnh ac iem oi tng o hoac t nhng qui tac ap at cho no phuc vu cho cong tac quan ly c chat che hn. D lieu khong gian the hien hnh dang, knh thc va v tr cua oi tng a ly d lieu nay co the dang so (ban o so ) hoac dang giay (ban o giay). Trong cong tac quan ly oi hoi phai lien ket gia d lieu thuoc tnh va d lieu khong gian. Tuesday, February 4, 20

20 ThS. L Ngc Lm C S D Liu 113 Cac thanh phan cau thanh he thong Thong tin ve he thong qui chieu Thong tin ve he toa o, o cao Nha nc Thong tin ve he thong ban o cac loai Thong tin ve cac loai at phan theo loai hnh s dung Thong tin ve quy hoach ke hoach s dung at Thong tin ve chu s dung

Thong tin ve cac d lieu co lien quan Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 114 Mot so net at thu cua he thong Tnh a dang cua d lieu Tnh thong nhat Tnh chnh xac

Khoi lng thong tin ln Nguon d lieu au vao a dang Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 115 Tnh a dang cua d lieu Khac vi cac c s d lieu thong thng, c s d lieu nay khong ch cha cac d lieu thuoc tnh ma con cha ca cac d lieu ban o. Hn na d lieu ban o tng oi a dang c the hien di cac dang: Vector (c quan ly theo toa o), Raster

(c quan ly theo iem anh). Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 116 Tnh thong nhat D lieu a ly oi hoi phai co tnh thong nhat trong khu vc the hien va trong ca nc v no con phai the hien theo v tr (theo toa o ). V the toan bo cac oi tng phai c the hien trong mot he quy chieu thong nhat. He quy chieu nay quyet nh en dang the hien cua cac thong tin a ly.

Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 117 Tnh chnh xac D lieu a ly oi hoi phai co o chnh xac cao ve v tr khong gian phu hp vi ty le hien th (ty le ban o). Mot oi tng khong ch c xac nh bang v tr khong gian ma con phai mang thong tin ve o chnh xac cua oi tng tai v tr o. D lieu a ly se khong co y ngha neu khong am bao o chnh xac.

Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 118 Khoi lng thong tin ln Khoi lng d lieu trong he c s d lieu nay la cc ln. Ngay thi iem ban au he thong a phai quan ly mot khoi lng thong tin khong lo. Trong qua trnh van hanh he thong theo thi gian do tnh chat cua oi tng quan ly nen thong tin se tiep tuc thay oi va c bo sung trong khi nhng thong tin cu van c gi e tiep tuc theo doi s bien ong theo thi gian. V vay c s d lieu nay oi hoi mot cong cu quan tr manh, thiet

b nh va bo x ly vi dung lng va toc o cao. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 119 Nguon d lieu au vao a dang Hien tai nguon d lieu au vao bao gom d lieu thuoc tnh la ho s a chnh va d lieu khong gian chu yeu la he thong ban o rat a dang co the la d lieu tho nh so sach, ban o giay, diamat, hay

d lieu so cac nh dang khac nhau. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 120 HOAT ONG CUA HE THONG Nh a trnh bay tren, nguon d lieu au vao cua he thong la rat a dang c phan thanh hai nhom o la d lieu khong gian va d lieu thuoc tnh. D lieu khong gian c thu thap t o hoa tren ban o so, ban o giay, so lieu o ac mat at, so lieu o ve t anh hang khong va anh ve tinhD

lieu thuoc tnh c thu thap t noi dung cac ban o cu, so sach, ghi chep bang tay, ieu tra khao sat thc a hoac cac so lieu ieu tra c ban hay t cac nganh khac. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 121 MO HNH THU THAP D LIEU AU VAO Tuesday, February 4, 20

20 ThS. L Ngc Lm C S D Liu 122 To d liu Vector t bn giy Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 123 To d liu Vector

t nh v tinh Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 124 Quy trnh xy dng bn s t s liu tr o Th cng Thit b o o in t S o chi tit Chuyn tr o Vo my tnh

S o in t im o Chi tit Bn s CSDL bn Bn gc Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 125 Phn lp t ng Tuesday, February 4, 20 20

ThS. L Ngc Lm C S D Liu 126 Chn im mu Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 127 Phn lp nh Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu

128 X LY D LIEU Cac x ly thong tin bao gom : Lu tr va quan tr d lieu (sap xep, an toan va bao mat): - Cap nhat d lieu (loai bo d lieu khong can thiet, d lieu cu, them vao cac d lieu mi, bien oi d lieu hien co), - Tm thong tin theo mot tieu ch nhat nh, - Thc hien cac bai toan ng dung (v du tm oan ng ngan nhat, thong ke cac oi tng theo mot tieu chuan nao o, hay chon mot loai hnh s dung at hp ly nhat), - Hien th d lieu theo yeu cau cua ngi s dung Tuesday, February 4, 20 20

ThS. L Ngc Lm C S D Liu 129 Cap nhat d lieu Cap nhat d lieu la mot hoat ong rat quan trong cua he thong ac biet la d lieu at ai. Viec thu thap thong tin se c thc hien chu yeu tren may n le cap xa nham giam chi ph phan cng va chi ph quan tr mang. D lieu se c cap nhat chu yeu t ba nguon chnh sau: Nhap trc tiep vao he thong: So lieu c nhap trc tiep vao he thong t ho s a chnh co c qua ang ky at ai ban au. Chep t cung mot dang format vi nhau: Trng hp

nay d lieu a c nhap vao may tnh t cap xa se c tong hp len cap cao hn. Chuyen oi gia cac dang Format khac nhau: Do nhieu nguyen nhan khac nhau nen d lieu se c nhap vao may tnh bang nhieu khuong dang khac nhau nh Excel, Foxpro, AccessKhi a ve tong hp cap cao hn cac nh dang nay se c chuyen oi ve cung kieu. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 130 Duy tr he thong Tiep nhan thong tin ve bien ong at ai t a phng cung nh cac thong tin bien ong cac yeu to

a ly t anh vien tham, ngi quan ly d lieu can tm kiem loai bo nhng thong tin cu, a vao cac thong tin mi hoac bien oi cac thong tin cu theo mot so bien ong mi nham duy tr he thong. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 131 Tach nhap tha ay la bien ong thng xay ra nhat trong quan ly at ai. Trong hoat ong nay thong tin ve tha at trc va sau khi tach hoac gop tha eu phai c ghi nhan lai e theo doi qua trnh

bien ong cua tha at. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 132 Quan ly bien ong Thong tin ve cac bien ong tren tha at la mot trong cac yeu cau quan ly quan trong cua he thong. Cac bien ong bao gom: Bien ong ve chu s dung, bien ong ve muc ch s dung, bien ong ve hang at, loai at. Do yeu cau quan ly khong nhng the hien thong tin at ai tai thi iem hien trang ma con phai the hien ca qua trnh s dung nen thong tin ve tha at, chu s dung se c quan ly theo hien trang va qua kh. Nh vay viec tm kiem thong tin trong qua kh se de dang hn. Tuy nhien ay se phai phan biet c thong tin hien trang va thong tin qua kh v

du mot chu s dung A a chuyen nhng quyen s dung at cho chu s dung B. Ve nguyen tac chu s dung A a thuoc khoi thong tin qua kh nhng anh ta van co quyen s dung mot tha at khac nh vay anh ta van co the thuoc khoi hien trang. Nh vay e kiem tra mot chu s dung thuoc khoi nao se phai tien hanh kiem tra x ly tren toan bo so lieu. Viec kiem tra e a thong tin t khoi hien tai sang khoi qua kh se c thc hien gan nh ong thi tren ca ba oi tng: Tha at, chu s dung va giay chng nhan quyen s dung at. Do o toc o cap nhat bien ong trong trng hp nay kha cham. Thc chat ve mat thuoc tnh cac thong tin trong qua kh khong khac g cac thong tin hien thi. Ch duy nhat giay chng nhan quyen s dung at hien tai tren tha at o co ngay ang ky mi nhat. Do o co the dung thong tin ngay bien ong e phan biet gia qua kh va hien trang. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 133

Thong tin au ra vu cong tac quan ly Nha Nc cua Ch He thong ban o phuc vu quy hoach tong the Cac so lieu thong ke ve hien trang kinh te xa hoi co lien quan en at ai o la nhng ap lc phat trien kinh te xa hoi oi vi at ai. Hoach nh lai a gii hanh chanh khi co s tach nhap cac a phng va cung cap nhng t lieu e x ly, Tuesday,tranh February 4, 20chap ThS. ve L Ngc Lm 134 a gii hanh chanh. 20 C S D Liu

Phuc vu cong tac quan ly at ai cua nganh a chnh Hien trang quan ly cac tha at, chu s dung at, tnh hnh giao at, cho thue, thu hoi va chuyen quyen, chuyen muc ch s dung at, tnh hnh cap giay chng nhan quyen s dung at. Theo gioi tnh hnh thc hien luat at ai theo cac noi dung quan ly Nha nc ve at ai. Thong ke, kiem ke at ai va hien trang s dung at hang nam. Quy hoach ke hoach s dung at. Tuesday, February 4, 20

20 ThS. L Ngc Lm C S D Liu 135 Phuc vu cho cong tac quan ly cac nganh khac He thong ban o a hnh va a chnh rat can thiet cho quy hoach phat trien cua cac nganh, theo doi tien o thc hien va nghien cu tnh kha thi cua cac cong trnh. C s d lieu nen con cung cap cho cac C s d lieu chuyen nganh khac, cho hoat ong cua cac to chc kinh te xa hoi va cac hoat ong san xuat tren a ban lanh tho. Ngoai ra no con cung cap cho cac hoat ong van hoa xa hoi va khoa hoc cong nghe

Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 136 Phuc vu cho nhu cau cua ngi dan Moi ngi dan eu quan tam en nha at ni ho ang sinh song. Ngoai ra thong tin ve nha at con rat can thiet cho nhng ngi co nhu cau thay oi cho , gop phan giup cho th trng bat ong san hoat ong lanh manh.

Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 137 XAY DNG MO HNH Nhiem vu cua nha phan tch thiet ke ngoai viec nam ro nguyen tac hoat ong cua he thong con phai nam bat c nhng rang buoc, yeu cau ma ngi s dung ap at len he thong t o e xay dng mot he thong thong tin hu hieu. Co rat nhieu cong cu the hien c s dung trong qua trnh phan tch va thiet ke he thong. tuy nhien vi he thong n gian khong oi hoi phai s dung tat ca cac cong cu nay. Mot he thong co the c the hien theo nhieu mo hnh khac nhau tuy thuoc vao cach tiep can

he thong o. Sau ay la mot so mo hnh tiep can he thong c s d lieu tai nguyen at ai Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 138 MO HNH Y NIEM Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 139 Mo Hnh Chc Nang

Ten chc nang Mo ta co tnh chat tng thuat cac x ly can thiet D lieu au vao cua chc nang D lieu au ra cua chc nang Cac s kien gay ra s thay oi chc nang Cac kiem tra rang buoc can thiet Tan suat s dung chc nang Tuesday, February 4, 20 20

ThS. L Ngc Lm C S D Liu 140 Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 141 Cac chc nang he thong bao gom: Danh muc n v hanh chanh: Se quan ly n v hanh chanh cac cap t xa phng en cap tnh, thanh pho. Danh muc manh ban o: Quan ly ve cac manh ban o theo n v hanh chanh Danh muc hang at: Quan ly thong tin ve hang at theo vung.

Danh muc loai at: Quan ly thong tin ve loai hnh tho nhng cua cac contuor at. Danh muc muc ch s dung: Quan ly muc ch s dung at theo thong ke at ai. Danh muc oi tng: Quan ly oi tng s dung at(co 6 oi tng). Danh muc tha at: Quan ly cac thong tin co lien quan en tha at. Danh muc chu s dung at: Quan ly cac thong tin ve chu s dung at. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu

142 Chc nang cap nhat d lieu ban au La chc nang cap nhat d lieu cho he thong trong o chu yeu la chc nang cap nhat d lieu t so a chnh se cap nhat hau het cac thong tin ve tha at, chu s dung va oi tng s dung at. Nguon d lieu au vao co the lay t nhieu nguon nh: So a chnh, so muc ke, so da ngoai, hoac t nhng ho s ang ky at ai ban au do o se co nhieu mau nhap lieu khac nhau. Tuesday, February 4, 20 20 ThS. L Ngc Lm

C S D Liu 143 Chc nang cap nhat so lieu bien ong ay la chc nang se c s dung lau dai trong he thong no ton tai theo dong i cua he thong. Cac chc nang cap nhat so lieu bien ong ve oi tng s dung va muc ch s dung se cap nhat cac bien ong ch co lien quan en giay chng nhan quyen s dung at. Cac chc nang cap nhat bien ong co lien quan en tach va gop tha se c s dung khi co cac bien ong ve tha at nh tach gop hoac thay oi hnh dang ve tha at. Chc nang nay co the lam giam hoac phat sinh so lieu mi cho he thong lien quan trc tiep en chu s dung va tha at.

Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 144 Chc nang thong ke tm kiem ay la nhom chc nang khai thac d lieu c phan theo cac oi tng chu yeu nh: chu s dung, tha at, loai at, phan tch phuc vu cac nhu cau quan ly, thong ke bien ong, theo doi lch s va cac thong ke tuy chon khac.

Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 145 NOI DUNG CHNG TRNH NHAP MON C S D LIEU C S D LIEU QUAN HE

CHUAN HOA C S D LEU PHAN TCH VA THIET KE HE THONG C S D LIEU TAI NGUYEN AT AI C S D LIEU KHONG GIAN Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 146 OI TNG CUA HE THONG oi tng cua he thong CSDL khong gian la cac oi tng a ly vi cac ac thu chung. Viec to chc lu tr va quan ly cac oi tng a ly rat khac biet so vi d lieu thuoc tnh a trnh bay

tren. Dang oi tng a ly th khong nhieu nhng viec to chc quan ly no th rat phc tap. oi tng cua CSDL khong gian c mo ta bi hnh anh, v tr lan tnh chat hay thuoc tnh. Do o co the s dung nhieu he quan tr c s d lieu cho viec quan ly CSDL khong gian. Tnh chat o hoa va he toa o the hien hnh dang va v tr cua oi tng co the c quan ly bang cac he quan tr CSDL khong gian nh MAPINFO, ARCINFO, MICROSTATION, ARCVIEW, WINGISd lieu thuoc tnh e mo ta tnh chat cua oi tng co the c quan ly bang cac he quan tr CSDL quan he nh ACCESS, FOXPRO, EXCEL, Mot he quan tr CSDL khong gian c goi la hoan chnh khi am bao c chc nang ket noi gia d lieu o hoa va d lieu thuoc tnh co the t chnh he quan tr CSDL o hoac ket noi vi he quan tr CSDL khac. Cac oi tng a ly bao gom: oi tng dang iem(point), oi tng dang ng (line, polyline) va oi tng dang vung(region). Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu

147 HOAT ONG CUA HE THONG Nhap lieu d lieu Lu tr d lieu Ket xuat d lieu Bien oi d lieu Tng tac vi ngi s dung Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu

148 Nhap lieu d lieu Bao gom cac x ly bien oi d lieu dang bang o, so sach, anh chup(anh ve tinh va anh hang khong) sang dang so tng thch. Hien nay co rat nhieu phan mem co the thc hien tot chc nang nay hoac co the cap nhat trc tiep t nhng thiet b so hoa nh ban so hoa (digitizer), thiet b quet (Scanner). D lieu sau khi nhap vao may tnh se c lu tr tren cac thiet b nh a t, bang t. Viec kiem tra d lieu khi nhap vao may tnh la rat quan trong quyet nh en hoat ong cua he thong ve sau. Tuesday, February 4, 20 20

ThS. L Ngc Lm C S D Liu 149 Lu tr d lieu Lu tr va quan ly c s d lieu a ly co noi dung chnh e cap en phng thc ket noi thong tin ve v tr (topology) vi thong tin thuoc tnh(attribute) cua oi tng a ly. Ca hai thong tin o c cau truc, to chc ket noi e mot mat thuan tien cho cac thao tac trong may tnh va mat khac de hieu oi vi ngi s dung he thong. Tuesday, February 4, 20

20 ThS. L Ngc Lm C S D Liu 150 Ket xuat d lieu Ket xuat d lieu la qua trnh a cac bao cao ket qua phan tch d lieu cho ngi s dung. Qua trnh nay oi hoi phai co s thong nhat gia cac yeu cau cua ngi s dung vi nguon d lieu hien co trong he thong do o oi hoi ngi s dung phai hieu that ky ve he thong. D lieu ket xuat ay co the dang o hoa nh ban o, bieu o, s o hay ban ve hoac dang van ban, bang bieu va c the hien tren man hnh hoac tren giay(in

an) hay tren cac thiet b nh nh bang a t. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 151 Bien oi d lieu Nh a trnh bay, do co nhieu phan mem quan ly nen viec chuyen oi d lieu sang nh dang khac nham co the tng thch c vi he thong mi. Hoac trong cung mot he thong khi can the hien d lieu mot dang khac nh: ty le khac, dang hien th khac, mo hnh khac co the bien oi d lieu cho phu hp. Viec bien oi nay co the c thc hien oc lap tren d lieu khong gian va d lieu thuoc tnh hoac

tong hp ca hai. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 152 Tng tac vi ngi s dung Tng tac vi ngi s dung la mot trong nhng yeu to quan trong cho s tha nhan va s dung bat ky mot he thong thong tin nao. Viec xay dng mot he thong thong tin c thiet ke eu phu thuoc vao muc ch cua ng dung. Do o cac giao dien vi ngi s dung phai tien ch de

hieu de quan sat, t ton thoi gian hoc cach s dung ma van co the van hanh tot he thong. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 153 CAU TRUC VA MO HNH D LIEU BAN O Thong tin ve v tr khong gian (Spatial data): La thong tin c mo ta di dang cau truc d lieu cua cac oi tng o hoa the hien v tr khong gian cua oi tng trong mot he toa o nhat nh. Thong tin ve quan he khong gian (Relational spatial

data hay Topology): Thong tin c mo ta di dang mo hnh d lieu Topology. Mo hnh d lieu Topology the hien quan he khong gian di 3 kieu quan he : + Lien thong vi nhau: The hien di dang ng, iem + Ke nhau: the hien di dang ng bao, ng khep kn: Polygon + Nam trong nhau: the hien trc tiep t toa o cac oi tng o hoa. Thong tin ve thuoc tnh cua oi tng Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 154 oi tng dang iem

(theo mo hnh quan ly cua MicroStation) D lieu khong gian: + Element header: Thong tin chung cho oi tng + Display header: Thong tin chung ve hien th oi tng + Cell name: Ten oi tng + Level: Lp cha oi tng + Min: Toa o thap nhat + Max: Toa o cao nhat + Tran matrix: Ma tran chuyen oi toa o + Origin: V tr at oi tng + MSlink: Ch so lien ket thuoc tnh D lieu thuoc tnh: D lieu thuoc tnh i kem theo oi tng dang iem c lu tr di dang bang theo mo hnh c s d lieu quan he (Relationship Database Model) bao gom cac thuoc tnh sau: + MSlink: Ch so lien ket vi d lieu khong gian + Kieu: e phan loai oi tng dang iem + Ten: ten iem

+ Cac thuoc tnh khac: Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 155 MO HNH LIEN KET Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 156 oi tng dang vung D lieu khong gian;

+ PolygonID: Ch so + Xmin, Ymin: Gii han toa o di + Xmax, Ymax: Gii han toa o tren + Xcentroid, Ycentroid: Toa o iem trong tam + Area: Dien tch + Perimate: Chu vi + nArc: So ng tham gia vao tao ng bao D lieu thuoc tnh: D lieu thuoc tnh i kem theo oi tng dang vung c to chc di dang bang(table) theo mo hnh c s d lieu quan he bao gom cac oi tng sau ay: + Polygon_ID: Ch so lien ket vi d lieu khong gian ong thi cung la ch so vung. + Area: Dien tch + Perimate: Chu vi + Style: Kieu e phan loai oi tng + Cac thuoc tnh khac Tuesday, February 4, 20 20 ThS. L Ngc Lm

C S D Liu 157 MO HNH LIEN KET Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 158 X LY THONG TIN TRONG HE THONG

Thiet lap Topology Loai bo iem d tha Tao ban o chuyen e Hien th nhan Tm kiem oi tng Tnh toan va lng hoa thong tin tren ban o Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 159 Thiet lap Topology Thiet lap, ma hoa cac quan he gia cac iem, cac cung va cac vung e tao nen cac thc the. Trong qua trnh thiet lap Topology mot so bang mi c thiet lap e lu cac iem nut(node) cac cung va cac vung. Cac bc chnh se phai

tien hanh khi thiet lap Topology bao gom: + Sap xep lai d lieu trong tep lu toa o ban o sau cho toa o truc Y tang dan + Loai bo cac iem nut va cac ng d tha + Kien tao bang nut + Kien tao bang cung + Kien tao bang vung Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 160 Loai bo iem d tha Tat ca cac phng phap so hoa ban o eu phat sinh ra nhieu iem, oan thang hn so lng can thiet. So lieu ma may tnh nhan t ban o so hoa la cac toa o iem cua mot lp. Cac lp d lieu c tao ra nh mot day

lien tuc cac iem noi vi nhau tng oi mot. E = (x1, y1), (x2, y2), .(xn, yn) Cac toa o nay phat sinh do ngi s dung nhan chuot mot cach ngau nhien. V vay hai iem lien tiep c phat sinh co the trung nhau, co the cung nam tren mot ng thang hoac co the gan nhau en mc khong can thiet. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 161 Tao ban o chuyen e Ban o chuyen e c s dung e hien th thuoc tnh cua cac oi tng ban o di dang o th, mau sac, bieu

tng theo cac knh c va cac kieu khac nhau tren cac vung cua ban o. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 162 Hien th nhan Ban o la tap hp cac oi tng a ly c sap xep theo lp(Level). Trong qua trnh khai thac he thong co kha nang hien th chong (trung) cac oi tng. Khi ng dung he thong vao viec nghien cu, anh gia, he thong co kha nang hien th nhieu thuoc tnh khac khau cua oi tng. Do o can

tnh toan sap xep v tr at nhan cua cac oi tng sao cho hp ly nhat. Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 163 Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 164 Tuesday, February 4, 20

20 ThS. L Ngc Lm C S D Liu 165 Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 166 Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 167

PHAN LY THUYET MON HOC EN AY LA KET THUC XIN CAM N Tuesday, February 4, 20 20 ThS. L Ngc Lm C S D Liu 168

Recently Viewed Presentations

  • Texture Mapping - Computer Science and Engineering

    Texture Mapping - Computer Science and Engineering

    Anti-aliasing for Texture Mapping. Quality considerations. So far we just mapped one point. ... Calculate (or approximate) the integral of the texture function under this area. Approximate: ... Find level of the mip-map where the area of each mip-map pixel...
  • Introduction to Modeling Fluid Dynamics 1 The UNIVERSITY

    Introduction to Modeling Fluid Dynamics 1 The UNIVERSITY

    * Time Integration Solver gives us time derivative Use it to update the system state U(t+Δt) Ut U(t) * Discetize in Time Use some system such as forward Euler. RK methods are bad because derivatives are expensive Be careful of...
  • CSN11109 - grussell.org

    CSN11109 - grussell.org

    Locard's Exchange Principle. Edmond Locard was the director of the first crime laboratory, located in France. One of the first practitioners of forensic scientific techniques. Locard was instrumental in the development of a criteria for establishing the reliability of fingerprint...
  • Golden Age of Athens - WYNEKEN MIDDLE SCHOOL &quot;ONE LORD, ONE ...

    Golden Age of Athens - WYNEKEN MIDDLE SCHOOL "ONE LORD, ONE ...

    Golden Age of Athens. 7th Grade. 4. 461 B.C. Pericles becomes the leader of Athens and the Greek Golden Age begins. Three goals for Greece: 1.Strengthen Democracy. 2.Expand the Empire. 3. Make Athens Beautiful. He did this by paying citizens...
  • Essential Health &amp; Safety Guidance for Quarries

    Essential Health & Safety Guidance for Quarries

    Danger Zone Control and the Duties of Sentries4. Controlling public rights of way. Many quarries will include public rights of way inside of the danger zone for blasting. Roads, Footpaths, Bridle Ways, Canals etc. Each right of way will require...
  • Training Workshop on Advanced Diagnosis and Surveillance of ...

    Training Workshop on Advanced Diagnosis and Surveillance of ...

    Overview International Standards for Phytosanitary Measures (ISPMs) Other international standards Standards for primary data, biological and physical Standards for records based on specimens, observations, literature citations Data Standards for Pest Records and Lists Dr Ian Naumann, Office of the Chief...
  • Race is Not Neutral: Understanding and Addressing ...

    Race is Not Neutral: Understanding and Addressing ...

    In general, in the area of school climate research has found that a positive school climate is associated with lower rates of misconduct and SCHOOL discipline AND THAT THE USE OF PUNITIVE AND EXCLUSIONARY APPROACHES SEEMS TO LEAD TO POORER...
  • Revolution and Reaction - WordPress.com

    Revolution and Reaction - WordPress.com

    Favored drastic change to extend democracy to all people. ... But Czars were not willing to free the serfs because it would make the nobles angry and they needed the landowners to stay in power. ... Culturally distinct groups resist...