MTE.1 CSE 4701 CSE4701 Midterm Exam Statistics (Spr15) Worry a lot! Notes: Final Exam 120 points MT - range from 40-50%; FE - range from 60-50% Track Performance.

Slides:



Advertisements
Similar presentations
Normalisation.
Advertisements

CHAPTER OBJECTIVE: NORMALIZATION THE SNOWFLAKE SCHEMA.
Data Bits Models Classes & Schemes Rows & Tables Keys Associations $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit.
Relational Normalization Theory. Limitations of E-R Designs Provides a set of guidelines, does not result in a unique database schema Does not provide.
Copyright © 2015 Pearson Education, Inc. Database Design Chapters 17 and
The Relational Model System Development Life Cycle Normalisation
The Database Approach u Emphasizes the integration of data across the organization.
Information Resources Management March 13, Agenda n Administrivia n Normalization n Homework #7 n Mid-Term #2.
Normalization A technique for identifying table structures that have potential maintenance problems.
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
CS263:Revision on Normalisation
1 Functional Dependency and Normalization Informal design guidelines for relation schemas. Functional dependencies. Normal forms. Normalization.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Terms - data,information, file record, table, row, column, transaction, concurrency Concepts - data integrity, data redundancy, Type of databases – single-user,
Department of Computer Science and Engineering, HKUST Slide 1 Finding All the Keys Computationally, finding all the keys can be done by exhaustive search:
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Database Normalization CP3410 Daryle Niedermayer, I.S.P., PMP.
Database Design.  Define a table for each entity  Give the table the same name as the entity  Make the primary key the same as the identifier of the.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Databases From A to Boyce Codd. What is a database? It depends on your point of view. For Manovich, a database is a means of structuring information in.
Week 6 Lecture Normalization
DBSQL 4-1 Copyright © Genetic Computer School 2009 Chapter 4 Database Design.
Relational databases and third normal form As always click on speaker notes under view when executing to get more information!
Improving the Quality of Database Designs (Adapted from David Kroenke, Dabase Processing)
MIS 301 Information Systems in Organizations Dave Salisbury ( )
Databases From A to Boyce Codd. What is a database? It depends on your point of view. For Manovich, a database is a means of structuring information in.
Empl_ID Employee Empl_NameEmpl_Addr Skill. Employee Has Empl_NameEmpl_ID FName MI LName Dependent_Name DOB Gender Dependent.
Normalization (Codd, 1972) Practical Information For Real World Database Design.
Concepts of Relational Databases. Fundamental Concepts Relational data model – A data model representing data in the form of tables Relations – A 2-dimensional.
SALINI SUDESH. Primarily a tool to validate and improve a logical design so that it satisfies certain constraints that avoid unnecessary duplication of.
M Taimoor Khan Course Objectives 1) Basic Concepts 2) Tools 3) Database architecture and design 4) Flow of data (DFDs)
Switch off your Mobiles Phones or Change Profile to Silent Mode.
I Information Systems Technology Ross Malaga 4 "Part I Understanding Information Systems Technology" Copyright © 2005 Prentice Hall, Inc. 4-1 DATABASE.
Natural vs. Generated Keys. Definitions Natural key—a key that occurs in the data, that uniquely identifies rows. AKA candidate key. Generated key—a key.
Chapter 13 Normalization Transparencies. 2 Chapter 13 - Objectives u Purpose of normalization. u Problems associated with redundant data. u Identification.
Customer Order Order Number Date Cust ID Last Name First Name State Amount Tax Rate Product 1 ID Product 1 Description Product 1 Quantity Product 2 ID.
Slide Chapter 5 The Relational Data Model and Relational Database Constraints.
COMP1212 COMP1212 Anomalies and Dependencies Dr. Mabruk Ali.
ITN Table Normalization1 ITN 170 MySQL Database Programming Lecture 3 :Database Analysis and Design (III) Normalization.
Chapter 10 Designing the Files and Databases. SAD/CHAPTER 102 Learning Objectives Discuss the conversion from a logical data model to a physical database.
A337 - Reed Smith1 Structure What is a database? –Table of information Rows are referred to as records Columns are referred to as fields Record identifier.
PMIT-6102 Advanced Database Systems By- Jesmin Akhter Assistant Professor, IIT, Jahangirnagar University.
MTE.1 CSE 4701 CSE4701 Midterm Exam Statistics (Spr15) Worry a lot! Notes: Final Exam 120 points MT - range from 40-50%; FE - range from 60-50% Track Performance.
PMIT-6102 Advanced Database Systems
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 5 (Part c): Logical Database Design and the Relational Model Modern Database Management.
Logical Database Design and the Relational Model.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Normalization Hour1,2 Presented & Modified by Mahmoud Rafeek Alfarra.
Chapter 4, Part A: Logical Database Design and the Relational Model
RELATIONAL TABLE NORMALIZATION. Key Concepts Guidelines for Primary Keys Deletion anomaly Update anomaly Insertion anomaly Functional dependency Transitive.
IT-501 Database Management Systems By- Jesmin Akhter Assistant Professor, IIT, Jahangirnagar University.
Lecture # 17 Chapter # 10 Normalization Database Systems.
Copyright © 2016 Pearson Education, Inc. Modern Database Management 12 th Edition Jeff Hoffer, Ramesh Venkataraman, Heikki Topi CHAPTER 4: PART C LOGICAL.
Database Normalization. What is Normalization Normalization allows us to organize data so that it: Normalization allows us to organize data so that it:
Problem 1a - Relational Algebra (Spr15)
CSE4701 Midterm Exam Statistics (Fall16)
Normalization Karolina muszyńska
Database Normalization
Normalization DBS201.
Chapter 4 Relational Databases
Payroll Management System
CSE255 Midterm Exam Statistics (Fa07)
Example Question–Is this relation Well Structured? Student
Prof. Steven A. Demurjian, Sr.
MAT 510 Education for Service-- snaptutorial.com.
MAT 510 Teaching Effectively-- snaptutorial.com
Cse 344 May 14th – Entities.
Cse 344 May 11th – Entities.
Customer Order Entry Database Version: 1.1 by: R. Holowczak
Database Design Chapters 17 and 18.
Normalization DBS201.
Presentation transcript:

