《数据库de管理.ppt》由会员分享,可在线阅读,更多相关《数据库de管理.ppt(10页珍藏版)》请在三一文库上搜索。
1、Chapter 6,Data Management 數據管理,Data must be carefully control because,To get accurate and meaningful result To protect the computer hardware from being damaged,Sources of error (錯誤來源),Fill in error (填寫錯誤) Transcription error (抄寫錯誤) Input error (輸入錯誤),How to control?,Data verification (數據核對) Data val
2、idation (數據驗證),Data verification (數據核對),Display data to let the user check again and ask for confirm Double check Triple check . For example : Bill Payment System, Ticket Booking System,Data validation (數據驗證),Programmer foresee possible errors and detect them and probably correct them Presence check
3、 - This field must be filled? Range check - Data exceed a limit? Type check - Data type match or not? Consistency check - Strange data appear? Control total - total no. of record correct?,Data validation (數據驗證),Check digit Can be found in ID card, bar codes, ISBN Use formula to check the data is cor
4、rect or not For example : this student ID 1234(0) correct? Formula : Add all digit, Divide the sum by 10, Found the remainder In this case, this is a valid (有效) ID !,Common used checking method,Weighted modulo 11 check Formula : unit digit X 2 tenth digit X 3 hundredth digit X 4 : add all, mod 11, use 11 - the remainder,HK ID. No. Checking,A237637(A),= 122,122 mod 11 = 1,check digit = 11 - 1 = 10,+,+,+,+,+,+,It is valid有效!,HK ID. No. Checking,Z297138(0),= 340,340 mod 11 = 10,check digit = 11 - 10 = 1,+,+,+,+,+,+,It is invalid無效!,