INTRODUCTIONDP SUMMARIESQUERIES International Student College Experience Enhancement Program Team Members Alice Zhang Florence Liao Huan Guo Jake Magner.

Slides:



Advertisements
Similar presentations
Three-Step Database Design
Advertisements

Vistec Semiconductor Sysetms Group 6 Ding Chen Yee Wan Cheung Roya Pakzad Zach Rabinovich Megan Whittey.
ER Modeling Case Studies
Quantitative Review I. Capacity and Constraint Management (Break-Even Analysis)
Review for Final Exam Lecture Week 14. Problems on Functional Dependencies and Normal Forms.
Relational Model (CB Chapter 4) CPSC 356 Database Ellen Walker Hiram College.
Ver 1,12/09/2012Kode :CCs 111,sistem basisdataFASILKOM Chapter 2: Relational Model Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan.
NORMALIZATION. Normalization Normalization: The process of decomposing unsatisfactory "bad" relations by breaking up their attributes into smaller relations.
Data Modeling (CB 12) CPSC 356 Database Ellen Walker Hiram College (Includes figures from Database Systems by Connolly & Begg, © Addison Wesley 2002)
Ch 10, Functional Dependencies and Normal forms
EXAMPLE 1 Find a positive slope Let (x 1, y 1 ) = (–4, 2) = (x 2, y 2 ) = (2, 6). m = y 2 – y 1 x 2 – x 1 6 – 2 2 – (–4) = = = Simplify. Substitute.
The Relational Model System Development Life Cycle Normalisation
IEOR 115: Industrial and Commercial Data Systems University of California, Berkeley UC Berkeley Undergraduate Orientation Database Group 5: Peter Chang.
Intertribal Friendship House Presented by Group 1 Patrick Briaud Yang Liu Milad Odabaei Maria Rodriguez Fernando Siu David Uniman Jennifer Wu John Guo.
Chapter 3: Relational Model
CS405G: Introduction to Database Systems Final Review.
1 Lecture 7: Schema refinement: Normalisation
Data Model Examples USER SPECIFICATIONS.
Relation Decomposition A, A, … A 12n Given a relation R with attributes Create two relations R1 and R2 with attributes B, B, … B 12m C, C, … C 12l Such.
LOGICAL DATABASE DESIGN
Michael F. Price College of Business Chapter 6: Logical database design and the relational model.
EER vs. UML Terminology EER Diagram Entity Type Entity Attribute
1 Web-Enabled Decision Support Systems Entity-Relationship Modeling Prof. Name Position (123) University Name.
Introduction to Linear Regression and Correlation Analysis
Team #6 Bill Cheng Sabina Del RossoStephen Hom Omede Firouz Stacy Hsueh Wei Jiang Thoranis Karnasuta Social Networking Analytics for Calbee (SNAC) CLIENTEER/SCHEMANORMALIZATIONQUERIES.
Relational Model & Relational Algebra. 2 Relational Model u Terminology of relational model. u How tables are used to represent data. u Connection between.
Chapter 10 Functional Dependencies and Normalization for Relational Databases.
CS 405G: Introduction to Database Systems 16. Functional Dependency.
Functional Dependencies
PRESENTED BY TEAM 4: SIMON TIU BROWLY DO MOONSOO CHOI JASON CAI CHRISTINA YOU LORAINE LI KATY NOMURA Nevada Partnership For Homeless Youth.
A Guide to SQL, Eighth Edition Chapter Two Database Design Fundamentals.
Introduction Simplified EER Diagram Rational Schema Relational Design (Access implementation) Normalization Query and SQL implementation Agenda.
CSC 411/511: DBMS Design Dr. Nan Wang 1 Schema Refinement and Normal Forms Chapter 19.
M Taimoor Khan Course Objectives 1) Basic Concepts 2) Tools 3) Database architecture and design 4) Flow of data (DFDs)
Fundamentals of Relational Database Operations
ICOM 5016 – Introduction to Database Systems Lecture 5b Dr. Manuel Rodriguez Department of Electrical and Computer Engineering University of Puerto Rico,
CS370 Spring 2007 CS 370 Database Systems Lecture 4 Introduction to Database Design.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com ICOM 5016 – Introduction.
CSc340 1b1 The Relational Model Chapter 2 Database Schema Keys Schema Diagrams Relational Query Languages Relational Operations.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 2: Intro to Relational.
Announcements Midterm is Nov. 22 (8:15am – 9:45am) Covers until the end of Normalization You answer in the same exam paper Closed-Book, One sheet is allowed.
Chapter 2 Introduction to Relational Model. Example of a Relation attributes (or columns) tuples (or rows) Introduction to Relational Model 2.
Chapter 2: Intro to Relational Model. 2.2 Example of a Relation attributes (or columns) tuples (or rows)
CS 338The Relational Model2-1 The Relational Model Lecture Topics Overview of SQL Underlying relational model Relational database structure SQL DDL and.
Dr. Mohamed Osman Hegaz1 Logical data base design (2) Normalization.
Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 4/1 Copyright © 2004 Please……. No Food Or Drink in the class.
CS 405G: Introduction to Database Systems
Web Based Educational Technology for Secondary Schools December 7, 2007 Team: Will Gordon Sam Toutounchian Willson Deng Sebouh Der Kiureghian Bilal Chaudhry.
Normalization MIS335 Database Systems. Why Normalization? Optimizing database structure Removing duplications Accelerating the instructions Data integrity!
Chapter 5.1 and 5.2 Brian Cobarrubia Database Management Systems II January 31, 2008.
You Can’t Afford to be Late!
DBMS ER model-2 Week 6-7.
Jennifer Widom Relational Databases The Relational Model.
CSCI 6315 Applied Database Systems Review for Midterm Exam I Xiang Lian The University of Texas Rio Grande Valley Edinburg, TX 78539
Group #2 Elliot Chow Quijano Flores Jim Huang David Keegan Sophia Law Elysia Messah Esha Ranganath.
1 CS 430 Database Theory Winter 2005 Lecture 8: Functional Dependencies Second, Third, and Boyce-Codd Normal Forms.
Al-Imam University Girls Education Center Collage of Computer Science 1 nd Semester, 1432/1433H Chapter 10_part2 Functional Dependencies and Normalization.
Functional Dependencies Quiz. Project Relation Attributes project name – pname start date – start budget customer name – cname customer phone – cphone.
TYE GLOBAL COMPETITION BUSINESS PLAN. AGENDA Timeline Student Responsibilities Business Plan Development Guidelines for Business Plan Document Outline.
4NF & MULTIVALUED DEPENDENCY By Kristina Miguel. Review  Superkey – a set of attributes which will uniquely identify each tuple in a relation  Candidate.
Teacher Workshop Database Design Pearson Education © 2014.
Relational Model By Dr.S.Sridhar, Ph.D.(JNUD), RACI(Paris, NICE), RMR(USA), RZFM(Germany)
Quiz Questions Q.1 An entity set that does not have sufficient attributes to form a primary key is a (A) strong entity set. (B) weak entity set. (C) simple.
Payroll Management System
Chapter 2: Intro to Relational Model
Relational Databases The Relational Model.
Relational Databases The Relational Model.
The Relational Model Textbook /7/2018.
Information Systems Development MIS331
Presentation transcript:

