SQL for the Non - Technician Jeffrey Walsh AnswerThink Consulting Group, Inc.

Slides:



Advertisements
Similar presentations
Creating Tables. 2 home back first prev next last What Will I Learn? List and provide an example of each of the number, character, and date data types.
Advertisements

SQL Rohit Khokher.
Basic SQL Introduction Presented by: Madhuri Bhogadi.
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 8 Application Data Auditing.
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 8 Application Data Auditing.
Murach’s Java SE 6, C21© 2007, Mike Murach & Associates, Inc.Slide 1.
SQL’s Data Definition Language (DDL) n DDL statements define, modify and remove objects from data dictionary tables maintained by the DBMS n Whenever you.
Let’s try Oracle. Accessing Oracle The Oracle system, like the SQL Server system, is client / server. For SQL Server, –the client is the Query Analyser.
SQL components In Oracle. SQL in Oracle SQL is made up of 4 components: –DDL Data Definition Language CREATE, ALTER, DROP, TRUNCATE. Creates / Alters.
System Administration Accounts privileges, users and roles
Chapter 3: Using SQL Queries to Insert, Update, Delete, and View Data
A Guide to Oracle9i1 Advanced SQL And PL/SQL Topics Chapter 9.
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.
Database objects User schema DCL Oracle dictionary.
Database Management System LICT 3011 Eyad H. Elshami.
Oracle PL/SQL Injection David Litchfield. What is PL/SQL? Procedural Language / Structured Query Language Oracle’s extension to standard SQL Programmable.
Adapted from Afyouni, Database Security and Auditing DB Auditing Examples (Ch. 9) Dr. Mario Guimaraes.
Adapted from Afyouni, Database Security and Auditing Database Application Auditing – Ch. 8.
ORACLE ONLINE TRAINING Contact our Support Team : SOFTNSOL India: Skype id : softnsoltrainings id:
Chapter 5 Introduction to SQL. Structured Query Language = the “programming language” for relational databases SQL is a nonprocedural language = the user.
Chapter 9 SQL and RDBMS Part C. SQL Copyright 2005 Radian Publishing Co.
Project Implementation for COSC 5050 Distributed Database Applications Lab2.
Introduction to SEQUEL. What is SEQUEL? Acronym for Structural English Query Language Acronym for Structural English Query Language Standard language.
Guofeng Cao CyberInfrastructure and Geospatial Information Laboratory Department of Geography National Center for Supercomputing Applications (NCSA) University.
CPS120: Introduction to Computer Science Lecture 19 Introduction to SQL.
1 Creating and Modifying Database Objects. 2 An Oracle database consists of multiple user accounts Each user account owns database objects Tables Views.
Quick review of SQL And conversion to Oracle SQL.
Oracle 11g DATABASE DEVELOPMENT LAB1. Introduction  Oracle 11g Database:-  Oracle 11g database is designed for some features, which helps to the organizations.
SQL: DDL. SQL Statements DDL - data definition language –Defining and modifying data structures (metadata): database, tables, views, etc. DML - data manipulation.
Roles & privileges privilege A user privilege is a right to execute a particular type of SQL statement, or a right to access another user's object. The.
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 8 Advanced SQL.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Introduction to Oracle. Oracle History 1979 Oracle Release client/server relational database 1989 Oracle Oracle 8 (object relational) 1999.
Oracle & SQL Introduction. Database Concepts Revision DB? DBMS? DB Application? Application Programs? DBS? Examples of DBS? Examples of DBMS? 2Oracle.
Information Building and Retrieval Using MySQL Track 3 : Basic Course in Database.
SQL Fundamentals  SQL: Structured Query Language is a simple and powerful language used to create, access, and manipulate data and structure in the database.
Access The L Line The Express Line to Learning 2007 L Line L © Wiley Publishing All Rights Reserved.
CHAPTER 6: INTRODUCTION TO SQL © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition Jeffrey A. Hoffer,
Introduction to Oracle In June 1970,Dr E.F.Codd’s a published A paper entitled A relational model of Data for large shared data banks. This relational.
Prince Sultan University Dept. of Computer & Information Sciences CS 340 Introduction to Database Systems.
Database Fundamental & Design by A.Surasit Samaisut Copyrights : All Rights Reserved.
Visual Programing SQL Overview Section 1.
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,
1 Chapter 2: Creating and Modifying Database Objects.
Chapter 5 : Integrity And Security  Domain Constraints  Referential Integrity  Security  Triggers  Authorization  Authorization in SQL  Views 
Oracle 11g: SQL Chapter 7 User Creation and Management.
IS6146 Databases for Management Information Systems Lecture 3: SQL III – The DDL Rob Gleasure robgleasure.com.
Oracle & SQL. Oracle Data Types Character Data Types: Char(2) Varchar (20) Clob: large character string as long as 4GB Bolb and bfile: large amount of.
1 Copyright © 2009, Oracle. All rights reserved. Controlling User Access.
Oracle9i Developer: PL/SQL Programming Chapter 5 Functions.
Installation Oracle 11g Express 2 double click the "setup" button to install the Oracle.
LM 5 Introduction to SQL MISM 4135 Instructor: Dr. Lei Li.
Copyright © 2016 Pearson Education, Inc. Modern Database Management 12 th Edition Jeff Hoffer, Ramesh Venkataraman, Heikki Topi CHAPTER 6: INTRODUCTION.
 CONACT UC:  Magnific training   
