Chapter 1. Getting Started IST 210: Organization of Data IST2101.

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

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.
CSCI 150 Database Applications Chapter 1 – Getting Started.
The Relational Database Model:
3-1 Chapter 3 Data and Knowledge Management
Getting Started (Excerpts) Chapter One DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
1004INT Information Systems Week 10 Databases as Business Tools.
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
Database – Part 2a Dr. V.T. Raja Oregon State University.
Why Databases.
Information systems and databases Database information systems Read the textbook: Chapter 2: Information systems and databases FOR MORE INFO...
MS Access 2007 IT User Services - University of Delaware.
Page 1 ISMT E-120 Introduction to Microsoft Access & Relational Databases The Influence of Software and Hardware Technologies on Business Productivity.
Databases & Data Warehouses Chapter 3 Database Processing.
DAY 21: MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Akhila Kondai October 30, 2013.
1 Relational Databases. 2 Find Databases here… 3 And here…
N. J. Taylor Database Management Systems (DBMS) 1.
COURSE REGISTRATION SYSTEM Case study IST2101. Case Study: Course Registration (1) IST2102 You are helping Penn State create a course registration system.
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.
Chapter 5 Database Processing.
Using MIS 4e Chapter 5 Database Processing
Microsoft Access Lecture -13- By lec. (Eng.) Hind Basil University of Technology Department of Materials Engineering 1.
CSC100 Databases Marni Ferner. A Few Well-Known Examples Itunes & Ipods Amazon.com Ebay LL Bean Wal-Mart.
1 Class Agenda (11/07 and 11/12)  Review HW #8 answers  Present normalization process Enhance conceptual knowledge of database design. Improve practical.
IE 423 – Design of Decision Support Systems Database development – Relationships and Queries.
GUS: 0262 Fundamentals of GIS Lecture Presentation 3: Relational Data Model Jeremy Mennis Department of Geography and Urban Studies Temple University.
IST 210: ORGANIZATION OF DATA Chapter 1. Getting Started IST210 1.
PHP and MySQL CS How Web Site Architectures Work  User’s browser sends HTTP request.  The request may be a form where the action is to call PHP.
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.
Database Management System (DBMS) an Introduction DeSiaMore 1.
Getting Started Chapter One DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
1 Introduction to Oracle Chapter 1. 2 Before Databases Information was kept in files: Each field describes one piece of information about student Fields.
Chapter 2. The Relational Model (cont.)
Getting Started Chapter One DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 4 th Edition.
+ Types of Data IST210 Class Lecture. + What kind of data do you have? Class Schedules Contacts Names Phone Numbers Address Food Specials Movies,
Database Management Supplement 1. 2 I. The Hierarchy of Data Database File (Entity, Table) Record (info for a specific entity, Row) Field (Attribute,
Assignment 1 Uploaded to course website Due next Tuesday, Sep 1, at 11:59pm.
Database Design I (In-Class Exercise Answer) IST 210: Organization of Data IST2101.
Connecting (relating) Data Tables to get Custom Records (Queries) Database Basics.
Howard Paul. Sequential Access Index Files and Data File Random Access.
ASET 1 Amity School of Engineering & Technology B. Tech. (CSE/IT), III Semester Database Management Systems Jitendra Rajpurohit.
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.
MICROSOFT OFFICE ACCESS 2007 TRAINING Intro to building a database.
Data Modeling and Entity-Relationship Model I
MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Sravanthi Lakkimsety Mar 14,2016.
MIDTERM REVIEW IST 210 Organization of Data IST210 1.
DATA MODELING AND ENTITY-RELATIONSHIP MODEL II IST 210: Organization of Data IST210 1.
IFS180 Intro. to Data Management Chapter 10 - Unions.
Introduction to Databases by Dr. Soper extended with more examples
Database Management Systems (DBMS)
Chapter 12 Information Systems.
Databases and Information Management
MS Access Database Connection
What is a Database and Why Use One?
Entity Relationships and Normalization
Databases and Information Management
Spreadsheets, Modelling & Databases
A Very Brief Introduction to Relational Databases
Getting Started Chapter One DATABASE CONCEPTS, 5th Edition
Getting Started Chapter One DATABASE CONCEPTS, 4th Edition
Conceptual modeling of databases
Presentation transcript:

Chapter 1. Getting Started IST 210: Organization of Data IST2101

Purpose of a Database The purpose of a database is to keep track of things Unlike a list or spreadsheet, a database may store information that is more complicated than a simple list IST2102

Mini Case You are designing our course selection system –What aspects you need to store a record? Student ID, Student Name, Student's Department, CourseID, Instructor, CourseName, Location –What questions (i.e. queries) will users ask? Student: What class I have registered for this semester? Instructor: How many students are registered and what are their backgrounds? –What tool would you use to manage the data? Excel? IST2103

Problems with a Simple List IST2104 Redundancy Multiple Themes

Problems with a Simple List: Redundancy In a list, each row is intended to stand on its own. As a result, the same information may be entered several times –A list of class enrollment may include Student ID, Student Name, Class, Instructor Name, Location, Lecture time, … –If there are 40 students taking IST210, class information will be entered 40 times. IST2105

Problems with a Simple List: Multiple Themes In a list, each row may contain information on more than one theme. As a result, needed information may appear in the lists only if information on other themes is also present –For Example: A list of class registration may include Student Information (ID, Name, Department) and Course Information (ID, Instructor, Location). IST2106

List Modification Issues Redundancy and multiple themes create modification problems –Deletion problems –Update problems –Insertion problems IST2107

List Modification Issues: Insert IST2108 Insert: A new student not taking any class

IST2109 Insert: A new student not taking any class Problem: blank cells for course information

List Modification Issues: Update IST21010 Update: IST210 location changed

IST21011 Update: IST210 location changed Problem: Need to update multiple rows

List Modification Issues: Delete IST21012 Delete: Kate drops 230

IST21013 Delete: Kate drops 230 Problem: Information about Kate and about course 230 will be lost!

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

A Long List to Several Small Lists IST21015 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 IST21016 Student Entity Course Entity Student-Course Relationship Three themes: two entities and one relationship

A Long List to Several Small Lists IST21017 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!

In-Class Exercise IST21018 What are the problems with this table. Split it into multiple tables. Check whether you split the table correctly.

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 A well-formed relational database: a criteria to determine whether a database is good enough (no redundancy, no modification issues)  We will learn in Chapter 2 IST21019

Answer 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, to answer a query, tables are joined together using the value of the data IST21020

Query Relational Database: Using One Table IST21021 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 IST21022 Query 2: How many students take class taught by John? Student Table Course Table Registration Table Answer: Step 1. Check the CourseID taught by David 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 IST21023 Query 3: Who are the students taking class taught by Jessie? Student Table Course Table Registration Table Answer: Step 1. Check the CourseID taught by Jessie in Course Table.  CourseID = 210 Step 2. Get the StudentID taking class with CourseID 210 in Registration Table.  StudentID 1, 5, 2, 3 Step 3. Get the student names in Student Table with StudentID 1,5,2,3.  Bob, Lisa, Sarah, Jim

Query Relational Database IST21024 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 IST21025 SELECTCount(StudentID) FROMCourse, Registration WHERECourse.CourseID = Registration.CourseID AND Course.Instructor = ‘John’ Query 2: How many students take class taught by John? Answer: Step 1. Check the CourseID taught by David in Course Table.  CourseID = 220 Step 2. See how many students taking class with CourseID 220 in Registration Table.  count = 3

Exercise (cont.) IST21026 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 IST21027

Key Points in This Chapter What is the problem with a simple list to store the information? –Redundancy, 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 IST21028

Next I know splitting a simple list to multiple tables will reduce redundancy and avoid modification issues, but –How should we split a simple list? –Is there any rule we could follow to split the list? –Is there any criteria to know the tables are good enough? We will answer this question in Chapter 2 IST21029

Question? 30IST210