Assignment 1 Uploaded to course website Due next Tuesday, Sep 1, at 11:59pm.

Slides:



Advertisements
Similar presentations
Programming Skill Survey DO IT NOW. Assignment 1 Uploaded to course website Due next Tuesday, Jan 21, at 11:59pm.
Advertisements

Welcome to IST 210: Organization of Data
Basic SQL Introduction Presented by: Madhuri Bhogadi.
1 Class Agenda (04/03 and 04/08)  Review and discuss HW #8 answers  Present normalization process Enhance conceptual knowledge of database design. Improve.
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.
Database table design Single table vs. multiple tables Sen Zhang.
CSCI 260 Database Applications Chapter 1 – Getting Started.
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
CSCI 150 Database Applications Chapter 1 – Getting Started.
Getting Started (Excerpts) Chapter One DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
View Sen Zhang. Views are very common in business systems users view of data is simplified a form of security - user sees only the data he/she needs to.
Chapter 4: Database Management. Databases Before the Use of Computers Data kept in books, ledgers, card files, folders, and file cabinets Long response.
Chapter 2. The Relational Model (cont.) IST2101. Review: Functional Dependency A relationship between attributes: some attribute(s) determine the value.
Getting Started Chapter One DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 5 th Edition.
Getting Started Chapter One DATABASE CONCEPTS, 7th Edition
Why Databases.
Information systems and databases Database information systems Read the textbook: Chapter 2: Information systems and databases FOR MORE INFO...
Page 1 ISMT E-120 Introduction to Microsoft Access & Relational Databases The Influence of Software and Hardware Technologies on Business Productivity.
N. J. Taylor Database Management Systems (DBMS) 1.
Page 1 ISMT E-120 Desktop Applications for Managers Introduction to Microsoft Access.
Getting Started Chapter One DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 6 th Edition.
Introduction –All information systems create, read, update and delete data. This data is stored in files and databases. Files are collections of similar.
CSC100 Databases Marni Ferner. A Few Well-Known Examples Itunes & Ipods Amazon.com Ebay LL Bean Wal-Mart.
Introduction to Accounting Information Systems
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
1 Class Agenda (11/07 and 11/12)  Review HW #8 answers  Present normalization process Enhance conceptual knowledge of database design. Improve practical.
Introduction to SQL Steve Perry
SQL Review Tonga Institute of Higher Education. SQL Introduction SQL (Structured Query Language) a language that allows a developer to work with data.
Component 4/Unit 6f Topic VI: Create simple querying statements for the database The SELECT statement Clauses Functions Joins Subqueries Data manipulation.
Lecture 2 An Overview of Relational Database IST 318 – DB Admin.
IE 423 – Design of Decision Support Systems Database development – Relationships and Queries.
Normalization (Codd, 1972) Practical Information For Real World Database Design.
IST 210: ORGANIZATION OF DATA Chapter 1. Getting Started IST210 1.
Instructor: Dema Alorini Database Fundamentals IS 422 Section: 7|1.
Dimu' Rumpak © 2009 by Prentice Hall 1 Getting Started Didimus Rumpak, M.Si. Database Concepts Chapter 1 1.
Chapter 2. The Relational Model IST2101. Chapter 1 Review Potential problems with Lists – Deletion – Update – Insertion Avoid these problems using a relational.
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
Getting Started Chapter One DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
CpSc 3220 The Language of SQL The Language of SQL Chapters
1 Introduction to Oracle Chapter 1. 2 Before Databases Information was kept in files: Each field describes one piece of information about student Fields.
1 Database Systems Introduction to Microsoft Access Part 2.
Chapter 2. The Relational Model (cont.)
Getting Started Chapter One DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 4 th Edition.
In this session, you will learn to: Describe data redundancy Describe the first, second, and third normal forms Describe the Boyce-Codd Normal Form Appreciate.
Database Management Supplement 1. 2 I. The Hierarchy of Data Database File (Entity, Table) Record (info for a specific entity, Row) Field (Attribute,
ITEC 3220A Using and Designing Database Systems Instructor: Prof. Z. Yang Course Website: 3220a.htm
BSA206 Database Management Systems Lecture 2: Introduction to Oracle / Overview of Database Concepts.
1 2 Concepts of Database Management, 4 th Edition, Pratt & Adamski Chapter 2 The Relational Model 1: Introduction, QBE, and Relational Algebra.
A Guide to SQL, Eighth Edition Chapter Six Updating Data.
Connecting (relating) Data Tables to get Custom Records (Queries) Database Basics.
1 © Prentice Hall, 2002 ITD1312 Database Principles Chapter 4B: Logical Design for Relational Systems -- Transforming ER Diagrams into Relations Modern.
Component 4: Introduction to Information and Computer Science Unit 6: Databases and SQL Lecture 6 This material was developed by Oregon Health & Science.
WEEK# 12 Haifa Abulaiha November 02,
Lecture 4: Logical Database Design and the Relational Model 1.
NormalisationNormalisation Normalization is the technique of organizing data elements into records. Normalization is the technique of organizing data elements.
MIDTERM REVIEW IST 210 Organization of Data IST210 1.
Chapter 1. Getting Started IST 210: Organization of Data IST2101.
Chapter 14 Functional Dependencies and Normalization Informal Design Guidelines for Relational Databases –Semantics of the Relation Attributes –Redundant.
IFS180 Intro. to Data Management Chapter 10 - Unions.
Introduction to Databases by Dr. Soper extended with more examples
Database Management Systems (DBMS)
A Table with a View: Database Queries
What is a Database and Why Use One?
Entity Relationships and Normalization
Database Fundamentals
A Table with a View: Database Queries
Getting Started Chapter One DATABASE CONCEPTS, 5th Edition
A Table with a View: Database Queries
Getting Started Chapter One DATABASE CONCEPTS, 4th Edition
Presentation transcript:

Assignment 1 Uploaded to course website Due next Tuesday, Sep 1, at 11:59pm

Chapter 1. Introduction to Database IST2102

Previous Lecture Potential problems with Lists – Deletion – Update – Insertion

A Long List to Several Small Lists IST2104 Two themes: Student, Course INFORMATION LOSS! Registration information is not in Student and Course tables

A Long List to Several Small Lists IST2105 PROBLEMS! One cell does NOT allow multiple values. (IMPORTANT! This rule is strictly enforced in database.) Two themes: Student, Course

A Long List to Several Small Lists IST2106 Student Entity Course Entity Student-Course Relationship Three themes: two entities and one relationship

A Long List to Several Small Lists IST2107 Student Course Registration Key points in splitting: 1. A table must be connected with other table(s) through shared column(s) Student  (StudentID)  Registration Course  (CourseID)  Registration 2. One cell can only have one value Revisit previous issues: Insert: A new student not taking any class Update: IST210 location changed Delete: Kate drops 230 Use above criteria to check whether you split the tables correctly!

Exercise IST2108 What are the modification problems (delete/insert/update) with this table? Split it into multiple tables. (Hint: do not lose information!)

Relational Databases A relational database stores information in tables. Each informational topic is stored in its own table In essence, a relational database will break-up a list into several parts. One part for each theme in the list IST2109

Answering Query: Putting the Pieces Back Together In our relational database, we broke apart our list into several tables. Somehow the tables must be joined back together In a relational database, tables are joined together using the value of the data IST21010

Query Relational Database: Using One Table IST21011 Student Table Course Table Registration Table Query 1: How many students take class 210? Answer: Check Registration Table to see many rows with CourseID as 210.  count = 4

Query Relational Database: Using Two Tables IST21012 Query 2: How many students take class taught by Marc? Student Table Course Table Registration Table Answer: Step 1. Check the CourseID taught by Marc in Course Table.  CourseID = 220 Step 2. See how many students taking class with CourseID 220 in Registration Table.  count = 2

Query Relational Database: Using Three Tables IST21013 Query 3: Who are the students taking class taught by Zihan? Student Table Course Table Registration Table Answer: Step 1. Check the CourseID taught by Zihan in Course Table.  CourseID = 210 Step 2. Get the StudentID taking class with CourseID 210 in Registration Table.  StudentID 101, 102, 103, 104 Step 3. Get the student names in Student Table with StudentID 101, 102, 103, 104.  Bob, Lisa, Sarah, Jim

Query Relational Database IST21014 Student Table Course Table Registration Table In a relational database, to answer a query, tables are joined together using the value of the data in the shared columns

Query Relational Database: Structured Query Language (SQL) Structured Query Language (SQL) is an international standard for creating, processing and querying databases and their tables IST21015 SELECTCount(StudentID) FROMCourse, Registration WHERECourse.CourseID = Registration.CourseID AND Course.Instructor = ‘Marc’ Query 2: How many students take class taught by Marc? Answer: Step 1. Check the CourseID taught by Marc in Course Table.  CourseID = 220 Step 2. See how many students taking class with CourseID 220 in Registration Table.  count = 2

Exercise (cont.) IST21016 After you split this table into multiple tables, answer following questions: Question 1: How many items purchased by Anderson? Question 2: What items purchased by customers in State College?

Sounds like More Work, Not Less A relational database is more complicated than a list However, a relational database minimizes data redundancy, preserves complex relationships among topics, and allows for partial data Furthermore, a relational database provides a solid foundation for user forms and reports IST21017

Chapter 1 Summary What is the problem with using a simple list to store the information? – Redundancy, Multiple themes  Modification issues What is the solution to replace a simple list? – Relational database – Break a simple long list to several tables; each table has its own theme How to query a relational database? – Join back the tables by the value of data through shared columns IST21018