INTRODUCTIONDP SUMMARIESQUERIES International Student College Experience Enhancement Program Team Members Alice Zhang Florence Liao Huan Guo Jake Magner Li Shubin Viraj Mohan Zahin Ali NORMALIZATIONFORMS

Project Background To design a database for a website that helps international students with various aspects of “settling in”, by providing a platform for interaction between students, local communities, cultural organizations and employers Project Objective XiYiRen, a start up social utility website will be using a small part of our expansive project, focusing on Chinese students. Client INTRODUCTIONDP SUMMARIESQUERIESNORMALIZATIONFORMS

 Project Background: Objective and Client description  Summary of entities involved  Database capabilities  Simplified EER diagram with 10 entities, 3 Weak entities/relationships, and superclass/subclass division  Project Background: Objective and Client description  Summary of entities involved  Database capabilities  Simplified EER diagram with 10 entities, 3 Weak entities/relationships, and superclass/subclass division DP I Summary Progress INTRODUCTIONDP SUMMARIESQUERIESNORMALIZATIONFORMS

DP II Summary  Revised simplified EER diagram Including more entities and 30 relationships  Implementation of queries in relational algebra  Realized need for more complex queries utilizing IEOR methods: forecasting, optimal event locating, etc.  Revised simplified EER diagram Including more entities and 30 relationships  Implementation of queries in relational algebra  Realized need for more complex queries utilizing IEOR methods: forecasting, optimal event locating, etc. Progress INTRODUCTIONQUERIESNORMALIZATIONFORMSDP SUMMARIES

