西安电子科技大学:《数据库系统 DataBase System》课程教学资源(PPT课件讲稿)normalization

DataBase System Part2 normalization iNtroduction ce Functional Dependencies e Normal forms G Lossless decompositions Additional Design Considerations Haichang Gao, Software School, Xidian University 3
DataBase System Haichang Gao , Software School , Xidian University 3 Introduction Functional Dependencies Normal Forms Lossless Decompositions Additional Design Considerations Part2 normalization

DataBase System Introduction Normalization(规范化) is another approach to logical design of a relational database. g E-R approach and normalization approach reinforce each other g Normalization starts with a real-world situation to be modeled and lists the data items that are candidates to become column names in relational tables, together with a list of rules about the relatedness of these data items g The aim is to represent all these data items as attributes of tables that obey restrictive conditions associated with what we call normal forms(范式 E INF-->2NF-->3NF-->BCNF-->4NF--> 5NF Haichang Gao, Software School, Xidian University
DataBase System Haichang Gao , Software School , Xidian University 4 Normalization (规范化) is another approach to logical design of a relational database. E-R approach and normalization approach reinforce each other. Normalization starts with a real-world situation to be modeled and lists the data items that are candidates to become column names in relational tables, together with a list of rules about the relatedness of these data items. The aim is to represent all these data items as attributes of tables that obey restrictive conditions associated with what we call normal forms (范式). 1NF --> 2NF --> 3NF --> BCNF --> 4NF --> 5NF Introduction

DataBase System KL Design of the Bank Database brrandl-cifu branch=(branch name, branch city, assets) customer=(customer id, customer name, customer street, customer city) loan=(loan number, amount) account =(account number, balance) employee=(employee id. employee name, telephone number, start date) dependent name =(employee id, dname) account branch=(account number, branch name) borrower loan branch=(loan number, branch name) borrower =(customer id, lo omn ubel depositor =(customer id, account number) frou muler cust banker=(customer id, employee id, type works for =(worker employee id, manager employee id) linGer works fo payment=(loan number, payment number, payment date, payment amount savings account =(account number, interest rate checking account=(account number, interest-ra overdraft_amound) overdraft amount) Haichang Gao, Software School, Xidian University
DataBase System Haichang Gao , Software School , Xidian University 5 Design of the Bank Database branch = (branch_name, branch_city, assets) customer = (customer_id, customer_name, customer_street, customer_city) loan = (loan_number, amount) account = (account_number, balance) employee = (employee_id. employee_name, telephone_number, start_date) dependent_name = (employee_id, dname) account_branch = (account_number, branch_name) loan_branch = (loan_number, branch_name) borrower = (customer_id, loan_number) depositor = (customer_id, account_number) cust_banker = (customer_id, employee_id, type) works_for = (worker_employee_id, manager_employee_id) payment = (loan_number, payment_number, payment_date, payment_amount) savings_account = (account_number, interest_rate) checking_account = (account_number, overdraft_amount)

DataBase System es Design of the Bank Database G Suppose we combine borrow and loan to get H Schema: bor loan=(customer id, loan number, amount) A nstance. LIcun umber amount 23-652 L-Ioo L-100 1000D L-100 23-521 L-100 borrower 23-652 L-10 100o 15-202 L-I0D LODDO 23-521 L-1u0 tor lorn H Result is possible repetition of information CuStomer borrower loan H For borrower is M: N relationship Haichang Gao, Software School, Xidian University 6
DataBase System Haichang Gao , Software School , Xidian University 6 Design of the Bank Database Suppose we combine borrow and loan to get Schema: bor_loan = (customer_id, loan_number, amount ) Instance: Result is possible repetition of information For borrower is M:N relationship

DataBase System Design of the Bank Database Consider combining loan branch and loan E Schema: loan amt br=(loan number, amount, branch name) A nstance. Mn amber L100 1000 L-100 Springfield Iox lorn finch fon ranlu'r lomi branc L-100 10000 Sp pringfield oNt_mtbr loan -number A No repetition H For loan branch is I:N relationship borrower Haichang Gao, Software School, Xidian University
DataBase System Haichang Gao , Software School , Xidian University 7 Design of the Bank Database Consider combining loan_branch and loan Schema: loan_amt_br = (loan_number, amount, branch_name) Instance: No repetition For loan_branch is 1:N relationship

DataBase System Design of the Bank Database Example( decompose,分解): emiplouce id employee_ nanze telepone number start- date 123456789Kim 882-000 19844329 987654321kim 869.9999 1981-01-16 maplovee id llemiplowee-naa mplowermame elephone number start date 123-456789Kim 882-00O 1s4B-29 987654321Kim 869-9999 191-01-16 emplovee_ii employe name teleplone number start _date 123456789Kim 882.0000 198403-29 12345-6789Kim 869999 1981-01-1 5-432K 98765-4321Kim 869-55 1981-01-16 H we cannot reconstruct the original employee relation Haichang Gao, Software School, Xidian University 8
DataBase System Haichang Gao , Software School , Xidian University 8 Design of the Bank Database Example (decompose, 分解) : we cannot reconstruct the original employee relation

DataBase System Design of the Bank Database e com bining loan branch and loan into H Schema: loan amt br=(loan number, amount, branch name) Isa“good” relation schema ce combine borrow and loan to get H Schema: bor loan=(customer id, loan number, amount) H Is nOT a"good ' relation schema G Decide whether a particular relation R is in"good""or NOT? G Suppose we had started with bor loan. How would we know to split up decompose, b #)it into borrower and loan? c Normalization theory is the tools used to solve those questions. Haichang Gao, Software School, Xidian University
DataBase System Haichang Gao , Software School , Xidian University 9 Design of the Bank Database combining loan_branch and loan into Schema: loan_amt_br = (loan_number, amount, branch_name) Is a “good” relation schema combine borrow and loan to get Schema: bor_loan = (customer_id, loan_number, amount ) Is NOT a “good” relation schema Decide whether a particular relation R is in “good” or NOT? Suppose we had started with bor_loan. How would we know to split up (decompose, 分解) it into borrower and loan? Normalization theory is the tools used to solve those questions

DataBase System CA Running Example G Employee Information: emp_id emp name emp_phone dept name dept_phone dept_mgrname skill id skill_name From one up to a large skill date number of skills useful to the company skill lvI Haichang Gao, Software School, Xidian University 10
DataBase System Haichang Gao , Software School , Xidian University 10 Employee Information: A Running Example From one up to a large number of skills useful to the company

DataBase System CA Running Example G Employee Information: emp_info emp_ id emp_name∴ skill_id skill_name skill. date skill_1v1 09112 Jones 44 librarian 03-15-99 09112 Jones 26 PC-admin 06-30-98 10 09112 Jones 89 word-proc 01-1500 12 12231 Smith 26 PC-admin 04-1599 12231 Smith 39 bookkeeping 07-30-97 13597 Brown 7 statistics 09-1599 5769 14131 Blake 26 PC-admin 05-30- 14131 Blake word-proc09-30-99 10 , Haichang Gao, Software School, Xidian University 11
DataBase System Haichang Gao , Software School , Xidian University 11 Employee Information: A Running Example

DataBase System CE Anomalies of a Bad Database design emp info emp_id emp_name skill_idski11_name skill_ date skill_lvl 09112 Jones 44 librarian 03-15-99 12 09112 26 PC-admin 06-30-98 10 09112 ones 89 WOrd-Droc 01-15-00 12 12231 Smith 26 PC-admin 0415-99 12231 Smith 39 bookkeeping 07-30-97 576 13597Brown 27 statistIcs 09-15-99 14131Blake 26 PC-admin 05-30-98 14131 Blake 89 word-proc 0930-99 10 Update Anomaly(修改异常) aa table T is subject to an update anomaly when changing a single attribute value for an entity instance or relationship instance represented in the table may require that several rows of t be updated Haichang Gao, Software School, Xidian University 12
DataBase System Haichang Gao , Software School , Xidian University 12 Update Anomaly (修改异常) A table T is subject to an update anomaly when changing a single attribute value for an entity instance or relationship instance represented in the table may require that several rows of T be updated. Anomalies of a Bad Database Design
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 《单片机原理及应用》课程教学资源(PPT课件讲稿)第11章 单片机应用系统的串行扩展.ppt
- 中国科学技术大学:《计算机体系结构》课程教学资源(PPT课件讲稿)第7章 多处理器及线程级并行 7.1 引言 7.2 集中式共享存储器体系结构.pptx
- 上海交通大学:操作系统安全(PPT课件讲稿)设备管理与I/O系统.pps
- 《编辑原理》课程教学资源(PPT课件)目标代码生成.pptx
- 四川大学:Object-Oriented Design and Programming(Java,PPT课件)3.2 Graphical User Interface.ppt
- 《计算机系统结构》课程教学资源(PPT课件讲稿)第三章 流水线技术.ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)异常处理 Exception Handling.ppt
- 中国科学技术大学:云计算基本概念、关键技术、应用领域及发展趋势.pptx
- 《C程序设计》课程电子教案(PPT课件讲稿)第二章 基本数据类型及运算.ppt
- 《电子商务概论》课程教学资源(PPT课件)第十章 电子商务安全技术.ppt
- 中国铁道出版社:《局域网技术与组网工程》课程教学资源(PPT课件讲稿)第4章 Windows Server系统工程.ppt
- 《Internet技术与应用》课程PPT教学课件(讲稿)第3讲 双绞线制作和传输介质.ppt
- jQuery个人主页(PPT讲稿).ppt
- 《数据结构》课程教学资源(PPT课件讲稿)第10章 内排序.ppt
- 最小生成树(PPT课件讲稿)Minimum Spanning Trees.pptx
- 中国科学技术大学:《数据结构与数据库》课程教学资源(PPT课件讲稿)第五章 串和数组.pps
- 上海交通大学:《网络科学导论》课程PPT教学课件(Network Science An Introduction)Chapter 4 Degree Correlations & Community Structure.pptx
- 同济大学:《大数据分析与数据挖掘 Big Data Analysis and Mining》课程教学资源(PPT课件讲稿)Decision Tree.ppt
- 《软件工程》课程教学资源(PPT课件讲稿)详细设计.ppt
- 《汇编语言程序设计》课程教学资源(PPT课件讲稿)第二章 IBM-PC微机的功能结构.ppt
- 《计算机软件技术基础》课程教学资源(PPT课件讲稿)排序(教师:曾晓东).ppt
- 四川大学:《计算机网络 Computer Networks》课程教学资源(PPT课件讲稿)Unit5 Introduction to Computer Networks.ppt
- 《微型计算机原理及接口技术》课程电子教案(PPT课件)第9章 AT89S52单片机的I/O扩展.ppt
- 《数据挖掘导论 Introduction to Data Mining》课程教学资源(PPT课件讲稿)Data Mining Classification(Basic Concepts, Decision Trees, and Model Evaluation).ppt
- 《计算机组成与设计》课程教学资源(PPT课件讲稿)第2章 指令——计算机的语言.ppt
- 清华大学:Local Area Network and Ethernet(PPT课件讲稿).pptx
- 《密码学》课程教学资源(PPT课件讲稿)第10章 密码学的新方向.ppt
- 《计算机系统安全》课程教学资源(PPT课件讲稿)第七章 公开密钥设施PKI Public key infrastructure.ppt
- 《数字图像处理》课程PPT教学课件(讲稿)第四章 点运算.ppt
- 《编译原理》课程教学资源(PPT课件讲稿)第八章 代码生成.ppt
- Introduction to Convolution Neural Networks(CNN)and systems.pptx
- 华北科技学院:数字视频教学软件与制作(PPT课件讲稿)数字视频编辑软件Premiere 6.5(主讲:于文华).ppt
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(PPT课件讲稿)文件系统.ppt
- 哈尔滨工业大学:再探深度学习词向量表示(PPT课件讲稿)Advanced word vector representations(主讲人:李泽魁).ppt
- 《Visual Basic程序设计》课程教学资源(PPT课件讲稿)第四章 VB的基本语句.pps
- 《单片机原理及应用》课程PPT教学课件(C语言版)第4章 C51程序设计入门(单片机C语言及程序设计).ppt
- 西安培华学院:《微机原理》课程教学资源(PPT课件讲稿)第一章 绪论.ppt
- 《数据结构与算法》课程教学资源(PPT课件讲稿)第三章 树 3.1 树的有关定义.ppt
- 《计算机网络》课程教学资源(考试大纲)计算机网络考试大纲.doc
- 西安电子科技大学:《Mobile Programming》课程PPT教学课件(Android Programming)Lecture 2 Intro to Java Programming.pptx