Rob Gleasure robgleasure.com

Slides:



Advertisements
Similar presentations
C6 Databases.
Advertisements

Introduction to Structured Query Language (SQL)
CORE 2: Information systems and Databases STORAGE & RETRIEVAL 2 : SEARCHING, SELECTING & SORTING.
Rationale Aspiring Database Developers should be able to efficiently query and maintain databases. This module will help students learn the Structured.
Chapter 5 Lecture 2. Principles of Information Systems2 Objectives Understand Data definition language (DDL) and data dictionary Learn about popular DBMSs.
CPS120: Introduction to Computer Science Information Systems: Database Management Nell Dale John Lewis.
Chapter 10 Queries and Updating Part C. SQL Copyright 2005 Radian Publishing Co.
 SQL stands for Structured Query Language.  SQL lets you access and manipulate databases.  SQL is an ANSI (American National Standards Institute) standard.
Introduction: Databases and Database Users
DBS201: Introduction to Database Design and SQL
CHAPTER:14 Simple Queries in SQL Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
CPS120: Introduction to Computer Science Lecture 19 Introduction to SQL.
Structure Query Language SQL. Database Terminology Employee ID 3 3 Last name Small First name Tony 5 5 Smith James
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
Chapter 10: The Data Tier We discuss back-end data storage for Web applications, relational data, and using the MySQL database server for back-end storage.
C6 Databases. 2 Traditional file environment Data Redundancy and Inconsistency: –Data redundancy: The presence of duplicate data in multiple data files.
Topic 1: Introduction to SQL. SQL stands for Structured Query Language. SQL is a standard computer language for accessing and manipulating databases SQL.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
1 DBS201: Introduction to Structure Query Language (SQL) Lecture 1.
SQL Basic. What is SQL? SQL (pronounced "ess-que-el") stands for Structured Query Language. SQL is used to communicate with a database.
Database Fundamental & Design by A.Surasit Samaisut Copyrights : All Rights Reserved.
IS6146 Databases for Management Information Systems Lecture 1: Introduction to IS6146 Rob Gleasure robgleasure.com.
IS2803 Developing Multimedia Applications for Business (Part 2) Lecture 1: Introduction to IS2803 Rob Gleasure
Distribution of Marks For Second Semester Internal Sessional Evaluation External Evaluation Assignment /Project QuizzesClass Attendance Mid-Term Test Total.
IS2803 Developing Multimedia Applications for Business (Part 2) Lecture 5: SQL I Rob Gleasure robgleasure.com.
7 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 7.6 Advanced Select Queries SQL provides useful functions that.
ITS232 Introduction To Database Management Systems Siti Nurbaya Ismail Faculty of Computer Science & Mathematics, Universiti Teknologi MARA (UiTM), Kedah.
 CONACT UC:  Magnific training   
Chapter 12 Introducing Databases. Objectives What a database is and which databases are typically used with ASP.NET pages What SQL is, how it looks, and.
Management Information Systems by Prof. Park Kyung-Hye Chapter 7 (8th Week) Databases and Data Warehouses 07.
Data Mining and Data Warehousing: Concepts and Techniques What is a Data Warehouse? Data Warehouse vs. other systems, OLTP vs. OLAP Conceptual Modeling.
Databases and DBMSs Todd S. Bacastow January
Introduction to DBMS Purpose of Database Systems View of Data
Fundamentals of DBMS Notes-1.
CS4222 Principles of Database System
Intro to MIS – MGS351 Databases and Data Warehouses
Rob Gleasure robgleasure.com
CHAPTER 7 DATABASE ACCESS THROUGH WEB
SQL Query Getting to the data ……..
Fundamentals of Information Systems, Sixth Edition
Chapter 5 Introduction to SQL.
Rob Gleasure robgleasure.com
Chapter 1: Introduction
 2012 Pearson Education, Inc. All rights reserved.
ATS Application Programming: Java Programming
Chapter 1: Introduction
Database Management System
Introduction To Database Systems
Rob Gleasure robgleasure.com
JDBC.
Databases and Data Warehouses Chapter 3
Using SQL to Prepare Data for Analysis
Introduction to Database Management System
Chapter 8 Working with Databases and MySQL
Database Fundamentals
Chapter 22 - SQL, MySQL, DBI and ADO
Rob Gleasure robgleasure.com
MANAGING DATA RESOURCES
Introduction To Structured Query Language (SQL)
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall
Introduction to DBMS Purpose of Database Systems View of Data
Introduction To Structured Query Language (SQL)
Chapter 1: Introduction
Structured Query Language
The ultimate in data organization
Chapter 1: Introduction
Chapter 3 Database Management
Terms: Data: Database: Database Management System: INTRODUCTION
Chapter 1: Introduction
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:

Rob Gleasure R.Gleasure@ucc.ie robgleasure.com IS6146 Databases for Management Information Systems Lecture 1: Introduction to IS6146 Rob Gleasure R.Gleasure@ucc.ie robgleasure.com

IS6146 Lecture times 13.00-15.00, Wednesday (Boole 2) Contact me at Ext 2503 Room 2.112 R.Gleasure@ucc.ie Website for this course robgleasure.com

IS6146 Module content and learning outcomes Using relational databases (i.e. SQL) NoSQL and distributed data stores Analysing unstructured/semi-structured data

IS6146 Course Assessment Continuous assessment: 50 marks In-class exam – 20 marks Group report – 30 marks Exam: 50 marks Staff Student Support Committee meeting 31st January, 15.00-16.00, Room 2.120.

Continuous Assessment In-class SQL exam (20 marks) 22nd February* Reports due (20 marks) 5th April* *Provisional dates

OLTP Databases Online transaction processing (OLTP) databases/data stores support ongoing activities in an organisation Hence, they need to Manage accurate real-time transactions Handle reads, writes, and updates by large numbers of concurrent users Decompose data into joinable, efficient rows (e.g. normalised to 3rd form) These issues are often labelled ACID database transactions Atomic: Every part of a transaction works or it’s all rolled back. Consistent: The database in never left in inconsistent states Isolated: Transactions do not interfere with one other Durable: Completed transactions are not lost if system crashes

OLAP Data stores Online analytical processing (OLAP) databases/data stores are used to support predictive analytics Hence, they need to Allow vast quantities of historical data to be accessed quickly Be updatable in batches (often daily) Aggregate diverse structures with summary data These issues are often labelled BASE database transactions Basic Availability Soft-state Eventual consistency

Data warehousing OLTP OLAP We’ll come back to this stuff later in the course Operational databases Business intelligence database HR and payroll Extract Transform Load Data warehouse Data mining Sales and customers Visual-isation Orders Reporting Technical support Purchased data

Database Management Systems A Database Management System (DBMS) is an OLTP software package designed to store and manage databases. This is different from a database file for several reasons DBMS makes tables visible and generates reports DBMS helps less technical users to use data efficiently DBMS protects data from inconsistency and duplication due to multiple concurrent users DBMS handles crash recovery DBMS handles security and access control

Database Management Systems DBMS operates at the physical level This is where data handling becomes increasingly technical Management and business users Conceptual model System analysts and designers Logical model Physical model Database administrators

Database Management Systems DBMS are typically managed by a set Database Administrator, whose responsibilities include Defining or refining logical schema in response to requirements Granting appropriate access to users Monitoring DBMS performance Updating/changing DBMS software

Database Management Systems Other users will include Naïve users (use applications that access/modify data) Sophisticated/specialised users (use DBMS directly to generate reports and assist business analysis) Application developers (write programs that need to access/modify data)

Examples of DBMS Oracle Large multi-user DBMS that excels at handling many clients requesting, accessing, and modifying data Popular in large organisations and cloud services due to scalability Very effective handling of concurrency, read consistency, parallel execution, and locking mechanisms MS Access Popular DBMS for small scale projects due to its relatively low cost and usability Imports and exports data to many formats commonly used in organisations, e.g. Excel, Outlook, SQL Server, Oracle Integrates easily with MS tools like VB, C# and .NET

Examples of DBMS MySQL Open source SQL database with free and paid versions Flexible and scalable Open source means lots of support and the potential for adaptability MS SQL Server Good performance XML integration Inclusion of try/catch queries

Accessing a DBMS with SQL So once we have our data models in place and our DBMS set up, how do we get started using our data?  The SQL (pronounced like sequel) query language SQL (Structured Query Language) was introduced in the 70’s and has evolved since to add features such as Compatibility with object-oriented programming Compatibility with XML Compatibility with XQuery

Accessing a DBMS with SQL