DP III Summary  Revised simplified EER diagram  Relational schema  Five queries implemented in SQL and Access  Focused on client-centric queries  Revised simplified EER diagram  Relational schema  Five queries implemented in SQL and Access  Focused on client-centric queries Progress INTRODUCTIONQUERIESNORMALIZATIONFORMSDP SUMMARIES

EER INTRODUCTIONQUERIESNORMALIZATIONFORMSDP SUMMARIES

Relational Schema 1.Person(Pid, Fname, Lname, MI, Birth_date, Profile 5 ) 2.Student(Pid 1, Housing 7, University 14, Pickup_Person 3, Flight, Country 11, price_preference, year, sleep, wakeup, study, friends, outgoing) 3.Community_Member(Pid 1, occupation) 4.Alumni(Pid 1, Class, Occupation, Donation_Amount) 5.Profile(Profile_id, Pic, , Phone) 6.Location(Street, City, State, Apt_Suite, Zip, x, y) 7.Housing(Hid, offered_by_person 1, Street 6, Apt_Suite 6, Zip 6, offered_by_org 8, org_profile 5, price, availability_date, furnished, number_rooms, number_bathrooms, water, electice, garbage, gas, internet, move-in special) 8.Organization(OrgName, Profile_id 5, Street 6, Apt_Suite 6, Zip 6, type, description) 9.Department(DepName, University 14 ) 10.Event(EventName, Profile_id 5, Street 6, Apt_Suite 6, Zip 6, description, attendance, date, time) 11.Country(Name, Capital, Population) 12.Language(Name, Countries_spoken_in) 13.Resource(Rid, Owner 1, Price, Quantity) 14.University(Name, student_population, ranking) 15.Donation(Did, Amount, Time, Date, Pid 1 ) INTRODUCTIONQUERIESNORMALIZATIONFORMSDP SUMMARIES

Relational Schema (contd) 16.Mentors(Mentor 1, Mentee 2 ) 17.Student_University(Student 2, University 14 ) 18.Person_in_Org(Person 1, OrgName 8, OrgProfile 5 ) 19.RSVP(Person 1, EventName 10, EventProfile 5, SurveyScore) 20.Student_in_Department(Student 2, DepName 9, UniName 14 ) 21.Person_speaks_language(Person 1, Language 12 ) 22.Housing_near_Uni(Housing 7, UniName 14 ) 23.Organization_University(OrgName 8, OrgProfile 5, UniName 14 ) 24.Org_holds_event(OrgName 8, OrgProfile 5, EventName 10, EventProfile 5 ) 25.Org_speaks_Language(OrgName 8, OrgProfile 5, Language 12 ) 26.Org_Country(OrgName 8, OrgProfile 5, Country 11 ) 27.Dep_sponsors_event(DepName 9, UniName 14, EventName 10, EventProfile 5 ) 28.Event_speaks_language(EventName 10, EventProfile 5, Language 12 ) 29.Event_country(EventName 10, EventProfile 5, Country 11 ) 30.Country_Language(Country 11, Language 12 ) 31.Alumni_Uni(Pid 4, UniName 14, class_of) 32.Alumni_Dept(Pid 4, DepName 9 ) 33.Person_gives_donation(Pid 1, Did 15 ) 34.Rommates(Pid1 1, Pid2 1 ) INTRODUCTIONQUERIESNORMALIZATIONFORMSDP SUMMARIES

