Databases and Statistical Databases Session 4 Mark Viney Australian Bureau of Statistics 5 June 2007.

Slides:



Advertisements
Similar presentations
Chapter 10: Designing Databases
Advertisements

Accounting System Design
Introduction to Databases
Database Management: Getting Data Together Chapter 14.
Introduction to Databases
Data Management Design
Getting Started (Excerpts) Chapter One DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
Murali Mani SQL DDL and Oracle utilities. Murali Mani Datatypes in SQL INT (or) INTEGER FLOAT (or) REAL DECIMAL (n, m) CHAR (n) VARCHAR (n) DATE, TIME.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
CSC 2720 Building Web Applications Database and SQL.
Terms - data,information, file record, table, row, column, transaction, concurrency Concepts - data integrity, data redundancy, Type of databases – single-user,
Chapter 1 Introduction to Databases
Data at the Core of the Enterprise. Objectives  Define of database systems  Introduce data modeling and SQL  Discuss emerging requirements of database.
Working with SQL and PL/SQL/ Session 1 / 1 of 27 SQL Server Architecture.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Introduction to Databases
IST Databases and DBMSs Todd S. Bacastow January 2005.
Introduction to Database
Introduction to Databases. Case Example: File based Processing Real Estate Agent’s office Property for sale or rent Potential Buyer/renter Staff/employees.
Introduction Chapter 1. Reference Book  Database Systems Thomas Connolly, Carolyn Begg, Anne Strachan Addison-Wesley 1999 ISBN:
Information storage: Introduction of database 10/7/2004 Xiangming Mu.
Chapter 9 SQL and RDBMS Part C. SQL Copyright 2005 Radian Publishing Co.
Data at the Core of the Enterprise. Objectives  Define of database systems.  Introduce data modeling and SQL.  Discuss emerging requirements of database.
CS370 Spring 2007 CS 370 Database Systems Lecture 2 Overview of Database Systems.
I Copyright © 2004, Oracle. All rights reserved. Introduction.
Chapter 1 Introduction to Databases Pearson Education ©
Web-Enabled Decision Support Systems
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
Presentation Handout EDBA – Module 8 Information Technology 21 st December 2014 By K.M.Prashanthan.
Database Technical Session By: Prof. Adarsh Patel.
Introduction to SQL Steve Perry
STORING ORGANIZATIONAL INFORMATION— DATABASES CIS 429—Chapter 7.
1 Introduction to Database Systems. 2 Database and Database System / A database is a shared collection of logically related data designed to meet the.
Lecture 2 An Overview of Relational Database IST 318 – DB Admin.
Lecture2: Database Environment Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Ref. Chapter2 College of Computer and Information Sciences - Information.
1 Copyright © 2004, Oracle. All rights reserved. Introduction.
“INTRODUCTION TO DATABASE AND SQL”. Outlines 2  Introduction To Database  Database Concepts  Database Properties  What is Database Management System.
Instructor: Dema Alorini Database Fundamentals IS 422 Section: 7|1.
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
Relational Database. Database Management System (DBMS)
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
DataBase Management System What is DBMS Purpose of DBMS Data Abstraction Data Definition Language Data Manipulation Language Data Models Data Keys Relationships.
Databases Shortfalls of file management systems Structure of a database Database administration Database Management system Hierarchical Databases Network.
Chapter 1 Introduction to Databases © Pearson Education Limited 1995, 2005.
IS 325 Notes for Wednesday August 28, Data is the Core of the Enterprise.
Introduction to Database AIT632 Chapter 1 Sungchul Hong.
DATABASE MANAGEMENT SYSTEM ARCHITECTURE
Programming Logic and Design Fourth Edition, Comprehensive Chapter 16 Using Relational Databases.
GLOBEX INFOTEK Copyright © 2013 Dr. Emelda Ntinglet-DavisSYSTEMS ANALYSIS AND DESIGN METHODSINTRODUCTORY SESSION EFFECTIVE DATABASE DESIGN for BEGINNERS.
Introduction to Databases Transparencies © Pearson Education Limited 1995, 2005.
Relational Database Management System(RDBMS) Structured Query Language(SQL)
1 Geog 357: Data models and DBMS. Geographic Decision Making.
Chapter 3: Relational Databases
Databases Introduction - concepts. Concepts of Relational Databases.
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
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.
SQL Basics Review Reviewing what we’ve learned so far…….
1 Copyright © 2005, Oracle. All rights reserved. Oracle Database Administration: Overview.
Overview Relational Database and SQL Session 2 Matakuliah: Web Database Tahun: 2008.
Fundamental of Database Systems
Introduction to Databases
“Introduction To Database and SQL”
Database Management System
Chapter 4 Relational Databases
“Introduction To Database and SQL”
Teaching slides Chapter 8.
Data Model.
DATABASE Purpose of database
INTRODUCTION A Database system is basically a computer based record keeping system. The collection of data, usually referred to as the database, contains.
Presentation transcript:

Databases and Statistical Databases Session 4 Mark Viney Australian Bureau of Statistics 5 June 2007