8 Copyright © 2005, Oracle. All rights reserved. Managing Schema Objects.
Physical Model Lecture 11. Physical Data Model The last step is the physical design phase, In this phase data is – Store – Organized and – Access.
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.
Database Languages.
Chapter 5 Introduction to SQL.
Oracle SQL.
Introduction To Database Systems
ITEC 313 Database Programming
DATABASE MANAGEMENT SYSTEM
Managing Objects with Data Dictionary Views
ORACLE I 2 Salim Phone : YM : talim_bansal.
Database systems Lecture 3 – SQL + CRUD
SQL .. An overview lecture3.
Contents Preface I Introduction Lesson Objectives I-2
Chapter 8 Advanced SQL.
Presentation transcript:

SQL for the Non - Technician Jeffrey Walsh AnswerThink Consulting Group, Inc.

Today’s Topics n An Introduction to Databases n Structured Query Language n Data Definition and Data Manipulation n SQL versus SQL*Plus n PL/SQL n Database Security

What the Heck is a Database? n Data u Set of Elements u Set of Operations n Database u Data Definition u Data Manipulation

Structured Query Language n Standard Set of Commands n Provides means for u Data Definition (DDL) u Data Manipulation (DML)

Data Manipulation n Select Statements n Insert Statements n Update Statements n Delete Statements n Data Conversion

SELECT Statements SELECT column1, column2, … column x FROM table,... view, … WHERE where condition GROUP BY group condition ORDER BY ordering criteria

SELECT Statements SELECT Segment1 ‘Company’, Segment2 ‘Division’, Segment3 ‘Account’, Segment4 ‘Sub-Account’ FROM GL_Code_Combinations WHERE Enabled_Flag = ‘N’ ORDER BY Segment1, Segment2, Segment3, Segment4;

INSERT Statements INSERT INTO table_name VALUES (list of values); INSERT INTO table_name (list of columns) VALUES (list of values);

INSERT Statements INSERT INTO table_name select_statement; INSERT INTO table_name (list of columns) select_statement;

INSERT Statements INSERT INTO FND_USER (user_name, end_date) VALUES (‘WALSHJ’, SYSDATE + 365);

UPDATE Statements UPDATE table_name SET column = value, column = select_statement column, column = value … WHERE where condition;

UPDATE Statements UPDATE AP_Selected_Invoice_Checks SET Vendor_Name = ‘Charles Keating’ WHERE Payment_Amount > 5000;

DELETE Statements DELETE FROM table_name WHERE where_condition;

DELETE Statements DELETE FROM FND_User WHERE User_Name = ‘WALSHJ’;

Data Definition n Create Table n Create View n Create Sequence

Data Types n Character n Numbers n Dates n Binary Objects n File Pointers

Create Table CREATE TABLE table_name (column datatype, column datatype, …); CREATE TABLE table_name AS select_statement;

Create Table CREATE TABLE Legacy_Vendors (Vendor_Name VARCHAR2(50), Vendor_Number VARCHAR2(10), Address1 VARCHAR2(50), Address2 VARCHAR2(50), City VARCHAR2(25), State VARCHAR2(2), Zip_Code VARCHAR2(10));

Create Table CREATE TABLE Payroll_Code_Combinations AS SELECT Segment1 Company, Segment2 Division, Segment3 Account, Segment4 SubAccount FROM GL_Code_Combinations WHERE Segment3 LIKE ‘45%’;

Create View CREATE VIEW OR REPLACE view_name AS select_statement;

Create View CREATE VIEW OR REPLACE Payroll_Code_Combinations_V AS SELECT Segment1 Company, Segment2 Division, Segment3 Account, Segment4 SubAccount FROM GL_Code_Combinations WHERE Segment3 LIKE ‘45%’;

Create Sequence CREATE SEQUENCE sequence_name; CREATE SEQUENCE sequence_name INCREMENT BY increment START WITH starting_point;

Create Sequence CREATE SEQUENCE Library_Card _Number; CREATE SEQUENCE TAR_Number INCREMENT BY 10 START WITH ;

Data Conversion n Character to Numbers u to_number(‘string’) n Character to Dates u to_date(‘string’, ‘format’) n Dates to Characters u to_char(date, ‘format’) n Numbers to Characters u to_char(number, ‘format’)

SQL versus SQL*Plus n SQL is a Standard n SQL*Plus extends standard SQL u Editing u DECODE u COLUMN u SET

PL/SQL n Procedural Language n Provides Structures u Sequence u Iteration u Alternation n Create Procedures, Functions, Packages n Store Code in Database

Database Objects n Tables n Views n Sequences n Procedures n Functions n Packages n Package Bodies

Dropping Objects n Drop Table table_name; n Drop View view_name; n Drop Sequence sequence_name; n Drop Package package_name; n Drop Procedure procedure_name; n Drop Function function_name;

Database Security n Privileged Users u SYS u SYSTEM u APPLSYS u APPS n Users with Critical Data u GL, AP, AR, etc.

Database Security n Oracle Applications Tables Columns u Creation_Date u Created_By u Last_Update_Date u Last_Updated_By

Database Security n Holes In Security u Copy of Production for Development/Test u Discoverer u Express Analyzer u Third Party Applications that require DBA

Database Security n Plugging the Holes u Protect Passwords u Separate DBAs u Archive Logs

Things We Didn’t Discuss n Sets (Union, Intersection, Minus) n Joins n Indexes n Triggers n Grants n Constraints n Data Dictionary n Database Administration

The Next Step n Get A Book u Oracle Press F Oracle8 The Complete Reference u For Dummies Series u O’Reilly & Associates n Get Personal Oracle8 n Attend Classes n Practice

Questions?