MTE.1 CSE 4701 CSE4701 Midterm Exam Statistics (Spr15) Worry a lot! Notes: Final Exam 120 points MT - range from 40-50%; FE - range from 60-50% Track Performance from MT to Final Exam Differential from MT to Final If Increase - Weighted Average If Stay Same - that is your Performance If Decrease - that is your Performance

MTE.2 CSE 4701 CSE4701 Homeworks Fa15

MTE.3 CSE 4701 CSE4701 Grade Guesstimates (Spr15) Notes: All Subject to Change Used 10%HW, 40%P, 50% From Intro Overheads Must Pass Both Projects And Exams to PASS!!!

MTE.4 CSE 4701 Problem 1a - Relational Algebra (Spr15)  List the name and address of all vendors that provide both hardware and software. BOTHV =  HVendorID,SVendorID (  HWFlag=T and SWFlag=T ( Vendor )) ANS =  HVName, HVAddr ( HardwareVendor * BOTHV ) HVendorID   SVName, SVAddr ( SardwareVendor * BOTHV ) SVendorID

MTE.5 CSE 4701 Problem 1b - Relational Algebra (Spr15)   List the versions and vendor names of all C++ software installed on computers made by the vendor DEC. COMPV =  VendorID,CInventNum (Computer * Inventory) CInventNum=InventNum HWVEND =  HVendorID,CInventNum (COMPV * Vendor) VendorID DEC =  CInventNum (  HVName=DEC (HWVEND * HardwareVendors)) HVendorID DECSW =  SInventNum (DEC * InstalledSW) CInventNum DEC++SW =  SVendorID,SWVersion (  SWName=C++ DECSW * Software) SInventNum ANS =  SWName,SWVersion (DEC++SW * SoftwareVendor) SVendorID

MTE.6 CSE 4701 Problem 1c - Relational Algebra (Spr15)   List all purchase orders from the vendor Dell that have been ordered but not delivered. DELL =  VendorID (  HVName=DELL (Vendor * HardwareVendors)) HVendorID ANS =  PONumber, PODate, POCost (  DeliveredDate=Null DELL * Inventory) VendorID

MTE.7 CSE 4701 Problem 2 - ER Specialization (Spr15)  Each Specialization was worth 5 pts – deductions for  Not indicating Total  Not supplying attributes  Most Popular Answers:  Disjoint: Inventory with Computer, Accessory, and Software as Children  Overlap Vendor with HWVendor and SWVendor as Children  Union: DeployedPC Computer Accessory Software u 1 1 m m

MTE.8 CSE 4701 Problem 3- Functional Dependencies (Spr15) CInventNum  ComputerName, ComputerType CInventNum, AccID  ComputerName, ComputerType SVendorID  SVName, SVAddr SVendorID, SVName, SWName, SWVersion  SWDesc, SWAddr SVendorID   SWName (first two basically equivalent) SVName   SWName SWName   SWVersion Computer( CInventNum, ComputerName, ComputerType, AccID); Inventory( InvenNum, SerialNum, PONum, PODate, DeliveredDate, POCost, VendorID); SoftwareVendor (SVendorID, SVName, SVAddr, SWName, SWVersion, SWDesc); PONum  InventNum, SerialNum, PODate, DeliveredDate, etc. InventoryNum  SerialNum (or some other one not involving PO)