Relational Design INTRODUCTIONQUERIESNORMALIZATIONFORMSDP SUMMARIES

Query 1: Roommate Matching Shows all possible roommate combinations ordered by MatchRating. A dorm/off-campus housing facility can use it to pair up students interested in their housing Shows all possible roommate combinations ordered by MatchRating. A dorm/off-campus housing facility can use it to pair up students interested in their housing Description Description of Attributes SleepEarly to late sleep time (Scale of 1-5) WakeupEarly to late (1-5) OutgoingOutgoingness Level (1-5) StudyIn room(1) - Library(5) FriendsHaving friends in room never(1) – always(5) INTRODUCTIONDP SUMMARIESQUERIESNORMALIZATIONFORMS

Query 1: Roommate Matching SELECT P.Fname, P.Lname, Q.Fname, Q.Lname, Min(0.2*(Abs(S.sleep- R.sleep))+0.2*(Abs(S.wakeup-R.wakeup))+0.2*(Abs(S.outgoing- R.outgoing))+0.2*(Abs(S.study-R.study))+0.2*(Abs(S.friends- R.friends))) AS Matchrating FROM Student AS S, Student AS R, Person AS P, Person AS Q WHERE (((S.pid)=[P].[pid]) AND ((Q.pid)=[R].[pid] And (Q.pid)<[P].[pid])) GROUP BY P.Fname, P.Lname, Q.Fname, Q.Lname HAVING (((([P].[Fname]=[Q].[Fname]) And ([P].[Lname]=[Q].[Lname]))=False)) ORDER BY Min(0.2*(20-Abs(S.sleep-R.sleep))+0.2*(20-Abs(S.wakeup- R.wakeup))+0.2*(20-Abs(S.outgoing-R.outgoing))+0.2*(20- Abs(S.study-R.study))+0.2*(20-Abs(S.friends-R.friends))); SELECT P.Fname, P.Lname, Q.Fname, Q.Lname, Min(0.2*(Abs(S.sleep- R.sleep))+0.2*(Abs(S.wakeup-R.wakeup))+0.2*(Abs(S.outgoing- R.outgoing))+0.2*(Abs(S.study-R.study))+0.2*(Abs(S.friends- R.friends))) AS Matchrating FROM Student AS S, Student AS R, Person AS P, Person AS Q WHERE (((S.pid)=[P].[pid]) AND ((Q.pid)=[R].[pid] And (Q.pid)<[P].[pid])) GROUP BY P.Fname, P.Lname, Q.Fname, Q.Lname HAVING (((([P].[Fname]=[Q].[Fname]) And ([P].[Lname]=[Q].[Lname]))=False)) ORDER BY Min(0.2*(20-Abs(S.sleep-R.sleep))+0.2*(20-Abs(S.wakeup- R.wakeup))+0.2*(20-Abs(S.outgoing-R.outgoing))+0.2*(20- Abs(S.study-R.study))+0.2*(20-Abs(S.friends-R.friends))); SQL Code INTRODUCTIONDP SUMMARIESNORMALIZATIONFORMSQUERIES

Query 1: Roommate Matching INTRODUCTIONDP SUMMARIESNORMALIZATIONFORMSQUERIES