Terms  Database ƒ A shared collection of logically related data (and description of this data), designed to meet the information needs of an organisation  DataBase Management System (DBMS) ƒ A software system that enables users to define, create and maintain the database and provides controlled access to this database

Terms (example)  Database ƒ Personnel Database ƒ Stock database ƒ Statistical Database  DataBase Management System (DBMS) ƒ Oracle ƒ DB2 ƒ Access ƒ MySql ƒ FoxPro ƒ Firebird

Why keep information in databases?  Accessibility of data ƒ Increased concurrency (reads and writes) ƒ Sharing data  Improved data integrity  Improved security ƒ access only to necessary data  Relatable ƒ More information from same amount of data  Visible

Why keep information in databases? (continued)  backup and recovery  Improved productivity ƒ common tools / common processes

Disadvantages of databases  Complexity  Size  Cost of DBMS  Need to upgrade versions  Additional hardware costs  Higher impact of failure

Databases  used to be solely mainframe  commonly on minicomputers  increasingly available on microcomputers  mostly accessed by SQL

Relational Databases  entities ƒ datatypes ƒ validation  relationships ƒ rules for interaction

Database Tables  rows and columns  fixed number of columns  multiple rows (records)  columns are of same datatype

Structured Query Language - SQL  Standard database language that allows:- ƒ Database creation and relation structures ƒ Basic data management tasks ƒ Both simple and complex queries

SQL - Data Definition - DDL  allows creation, modification and deletion of database objects ƒ Creation - CREATE  CREATE TABLE TAB1 (COL1 NUMBER, COL2 NUMBER); ƒ Modification - ALTER  ALTER TABLE TAB1 ADD COL3 NUMBER; ƒ Deletion - DROP  DROP TABLE TAB1;

Structured Query Language - SQL Data Manipulation - DML  Standard language to allow access the data stored in databases ƒ Extraction - SELECT  SELECT COL1,COL2 from TAB1; ƒ Loading - INSERT  INSERT INTO TAB1 (COL1,COL2) VALUES(7,22); ƒ Manipulation - UPDATE  UPDATE TAB1 SET COL2 = COL1 + 2; ƒ Deletion - DELETE  DELETE FROM TAB1 WHERE COL2 = 4;

Database Modeling  representation of "real world"  conceptual model  logical model  physical model

Keys  Primary Keys ƒ uniquely identifies a record  Foreign Keys ƒ pointer to a Primary Key in another table

Indexes  May be applied to columns to allow fast data access  May be applied to single columns or several columns  Direct pointers to rows containing specific values in the indexed column(s)  may be unique or non-unique  May have more than one index per table

Normalisation  A technique for producing a set of relations with desirable properties, given the data requirements of an enterprise

Normalisation - unnormalised  A representation of the data that contains repeating groups

Normalization - unnormalised form

Normalisation - 1st normal form  A relation in which the intersection of each row and column contains one and only one value 1NF

Normalization - 1st normal form 1NF

Normalisation - 2nd normal form  A relation that is ƒ in first normal form ƒ every non-primary key attribute is fully functionally dependent on the primary key 2NF

Normalization - 2nd normal form 2NF

Normalisation - 3rd normal form  A relation that is ƒ in first and second normal form and ƒ in which no non-primary key attribute is transitively dependent on the primary key 3NF

Normalization - 3rd normal form 3NF

Loading data into databases  Bulk loading tool  Data Integrity  Validation  ad-hoc loading

Data Extraction  Assemble data into usable format  Spreadsheet  Timeseries  Data Cube  Publication

Data manipulation  Inside database ƒ Sophisticated manipulation language - SQL  Outside database ƒ Timeseries  Seasonal Adjustment  Chain Volume Measures (Constant Price) ƒ SAS, SPSS

Transactional Integrity  the ability to apply rules to the data via database constraints  ability to group several discrete data insertion or data manipulation into one logical data change  In SQL, controlled via COMMIT and ROLLBACK statements

Transactional Integrity  database constraints ƒ values must conform to specific rules  exist in a specific column  belong to a "set"  uniqueness  If a validation against a constraint fails ƒ the current transaction fails

Transactions & Recovery  Each transaction is logged by the DBMS  Backups taken periodically  Data can be recovered ƒ to an archived backup ƒ to a point in time

COMMIT; INSERT INTO TABLE1 (COL1,COL2) VALUES(7,22); UPDATE TABLE1 SET COL1 = 77 WHERE COL2 = 22; DELETE FROM TABLE1 WHERE COL1 = 7; ROLLBACK; INSERT INTO TABLE2 (COL3,COL4) VALUES('ABC',11); UPDATE TABLE2 SET COL3 = 'XYZ'; DELETE FROM TABLE2 WHERE COL3 = 'xyz'; COMMIT; Transaction example transaction 1 transaction 2

Database Systems a Practical Approach to Design, Implementation and Management Thomas Connolly, Carolyn Begg, Anne Strachan (Addison-Wesley) 1999 cartoons - Randy Glassbergen References

Questions?