MTE.9 CSE 4701 Prob 4 – Relational Schema Analysis (Spr15) Insert - For a new computer, you must always insert an accessory (since it is part of the key). If there are N accessories, there are N rows for each computer. Update – if you change the Name or Type, you must change all N tuples. Delete - No obvious delete anomalies. Conclusion: Computer represents two different entities (Guideline 1) – the computer and its accessories, and as a result, violates Guideline 2 in regards to insert anomalies. A better design would separate accessories in a similar manner to the Installed Software table. Computer( CInventNum, ComputerName, ComputerType, AccID); Accessory( AccID, AInventNum, HVendorID, AccName, AccType, AccSize); From an inventory control perspective, there is no way to track the total number of each accessory that has been purchased. You may have 10 USB 120 Gig external hard drives, and each one would have its own AccID and AIventNum. The other problem is related to Guideline 3 due to null values for AccSize (limited problem). Insert, Delete, and Update: No obvious anomalies. Conclusion: The table is OK – but it could be improved by separating out the different types of accessories (that have been purchased). It may also make sense not to track this at all in their gory detail – many companies (UConn included) don’t track equipment that is less than $1000, and many of these fit into that category.

MTE.10 CSE 4701 Prob 4 – Relational Schema Analysis (Spr15) The only real problem in this table is that SVendorID, SWName, and SWVersion are foreign keys into the SoftwareVentor table, and as a result, this information is replicated in both tables. Conclusion: There may be a better way to design the Software, Installed Software, and SoftwareVendor tables, particularly in regards to reducing the key size (and hence the foreign key linkages). Software( SInventNum, SVendorID, SWName, SWVersion); Inventory(InvenNum, SerialNum, PONum, PODate, DeliveredDate, POCost, VendorID); This table suffers violates two guidelines: Guideline 1 in regards to representing two different entities (inventory and purchase orders), and Guideline 3 in regard to an excessive amount of null values. Insert, Delete, and Update: No obvious anomalies. Conclusion: Split into two different tables: Inventory (InvenNum, SerialNum, PONum) and PurchaseOrder (PONum, PODate, DeliveredDate, POCost, VendorID) which will address Guideline 1 and will not result in a Inventory tuple until the item is actually received. DeliveredDate will still be null for all outstanding orders.

MTE.11 CSE 4701 Prob 4 – Relational Schema Analysis (Spr15) InstalledSoftware is dealing with two foreign key references to the Computer and Software tables, respectively. Vendor is allowing us to unify the different ID tracking systems for software and hardware vendors. The only problem with Vendor is that there are potentially null values for companies that sell either hardware or software but not both. You could argue that the flags are not needed in Vendor as well, since the null values (or not-null) has this information. Conclusion: In the case of Vendor (and VendorID, SVendorID, HVendorID), this may be a poor design and if the database has not been deployed, it may make sense to totally redesign this identifier to have a single identifier. This would allow the Vendor table to be eliminated. This would separate vendor common information into a single Vendor (VendorID, VName, VAddr). This would eliminate the null value (Guideline 3) problem of Vendor. Thus, changes to Vendor would impact both the HardwareVendor and SoftwareVendor Tables. InstalledSoftware( CInventNum, SWInventNum); Vendor( VendorID, HWFlag, HWVendorID, SWFlag, SWVendorID);

MTE.12 CSE 4701 Prob 4 – Relational Schema Analysis (Spr15) HardwareVendor ( HVendorID, HVName, HVAddr, ModelNum, ModelName, ModelDescr); SoftwareVendor (SVendorID, SVName, SVAddr, SWName, SWVersion, SWDesc); Both tables have insert anomalies (can’t insert HWV or SWV without inserting a product), delete anomalies (if you delete the last item for a vendor you delete the vendor), and update anomalies (if you change an address, or a name – buyout, you need to change multiple tuples) – Guideline 2 is a real issue in this regard. Both tables are representing two different entities: the contact information for a vendor (id, name, and address) and the vendors products – violating Guideline 1 for having a relation only represent a single entity. As a result, the keys are convoluted – you need to have a ModelNum for HardwareVendors and a compound key for SoftwareVendors; this makes the foreign key references more complicated. Conclusion: As mentioned, redesign the tables Vendor, HWVendor, and SWVendor to pull out their commonalities and unify the identifier. Use Vendor as defined on the previous slide, use VendorID in the HWVendor and SWVendor tables while dropping Name and Addr from those tables.

MTE.13 CSE 4701 Problem 5- Normalization (Spr15) FULL A. {OrderID, ProductID}  OrderedQuantity PART B. OrderID  {OrderDate, CustID, CustName, CustAddr} TRANS C. CustID  {CustName, CustAddr} PART D. ProdID  {ProdDesc, UnitPrice} INVOICE( OrderID, OrderDate, CustID, CustName, CustAddr, ProdID, ProdDesc, UnitPrice, OrderedQuantity) Remove Partial Dependencies ORDER_LINE( OrderID, ProdID, OrderedQuantity) PRODUCT(ProdID, ProdDesc, UnitPrice) CUST_ORDER( OrderID, OrderDate, CustID, CustName, CustAddr) Remove Transitive Dependency in CUST_ORDER ORDER_LINE( OrderID, ProdID, OrderedQuantity) PRODUCT(ProdID, ProdDesc, UnitPrice) ORDER( OrderID, OrderDate, CustID) CUSTOMER( CustID, CustName, CustAddr)