1 CS U430: Database Design Spring 2006 Panfeng (Tony) Zhou.

Slides:



Advertisements
Similar presentations
Chapter 10: Designing Databases
Advertisements

LBSC 690 Session #7 Structured Information: Databases Jimmy Lin The iSchool University of Maryland Wednesday, October 15, 2008 This work is licensed under.
ETEC 100 Information Technology
Introduction to Database ISYS 363. File Concepts File consists of a group of records. Each record contains a group of fields. Example: Student file –SIDSnameMajorSexGPA.
Multiple Tiers in Action
Lecture 4: Introduction to PHP 3 PHP & MySQL
CSC 2720 Building Web Applications Database and SQL.
Introduction To Databases IDIA 618 Fall 2014 Bridget M. Blodgett.
CSCI 6962: Server-side Design and Programming
Relational Model & Relational Algebra. 2 Relational Model u Terminology of relational model. u How tables are used to represent data. u Connection between.
© Pearson Education Limited, Chapter 2 The Relational Model Transparencies.
1 Intro to Info Tech Database Management Systems Copyright 2003 by Janson Industries This presentation can be viewed on line at:
Copyright © 2003 by Prentice Hall Module 4 Database Management Systems 1.What is a database? Data hierarchy and data organization Field, record, file,
6-1 DATABASE FUNDAMENTALS Information is everywhere in an organization Information is stored in databases –Database – maintains information about various.
DATABASE. A database is collection of information that is organized so that it can easily be accessed, managed and updated. It is also the collection.
RDB/1 An introduction to RDBMS Objectives –To learn about the history and future direction of the SQL standard –To get an overall appreciation of a modern.
Introduction to SQL Steve Perry
STORING ORGANIZATIONAL INFORMATION— DATABASES CIS 429—Chapter 7.
1 INTRODUCTION TO DATABASE MANAGEMENT SYSTEM L E C T U R E
Simple Database.
CS 474 Database Design and Application Terminology Jan 11, 2000.
CpSc 462/662: Database Management Systems (DBMS) (TEXNH Approach) Introduction James Wang.
HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts Database Design.
6 Chapter Databases and Information Management. File Organization Terms and Concepts Bit: Smallest unit of data; binary digit (0,1) Byte: Group of bits.
SQL Queries Relational database and SQL MySQL LAMP SQL queries A MySQL Tutorial and applications Database Building Assignment.
Tutorial 10 by Sam ine1020 Introduction to Internet Engineering 1 Database & Server-side Scripting Tutorial 10.
CSC 411/511: DBMS Design Dr. Nan WangCSC411_L12_JDBC_MySQL 1 MySQL and JDBC.
Component 4: Introduction to Information and Computer Science Unit 6: Databases and SQL Lecture 2 This material was developed by Oregon Health & Science.
GUS: 0262 Fundamentals of GIS Lecture Presentation 3: Relational Data Model Jeremy Mennis Department of Geography and Urban Studies Temple University.
SQL Queries Relational database and SQL MySQL LAMP SQL queries A MySQL Tutorial and applications Database Building.
NMED 3850 A Advanced Online Design January 12, 2010 V. Mahadevan.
Database Fred Durao What is a database? A database is any organized collection of data. Some examples of databases you may encounter in.
SQL Structured Query Language Programming Course.
Relational Databases (MS Access)
File Processing Concepts – Field – combination of 1 or more characters that is the smallest unit of data to be accessed – Record – group of related fields.
DAY 12: DATABASE CONCEPT Tazin Afrin September 26,
INTRODUCTION TO DATABASES CS 260 Database Systems.
Organizing Data Revision: pages 8-10, 31 Chapter 3.
CS370 Spring 2007 CS 370 Database Systems Lecture 4 Introduction to Database Design.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Chapter 7 Storing Organizational Information - Databases.
DAY 14: MICROSOFT ACCESS – CHAPTER 1 Madhuri Siddula October 1, 2015.
1 CSE 2337 Introduction to Data Management Access Book – Ch 1.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
Integrate Full-Text Retrieval with Digital Archives System Reporter : Chia-Hao Lee Computer System and Communication Lab, Academia Sinica Institute of.
12/2/2015CPSC , CPSC , Lecture 41 Relational Model.
CS453: Databases and State in Web Applications (Part 2) Prof. Tom Horton.
CS779 Term Project Steve Shoyer Section 5 December 9, 2006 Week 6.
Database Management Systems CS 420. Topics Outline 1. Introduction 2. HTML Review 3. VBScript 4. Access DBMS 5. Relational Database 6. Design Process.
Foundations of Business Intelligence: Databases and Information Management.
Information Systems Today: Managing in the Digital World TB3-1 3 Technology Briefing Database Management “Modern organizations are said to be drowning.
Introduction to Databases CISC Where would you find info about yourself stored in a computer? College Physician’s office Library Grocery Store Dentist’s.
ADO.NET Architecture MIS3502: Application Integration and Evaluation David Schuff Adapted from material by Arnold Kurtz, David.
Chapter 3: Relational Databases
1 CPE 332 Introduction DBMS: Relational Database Managment Systems Instructor:Suthep Madarasmi, Ph.D. ดร. สุเทพ มาดารัศมี
1 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 10 Designing Databases.
What Is Normalization  In relational database design, the process of organizing data to minimize redundancy  Usually involves dividing a database into.
uses of DB systems DB environment DB structure Codd’s rules current common RDBMs implementations.
LECTURE TWO Introduction to Databases: Data models Relational database concepts Introduction to DDL & DML.
1 Lecture1 Introduction to Databases Systems Database 1.
1 Section 1 - Introduction to SQL u SQL is an abbreviation for Structured Query Language. u It is generally pronounced “Sequel” u SQL is a unified language.
IT 5433 LM3 Relational Data Model. Learning Objectives: List the 5 properties of relations List the properties of a candidate key, primary key and foreign.
Introduction to Database Programming with Python Gary Stewart
DAY # 11 Haifa Abulaiha February 29,
1 SQL SERVER 2005 Express CE-105 SPRING 2007 Engr. Faisal ur Rehman.
Relational database and SQL MySQL LAMP SQL queries
Database Management  .
CS 174: Server-Side Web Programming February 12 Class Meeting
PHP and MySQL.
Databases & Consistency
Databases and Information Management
Presentation transcript:

1 CS U430: Database Design Spring 2006 Panfeng (Tony) Zhou

2 Who am I? PhD student in Database research area 10 years experiences in DB application development 12 industry world projects in Finance, Education, Health Insurance, Manufacture, etc

3 What could you learn from this course? You will understand the structure of DBMS and DB language (SQL). You will learn the index methods of database. You will learn how to implement a web application from scratch.

4 Main content of the course Basic structure of DBMS Queries the database Create/Update table content/structure Design the database (ER model) Web interface for database A project that covers all contents in the course and you can implement a DBMS from scratch

5 Main content of today 1. Introduction to DBMS 2. Relational rules 3. Sample database

6 1.1 Database is everywhere Shop at supermarket (e.g., Stop&Shop, etc). Shop online (e.g., Borrow book from library. ………..

7 1.2 Structure of web DBMS Web browser Web server Databases and DBMS Structured Query Language (SQL)

8 1.3 Products for each components ComponentProducts BrowerIE, Firefox, etc Web ServerMS IIS, Apache, Resin, etc DB ServerOracle, DB2, MySQL, MS SQL, MS Access, etc Operating SystemMS Window, Linux, Sun Solaris, etc Programming language MS ASP, Java, PHP, etc.

9 1.4 What inside the database? A set of tables. Each table “is” a spread sheet. Staff_IDF_nameL_namePositionGenderDOBSalaryBranch_ID SA9MaryHoweAssistantF19-Feb B007 SG14DavidFordSupervisorM24-Mar B003 SG37AnnBeechAssistantF10-Nov B003 SG5SusanBrandManagerF3-Jun B003 SL21JohnWhiteManagerM1-Oct B005 SL41JulieLeeAssistantF13-Jun B005 Field Record Header

10 2. Relational rules for relational database Rule 1: First Normal Form Rule Rule 2: Access Row by Content Only Rule Rule 3: The Unique Row Rule Rule 4: Entity integrity Rule

First Normal Form Rule Fields cannot have multi-values attributes or have any internal structures. Staff_IDNamePositionClients 001TonyManagerAmanda 002RobbieAgent Smith Andrew

First Normal Form Rule (cont) Staff_IDNamePositionClients1 001TonyManagerAmanda 002RobbieAgentSmit h Clients2 Andrew Problems: 1.Waste space 2.Not flexible

First Normal Form Rule (cont) Staff_IDNamePositionStaff_ID 001TonyManager 002RobbieAgent Smit h Client Andrew Amanda Employees Clients

Access Row by Content Only Rule Records can only be retrieved by their content (the attribute values in each record). Implications: 1.There is no order on the records (e.g., We cannot ask for the 3 rd record in the employee table) 2. We cannot retrieve a “pointer” to a record to retrieve it later.

The Unique Row Rule Two records in a table cannot be identical in all column values at once. Staff_IDNamePosition 001TonyManager 002RobbieAgent 001TonyManager Note: Keep this row in your mind. You might spend a lot of time and effort to enforce this rule.

The Unique Row Rule (cont) Table Key: a set of attributes K with two properties: 1. K is unique for each record. 2. The subset of K is not unique for each record. Primary Key: is a table key chosen by the database designer to uniquely identify specific records in the table. Note: one table has more than one key, but only one primary key.

The Unique Row Rule (cont) Staff_IDNamePosition 001TonyManager 003RobbieAgent 002ScottAgent Employee

Entity integrity Rule The primary key cannot be empty Staff_IDNamePosition 001TonyManager 003RobbieAgent nullScottAgent nullScottAgent Note: 1.Cannot retrieve the record by primary key. 2.Cannot distinguish duplicated records.

19 3. Sample database Client Private Owner Properties For Rent Registration Staff Viewing Branch

20 3. Sample database (cont) Client table PrivateOwner table Staff table Branch table PropertyForRent table Registration table Viewing table

21 3. Sample database (cont) Load table structure Load data in table one by one 1. Client table 2. PrivateOwner table 3. Branch table 4. Staff table 5. PropertyForRent table 6. Registration table 7. Viewing table