The Structure of SQL SQL can be divided into two parts: The Data Manipulation Language (DML) Used to create, read, update and delete tuples (CRUD operations) Mostly used by application programmers and sophisticated/specialised users The Data Definition Language (DDL) Used to define database structure (relation schemas) and data access control, as well as integrity constraints and views Mostly used by database administrator

Executing SQL in a DBMS

Accessing DBMS with SQL The basic syntax of SQL queries are as follows: COMMAND column_name1, column_name2, … FROM/SET/VALUES table_name1, table_name2, … WHERE column_name comparison_operator value; All statements in a semi-colon

The SQL Select statement The SELECT statement is used to retrieve data from a database into a result table, or result-set You can use an asterisk (*) instead of a column name if you wish to select all columns satisfying the criteria e.g. SELECT * FROM my_table;

The SQL Select statement Let’s open up an online example from W3Schools http://www.w3schools.com/sql/trysql.asp?filename=trysql_select_all

The SQL Select statement Sometimes non-primary key columns may contain duplicate values - you can also use SELECT DISTINCT when you want to avoid duplicates in your result-set e.g. SELECT DISTINCT * FROM my_table;

The SQL Where clause A number of comparison operators are possible with the WHERE clause Examples http://www.w3schools.com/sql/trysql.asp?filename=trysql_select_between_in http://www.w3schools.com/sql/trysql.asp?filename=trysql_select_in Operator Description = Equal <>, != Not equal > Greater than < Less than >= Greater than or equal <= Less than or equal BETWEEN Between an range of numbers LIKE Searches for patterns IN When a specific value is sought

The ‘LIKE’ condition and Wildcards Sometimes we want to identify records based on slices of the data within a cell - we do this using wildcards and the LIKE condition Examples http://www.w3schools.com/sql/trysql.asp?filename=trysql_select_wildcard_percent http://www.w3schools.com/sql/trysql.asp?filename=trysql_select_wildcard_underscore http://www.w3schools.com/sql/trysql.asp?filename=trysql_select_wildcard_charlist&ss=-1 Wildcard Description % A substitute for zero or more characters _ A substitute for a single character [charlist] Sets and ranges of characters to match [^charlist] or [!charlist] Matches only a character NOT specified within the brackets

The SQL Where clause (continued) Numerous clauses can be combined with the keywords AND & OR e.g. SELECT * FROM my_table WHERE val1=‘true’ AND val2=‘false’; Complex clause can be creates by nesting clauses in parentheses WHERE val1=‘true’ AND (val2=‘false’ OR val2=‘null’); Example http://www.w3schools.com/sql/trysql.asp?filename=trysql_select_where_and_or

The SQL Order By keyword The ORDER BY keyword is used to sort the result-set e.g. SELECT * FROM my_table ORDER BY NAME; You may also specify whether you want the returned result-set to be sorted in ascending or descending order by using the keywords ASC or DESC SELECT * FROM my_table ORDER BY NAME DESC; Example http://www.w3schools.com/sql/trysql.asp?filename=trysql_select_orderby_desc

Report Identify a real workplace on which to base your report For this workplace, your core requirements include Identify the information system requirements and data needs of key stakeholders Analyse existing data sources, stores and structures Design a new conceptual data structure Develop a relational database to support this data Develop views, reports, etc. to allow stakeholders to get value from this database Develop complementary data stores and/or warehouses to complement this transaction-focused data You may also wish to include OLAP functionalities

Report Your submission will include A CD storing all of the files and code necessary to run your system A report describing The workplace you selected How requirements were gathered (and from whom) A model/models of existing and redesigned data structures How the system meets the requirements identified An individual email directly to me stating the proportion of contribution made by each of your group mates

Groups The groups are as follows*: Group 1: Cadogan, Sam; Dennehy, Katie; Murray, Joseph; Leahy, Ian Group 2: Jiang, Pei; Barry, Mark Edgar; Philpott, Catherine; Group 3: Ramadan, Fatimah; McGrath, Shane Donal; Donovan, Roisin Ellen Group 4: Mc Garry, Anna Margaret; Lewis, Katherine Rebecca; O Sullivan, Aine Geraldine *Please double-check you have a group and are not in the same group with anyone from last semester’s project

Readings http://www.w3schools.com/sql http://www.tizag.com/sqlTutorial/