Database Design I (In-Class Exercise Answer) IST 210: Organization of Data IST2101.

Slides:



Advertisements
Similar presentations
ER Model For a college DB
Advertisements

Database Design DB Chapter 5 J.G. Zheng June 29th 2005.
Lab Exercise This Week PHP Basics See last Friday’s slides for requirements Make sure you show the final results to TA to get credit 1IST210.
Data Modeling and Entity- Relationship Model II. IST2102 I want a database to maintain departments in my company. Store information about my employees,
1 Class Agenda – 09/20/2011  Answer questions about exam  Evaluate database design homework  Review database design homework for syntax and logic 
Conceptual Design Lecture 3 Database Development.
Database Design (Data Modeling) DCO11310 Database Systems and Design By Rose Chang.
Entity-Relationship Model and Diagrams (continued)
SQL in Access S511. Create Table Schema CREATE TABLE student ( student_id INTEGER NOT NULL, name CHAR(25), major CHAR(10), gpa INTEGER, CONSTRAINT index1.
Chapter 2. The Relational Model (cont.) IST2101. Review: Functional Dependency A relationship between attributes: some attribute(s) determine the value.
Entity PrimaryKey Attribute relationship Cardinality: zero to many Cardinality: one and only one Cardinality: one to many Explanation Entity Relationship.
Case study Lisa’s Bookstore IST210.
Data Modeling and Entity- Relationship Model I IST2101.
COURSE REGISTRATION SYSTEM Case study IST2101. Case Study: Course Registration (1) IST2102 You are helping Penn State create a course registration system.
Entity Relationship Modeling Objectives: To illustrate how relationships between entities are defined and refined. To know how relationships are incorporated.
Chapter 5 1 © Prentice Hall, 2002 Chapter 5: Transforming EER Diagrams into Relations Mapping Regular Entities to Relations 1. Simple attributes: E-R attributes.
Conceptual Design Revision Database Development. Basic constructs of the Entity Relationship Model Entity  Representation of an Entity on an ER diagram.
Data Modelling – ERD Entity Relationship Diagram’s Entity Relationship Diagrams and how to create them. 1.
DATABASE DESIGN I IST 210: Organization of Data IST210 1.
Q1: What is DBMS and explain its architecture. Q2: Explain Data Independence in detail. Q3: What is database user and explain the types of database user.
Database Design II (Case Studies: Step 2) IST 210: Organization of Data IST2101.
© 2004 Ken Baldauf, All rights reserved. Database Systems Organizing Data in a Database Using Database Systems in Organizations Emerging Database Trends.
R ELATIONAL D ATA M ODEL Joe Meehean 1. R ELATIONAL D ATA M ODEL Data stored as a set of relations really just tables Tables related to one another through.
IST 210: ORGANIZATION OF DATA Chapter 1. Getting Started IST210 1.
Normalization Process: Exercise 1: Step 1 IST2101 Step 1. Identify all the candidate keys of the relation. StudentNumber.
Chapter 2. The Relational Model IST2101. Chapter 1 Review Potential problems with Lists – Deletion – Update – Insertion Avoid these problems using a relational.
Database Design – Lecture 5 Conceptual Data Modeling – adding attributes.
IE 423 – Design of Decision Support Systems Data modeling and database development.
Chapter 9: Logical Database Design and the Relational Model (ERD Mapping)
1 Transforming the Data Model into Relations (Tables) and Normalisation Students.
SE305 Database System Technology 23/10/2014 Quiz-2.
Jozef Kuper.  Describe a Database  Entities  Atributes  Relationships.
Chapter 2. The Relational Model (cont.)
THE RELATIONAL MODEL II IST 210: Organization of Data IST210 1.
Database Design – Lecture 4 Conceptual Data Modeling.
Chapter 2. The Relational Model (cont.) IST2101. Review: Determinant vs. Candidate Key IST2102 DeterminantsCandidate Key (StudentID, CourseID) StudentID.
Normalization MIS335 Database Systems. Why Normalization? Optimizing database structure Removing duplications Accelerating the instructions Data integrity!
Assignment 1 Uploaded to course website Due next Tuesday, Sep 1, at 11:59pm.
THE RELATIONAL MODEL I IST 210: Organization of Data IST210 1.
1 ER Modeling BUAD/American University Mapping ER modeling to Relationships.
Functional dependencies and normalization 1 Normalization Functional dependencies NF + BCNF.
More Data Modeling CS 146. Relationship Lower Bounds  Lower bound: minimum number of related instances in a relationship  Value is typically 0 or 1.
1 © Prentice Hall, 2002 ITD1312 Database Principles Chapter 4B: Logical Design for Relational Systems -- Transforming ER Diagrams into Relations Modern.
Database Design. Database Design Process Data Model Requirements Application 1 Database Requirements Application 2 Requirements Application 4 Requirements.
IE 423 – Design of Decision Support Systems Data modeling and database development.
©Silberschatz, Korth and Sudarshan7.1Database System Concepts - 6 th Edition Chapter 7: Entity-Relationship Model.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 7: Entity-Relationship.
Conversion from ER diagram to relational model 1 ER is a visual model The relational model is a matemathical model.
Conceptual Modelling The Entity-Relationship (ER) Model The ER diagram Data Modelling.
Data Modeling and Entity-Relationship Model I
Database Design I IST 210: Organization of Data IST2101.
ERD :: 19 / 1 / Entity-Relationship (ER) Modeling. ER Modeling is a top-down approach to database design. Entity Relationship (ER) Diagram –A.
Information System Design “Student Registration System Example”
Chapter 1. Getting Started IST 210: Organization of Data IST2101.
DATA MODELING AND ENTITY-RELATIONSHIP MODEL II IST 210: Organization of Data IST210 1.
WEB-BASED CASE TOOL for Implementing Database Schemas from ER Diagrams Group P13, Vignesh Lakshmi Rajakumar Eugene Ang Hwai Choon Rajalakshmi Ramachandran.
DATABASE DESIGN II IST 210: Organization of Data IST210 1.
Database Design I (In-Class Exercise Answer) IST 210: Organization of Data IST2101.
MySQL S511.
IST 210: Organization of Data
Chapter 5 STUDENT-COURSE
Entity-Relationship Model and Diagrams (continued)
Entity relationship diagrams
Chapter 2 Modeling Data in the Organization
MySQL.
MySQL S511.
A Very Brief Introduction to Relational Databases
Conceptual modeling of databases
Database 2.
Chapter 3 The Relational Model
Presentation transcript:

Database Design I (In-Class Exercise Answer) IST 210: Organization of Data IST2101

In-class Exercise 1 IST2102 Transform this diagram into tables UserID Name SpotID Location MonthlyCost USER PARKING PARKING(SpotID, Location, MonthlyCost) USER(UserID, Name, , SpotID) PARKING(SpotID, Location, MonthlyCost, UserID) USER(UserID, Name, ) Note: both options are correct, but the first one is preferred because of the minimal cardinality of SpotID is mandatory.

In-class Exercise 2 IST2103 Transform this diagram into tables BUILDING(BuildingName, Address) APARTMENT(BuildingName, ApartmentID, NumberOfBedrooms, NumberofBaths, Rent) Notes: A common mistake is making ApartmentID as the single primary key. (BuildingName, ApartmentID) should be a composite primary key for APARTMENT Another common mistake is to create a duplicate attribute BuildingName in APARTMENT as the foreign key, or forget to make BuildingName as the foreign key

In-class Exercise 3 IST2104 CourseID CourseName Instructor StudentID StudentName COURSE STUDENT Transform this diagram into tables STUDENT(StudentID, StudentName, ) COURSE(CourseID, CourseName, Instructor) REGISTRATION(StudentID, CourseID) Notes: In REGISTRATION table, StudetID and CourseID are both primary key and foreign key.