Query 2: New Student Forecasting Extracts the data of how many new students come each year which can then be used to forecast the future number of students The year table is a one attribute table containing a list of years Uses regression equation y=ax+b with slope b = (N∑XY - (∑X)(∑Y))/(N∑X2 - (∑X)2), and intercept a = (∑Y - b(∑X))/N. Where N = number of tuples, X =year, and Y = number of students Extracts the data of how many new students come each year which can then be used to forecast the future number of students The year table is a one attribute table containing a list of years Uses regression equation y=ax+b with slope b = (N∑XY - (∑X)(∑Y))/(N∑X2 - (∑X)2), and intercept a = (∑Y - b(∑X))/N. Where N = number of tuples, X =year, and Y = number of students Description SELECT y.year AS [Year], count(s.pid) AS Number_Of_Students, u.name AS University FROM [year] AS y, student AS s, university AS u WHERE s.year=y.year AND s.university=u.name GROUP BY y.year, u.name ORDER BY y.year; SELECT y.year AS [Year], count(s.pid) AS Number_Of_Students, u.name AS University FROM [year] AS y, student AS s, university AS u WHERE s.year=y.year AND s.university=u.name GROUP BY y.year, u.name ORDER BY y.year; SQL Code INTRODUCTIONDP SUMMARIESNORMALIZATIONFORMSQUERIES

Query 3: Event Interest Outputs a list of all events along with their computed attendance rate, the average level of student interest, and a metric combining surveyed interest with actual attendance Organizations throwing events with low attendance but high survey scores may need to look into changing venues or increasing advertising. Outputs a list of all events along with their computed attendance rate, the average level of student interest, and a metric combining surveyed interest with actual attendance Organizations throwing events with low attendance but high survey scores may need to look into changing venues or increasing advertising. Description SELECT e.EventName, e.Attendance/(Count(r.person)) AS Attendance_Rate, Avg(r.SurveyScore) AS Surveyed_Interest, Avg(r.SurveyScore)*e.Attendance/(Count(r.person)) AS Interest_Metric FROM Event AS e, RSVP AS r WHERE (((r.EventProfile)=[e].[Profile_id])) GROUP BY e.EventName, e.Profile_id, e.Attendance ORDER BY Avg(r.SurveyScore)*e.Attendance/(Count(r.person)) DESC; SELECT e.EventName, e.Attendance/(Count(r.person)) AS Attendance_Rate, Avg(r.SurveyScore) AS Surveyed_Interest, Avg(r.SurveyScore)*e.Attendance/(Count(r.person)) AS Interest_Metric FROM Event AS e, RSVP AS r WHERE (((r.EventProfile)=[e].[Profile_id])) GROUP BY e.EventName, e.Profile_id, e.Attendance ORDER BY Avg(r.SurveyScore)*e.Attendance/(Count(r.person)) DESC; SQL Code INTRODUCTIONDP SUMMARIESNORMALIZATIONFORMSQUERIES

Query 3: Event Interest INTRODUCTIONDP SUMMARIESNORMALIZATIONFORMSQUERIES

Query 4: Optimal Event Location Selects optimal potential event location on UC Berkeley campus in relation to attendee housing locations. By utilizing P-Median approach for event location that minimizes total demand weighted distances Assume P = 1 and calculate D ij by utilizing Euclidean distance formula: Selects optimal potential event location on UC Berkeley campus in relation to attendee housing locations. By utilizing P-Median approach for event location that minimizes total demand weighted distances Assume P = 1 and calculate D ij by utilizing Euclidean distance formula: Description INTRODUCTIONDP SUMMARIESNORMALIZATIONFORMSQUERIES

Query 4: Optimal Event Location SELECT e.EventName, l2.street AS Potential_Location, sum(((l.x-l2.x)^2)+((l.y- l2.y)^2)^0.5) AS distance, AVG(s.EventInterest) AS Demand FROM Student AS s, RSVP AS p, Housing AS h, location AS l, location AS l2, Event AS e WHERE s.PID=p.person And p.EventName=e.EventName And s.housing=h.hid And h.street=l.street And h.state=l.state And h.city=l.city And h.apt_suite=l.apt_suite And h.zip=l.zip GROUP BY e.EventName, l2.street ORDER BY e.EventName, sum(((l.x-l2.x)^2)+((l.y-l2.y)^2)^0.5); SELECT e.EventName, l2.street AS Potential_Location, sum(((l.x-l2.x)^2)+((l.y- l2.y)^2)^0.5) AS distance, AVG(s.EventInterest) AS Demand FROM Student AS s, RSVP AS p, Housing AS h, location AS l, location AS l2, Event AS e WHERE s.PID=p.person And p.EventName=e.EventName And s.housing=h.hid And h.street=l.street And h.state=l.state And h.city=l.city And h.apt_suite=l.apt_suite And h.zip=l.zip GROUP BY e.EventName, l2.street ORDER BY e.EventName, sum(((l.x-l2.x)^2)+((l.y-l2.y)^2)^0.5); SQL Code INTRODUCTIONDP SUMMARIESNORMALIZATIONFORMSQUERIES

