Databases Stefano Grazioli.

Slides:



Advertisements
Similar presentations
CSE 190: Internet E-Commerce Lecture 10: Data Tier.
Advertisements

© Stefano Grazioli - Ask for permission for using/quoting:
Financial Information Management FIM: Databases Stefano Grazioli.
Financial Information Management How do I talk to a DBMS? SQL In one hour.
DAY 21: MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Akhila Kondai October 30, 2013.
From VS C# 2010 Programming, John Allwork 1 VS2010 C# Programming - DB intro 1 Topics – Database Relational - linked tables SQL ADO.NET objects Referencing.
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,
1 Overview of Databases. 2 Content Databases Example: Access Structure Query language (SQL)
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.
Simple Database.
Databases. Database A database is an organized collection of related data.
SQL Structured Query Language Programming Course.
FEN  Data Definition: CREATE TABLE, ALTER TABLE  Data Manipulation: INSERT, UPDATE, DELETE  Queries: SELECT SQL: Structured Query Language.
Financial Information Management Putting VB & SQL To Work Stefano Grazioli.
Financial Information Management Changing data in a DB Stefano Grazioli.
Financial Information Management Operations, BI, and Analytics Stefano Grazioli.
© Stefano Grazioli - Ask for permission for using/quoting:
© Stefano Grazioli - Ask for permission for using/quoting:
Course FAQ’s I do not have any knowledge on SQL concepts or Database Testing. Will this course helps me to get through all the concepts? What kind of.
SQL Jan 20,2014. DBMS Stores data as records, tables etc. Accepts data and stores that data for later use Uses query languages for searching, sorting,
Chapter 3: Relational Databases
Financial Information Management FIM: Databases Stefano Grazioli.
Financial Information Management Business Intelligence Putting VBA & SQL To Work.
© Stefano Grazioli - Ask for permission for using/quoting: Putting VBA & SQL To Work.
Financial Information Management Modifying data in a DB Stefano Grazioli.
© Stefano Grazioli - Ask for permission for using/quoting: Stefano Grazioli.
Financial Information Management Operations, BI, and Analytics Stefano Grazioli.
© Stefano Grazioli - Ask for permission for using/quoting: Stefano Grazioli.
MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Sravanthi Lakkimsety Mar 14,2016.
CS320 Web and Internet Programming SQL and MySQL Chengyu Sun California State University, Los Angeles.
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.
1 Finding Your Way Through a Database Exploring Microsoft Office Access.
INTRODUCTION TO DATABASES (MICROSOFT ACCESS)
Operations, BI, and Analytics
Web Systems & Technologies
Process Automation The Technology
Chapter 1 Introduction.
Process Automation The Technology
Business Intelligence
CS320 Web and Internet Programming SQL and MySQL
Oracle & SQL Introduction
BI tools: Excel’s Pivot table
Information Systems Today: Managing in the Digital World
Principles of Software Development
Dynamic SQL Queries Stefano Grazioli.
Exploring Microsoft Office Access
Introduction to Database Systems
Database Management  .
“Introduction To Database and SQL”
Database.
The Relational Model Relational Data Model
PHP and MySQL.
Dynamic SQL Queries Stefano Grazioli.
BI: Accessing Enterprise Data
CS1222 Using Relational Databases and SQL
CS1222 Using Relational Databases and SQL
BI: Accessing Enterprise Data
CS3220 Web and Internet Programming SQL and MySQL
Dynamic SQL Queries Stefano Grazioli.
Dynamic SQL Queries Stefano Grazioli.
BI tools: Excel’s Pivot table
CS3220 Web and Internet Programming SQL and MySQL
Database Connections.
CS1222 Using Relational Databases and SQL
Operations, BI, and Analytics
DATABASE Purpose of database
Operations, BI, and Analytics
Exploring Microsoft Office Access
CS1222 Using Relational Databases and SQL
Presentation transcript:

Databases Stefano Grazioli

Debriefing Still doing well Timing your posts Easy meter

You do the talking Name, major Learning objectives Things you like about the class Things that can be improved Strengths / Attitude towards the Tournament

Databases Stefano Grazioli

Why do we need Databases? Program (e.g., VBA) data is volatile Data in one place for everyone to use Indispensable in commerce Database

DBs vs. DBMSs DBMS DataBase DataBase file(s) A database (DB) is an organized collection of data A DataBase Management System (DBMS) is a software that provides data-related functionality DataBase User location Data center User or program User or program ‘Client’ program DBMS DataBase file(s) DBMS: Access, Oracle, IBM DB2, SQL Server, MySQL...

DBs and the Web DBMS DataBase DataBase file(s) Web server User location Data center DataBase User or program Web server User or program Browser program DataBase file(s) DBMS

Relational DBMS RDBMS “tables inside” When a DBMS organizes your data so that they appear to the users as TABLES, that DBMS is a Relational DBMS, or RDBMS. I speak SQL “tables inside” I speak SQL RDBMS Client program

What Is New In Technology? WINIT What Is New In Technology?

Congratulations! You are hired at SmallBank Homework

You are a Business Intelligence analyst at SmallBank Welcome! So glad that you are here and can help us with Business Intelligence! I have so many business questions for you… (1) Who are our customers in Austin, TX? I need a list of first names, last names and IDs (2) What are the rates that we offered on our loans? Prepare a report with the loan IDs and rates for the loans under $50,000,000 (3) …. Please access our MS SQL Server and create these reports for me…

Accessing Business Data SmallBank data: Loan, Loan Officer, Customer, Insurance Plan User location Data center RDBMS MS SQL Server SQL Client Visual Studio Sql queries F-sg6m-s4 A file on the server

Example Table: Loan Officer ACTUAL TABLE DIAGRAM LO id f name l name phone demo

Small Bank DB: Data Dictionary Loan l_id = the loan unique id principal, rate, date_due, Loan officer lo_id = the loan officer’s unique id f_name, l_name, phone Customer c_id = the customer’s unique id f_name, l_name, city, state Insurance plan coverage = maximum amount covered premium = amount to pay every year

Reading the Data Model Primary key: a unique identifier used to retrieve the record

Reading the Relationships 1 6 “A loan officer has many loans, a loan has one loan officer” One 5 2 Many 3 4

SQL Queries

SQL Structured Query Language The standard language for databases 70s: - Codd - SEQUEL – Structured English QUEry Language commercialized it in 1979 1986 ISO/ANSI Sometimes sought as a required skill in interviews

SQL EXAMPLE: A QUERY SELECT First_Name, Last_Name, ssn FROM StudentTbl WHERE gpa > 3.0 ORDER BY Last_Name;

4+2 BASIC SQL COMMANDS SELECT = ‘search’ INSERT a new row UPDATE a existing row DELETE a row CREATE a table DROP a table

Navigating the Relationships (‘join’) FK foreign key: a PK in another table, used to link the two tables FK FK FK FK

Joins are commonsense If I give you c_id ‘4977’, can you give me the phone numbers of the loan officers for that client?

SQL Query Select loan_officer.phone from customer_in_loan, loan, loan_officer where customer_in_loan.c_id = '4977' and customer_in_loan.l_id = loan.l_id and loan.lo_id = loan_officer.lo_id If I give you c_id ‘4977’, can you give me the phone numbers of the loan officers for that client?