Query 4: Optimal Event Location INTRODUCTIONDP SUMMARIESNORMALIZATIONFORMSQUERIES

Assumptions: (1)Only take students who arrive at the airport between 8am to 7:59 pm into account (2)Buses leave the airport on the hour. (3)The opportunity cost of each student waiting for a bus for an hour is $10. (4) Each type I bus has a total of 5 seats and each type II bus has a total of 10 seats. (5) We only deal with the arrival hour of each student, (student arriving at 1:01pm is treated the same as a student arriving at 1:59pm in this query implementation. and a ten-seat-vehicle to the airport and back cost $50 and $100, respectively. For date, airport extract # of students arriving in each time interval C i A≤i≤L; C i is interpreted as the number of students arriving at the airport no earlier than (i-1) o’clock but prior to i o’clock Assumptions: (1)Only take students who arrive at the airport between 8am to 7:59 pm into account (2)Buses leave the airport on the hour. (3)The opportunity cost of each student waiting for a bus for an hour is $10. (4) Each type I bus has a total of 5 seats and each type II bus has a total of 10 seats. (5) We only deal with the arrival hour of each student, (student arriving at 1:01pm is treated the same as a student arriving at 1:59pm in this query implementation. and a ten-seat-vehicle to the airport and back cost $50 and $100, respectively. For date, airport extract # of students arriving in each time interval C i A≤i≤L; C i is interpreted as the number of students arriving at the airport no earlier than (i-1) o’clock but prior to i o’clock Description Query 5: Min Airport Pick-up Cost INTRODUCTIONDP SUMMARIESNORMALIZATIONFORMSQUERIES

Query 5: Min Airport Pick-up Cost Formulation Decision variables: tij= 1 if a type j bus is arranged to pick up students at i o’clock. tij = 0 otherwise; (For A≤i≤L, 1≤j≤2) Objective Function (Cost Min.): SELECT s.airport AS Airport, s.arr_date AS Arr_Date, s.flight_arr_hour AS Arr_Time, COUNT(*) AS Number_of_Students FROM student AS s GROUP BY s.flight_arr_hour, s.arr_date, s.airport; SELECT s.airport AS Airport, s.arr_date AS Arr_Date, s.flight_arr_hour AS Arr_Time, COUNT(*) AS Number_of_Students FROM student AS s GROUP BY s.flight_arr_hour, s.arr_date, s.airport; SQL Code INTRODUCTIONDP SUMMARIESNORMALIZATIONFORMSQUERIES Subject to. People_constrain {Z in A,B,C,D,E,F,G,H,I,J,K,L}:

Query 5: Min Airport Pick-up Cost INTRODUCTIONDP SUMMARIESNORMALIZATIONFORMSQUERIES

Normalization Analysis: 1NF R is in 1NF if the domain of an attribute must include only atomic (simple, indivisible) values and that the value of any attribute in a tuple must be a single value from the domain of that attribute. Profile (Profile_id, Pic, s, Phones)  Pic (Profile_id, Pic) (Profile_id, ) Phone (Profile_id, Phone) R is in 1NF if the domain of an attribute must include only atomic (simple, indivisible) values and that the value of any attribute in a tuple must be a single value from the domain of that attribute. Profile (Profile_id, Pic, s, Phones)  Pic (Profile_id, Pic) (Profile_id, ) Phone (Profile_id, Phone) 1NF INTRODUCTIONDP SUMMARIESQUERIESNORMALIZATIONFORMS

Normalization Analysis: 2NF R is in 2NF if R is in 1NF and every nonprime attribute A in R is fully functionally dependent on the primary key of R. Location (Street, City, State, Apt_Suite, Zip, x, y) Assumption: ZIP_CODE determines CITY and STATE.  Location1 (Street, Apt_Suite, Zip, x, y) Zip (Zip, City, State) Organization (OrgName, Profile_id 5, Street 6, Apt_Suite 6, Zip 6, type, description) Assumption: The name of an organization determines its type.  OrgName (OrgName, Type) Organization1 (OrgName, Profile_id 5, Street 6, Apt_Suite 6, Zip 6, description) R is in 2NF if R is in 1NF and every nonprime attribute A in R is fully functionally dependent on the primary key of R. Location (Street, City, State, Apt_Suite, Zip, x, y) Assumption: ZIP_CODE determines CITY and STATE.  Location1 (Street, Apt_Suite, Zip, x, y) Zip (Zip, City, State) Organization (OrgName, Profile_id 5, Street 6, Apt_Suite 6, Zip 6, type, description) Assumption: The name of an organization determines its type.  OrgName (OrgName, Type) Organization1 (OrgName, Profile_id 5, Street 6, Apt_Suite 6, Zip 6, description) 2NF INTRODUCTIONDP SUMMARIESQUERIESFORMSNORMALIZATION

Normalization Analysis: 3NF R is in 3NF if R is in 2NF and no nonprime attribute of R is transitively dependent on the primary key. Housing (Hid, offered_by_person 1, Street 6, Apt_Suite 6, Zip 6, offered_by_org 8, org_profile 5, price, availability_date, furnished, number_rooms, number_bathrooms, water, electricity, garbage, gas, internet, move_in_special, ready_to_move_in) Assumption: For a housing place to be “ready to move in”, it has to have Internet, water, electricity, gas and garbage.  Housing1 (Hid, offered_by_person 1, Street 6, Apt_Suite 6, Zip 6, offered_by_org 8, org_profile 5, price, availability_date, furnished, number_rooms, number_bathrooms, move_in_special, Water, Electricity, Garbage, Gas, Internet) Ready_to_move_in (ready_to_move_in, Water, Electricity, Garbage, Gas, Internet) R is in 3NF if R is in 2NF and no nonprime attribute of R is transitively dependent on the primary key. Housing (Hid, offered_by_person 1, Street 6, Apt_Suite 6, Zip 6, offered_by_org 8, org_profile 5, price, availability_date, furnished, number_rooms, number_bathrooms, water, electricity, garbage, gas, internet, move_in_special, ready_to_move_in) Assumption: For a housing place to be “ready to move in”, it has to have Internet, water, electricity, gas and garbage.  Housing1 (Hid, offered_by_person 1, Street 6, Apt_Suite 6, Zip 6, offered_by_org 8, org_profile 5, price, availability_date, furnished, number_rooms, number_bathrooms, move_in_special, Water, Electricity, Garbage, Gas, Internet) Ready_to_move_in (ready_to_move_in, Water, Electricity, Garbage, Gas, Internet) 3NF INTRODUCTIONDP SUMMARIESQUERIESFORMSNORMALIZATION

Normalization Analysis: BCNF R is in BCNF if whenever a nontrivial functional dependency X  A holds in R, then X is a superkey of R. Student (Pid 1, Housing 7, University 14, Pickup_Person 3, Flight, Country 11, price_preference, year, sleep, wakeup, study, friends, outgoing) R is in BCNF if whenever a nontrivial functional dependency X  A holds in R, then X is a superkey of R. Student (Pid 1, Housing 7, University 14, Pickup_Person 3, Flight, Country 11, price_preference, year, sleep, wakeup, study, friends, outgoing) BCNF INTRODUCTIONDP SUMMARIESQUERIESFORMSNORMALIZATION

INTRODUCTIONDP SUMMARIESQUERIESNORMALIZATIONFORMS Organization Form

Person Form

INTRODUCTIONDP SUMMARIESQUERIESNORMALIZATIONFORMS Student Report

Questions?