TECHNOLOGY: Ask Tom. As Published In. May/June 2011
|
|
- Buck Willis
- 6 years ago
- Views:
Transcription
1 TECHNOLOGY: Ask Tom As Published In May/June 2011
2 On Deferring and Bulking Up By Tom Kyte Our technologist prefers not to defer and works to increase bulk. In your column On Constraints, Metadata, and Truth, you wrote about how constraints (or the lack thereof) can really have an impact on query plans. I have a question on constraints: given that you cannot alter an existing constraint to be deferrable you have to drop it and re-create it as deferrable would it be OK to create all constraints as deferrable, just in case you wanted to defer them someday? The short answer is no, you do not want to create all constraints as deferrable just in case. The longer answer is still no, but with an explanation. By default, constraints are implemented in an IMMEDIATE fashion integrity constraints are checked immediately after the entire SQL statement has been processed. Since Oracle8 Database, the database program has had the ability to defer constraint checking, which can be quite advantageous for various operations. One that immediately leaps to mind is the requirement to cascade an UPDATE of a primary key to the child keys. Many people claim that you should never need to do this that primary keys are immutable (I am one of those people) but many others persist in their desire to have a cascading UPDATE. Deferrable constraints make this possible. Before Oracle8 Database, it was actually possible to do a CASCADE UPDATE, but doing so involved a tremendous amount of work and had certain limitations. With deferrable constraints in Oracle8 Database and later releases, it becomes almost trivial. The code can look like this: SQL> create table parent 2 (pk int primary key ) 3 / Table created. SQL> create table child 2 (fk constraint child_fk_parent 3 references parent(pk) 4 deferrable 5 initially immediate 6 ) 7 / Table created. SQL> insert into parent values ( 1 ); 1 row created. SQL> insert into child values ( 1 ); 1 row created. The code creates a parent table, PARENT, and a child table, CHILD. The CHILD table references the PARENT table, and the constraint used to enforce that rule is called CHILD_FK_PARENT (child foreign key to parent). This constraint was created as DEFERRABLE, but it was set to INITIALLY IMMEDIATE. This means that the constraint can be deferred until the COMMIT or to some other time. By default, however, the constraint will be validated at the statement level. This is the most common use of deferrable constraints. As defined, the CHILD table behaves the same way tables always have, but the deferrable constraint makes it possible to explicitly change the table s behavior. Now let s try some data manipulation language and see what happens: SQL> update parent set pk = 2; update parent set pk = 2 * ERROR at line 1: ORA-02292: integrity constraint
3 Next Steps ASK Tom Tom Kyte answers your most difficult technology questions. Highlights from that forum appear in this column. READ more Tom Oracle Database Concepts 11g Release 2 (11.2) Expert Oracle Database Architecture: Oracle Database Programming 9i, 10g, and 11g Techniques and Solutions, Second Edition) DOWNLOAD Oracle Database 11g Release 2
4 That ll fetch 1,000 rows, process the data, and then bulk-update 1,000 rows back into the table (by rowid and with no index access). That is your first step. (There was a ton of procedural code in the original statement far too much for me to sit down and rewrite in a couple of minutes as a single SQL statement.) This first step will accomplish a few things: The COMMIT after each row is removed. Your original code was not restartable. If it failed halfway through due to an ORA-1555 or any other error, your data would be left in a very inconsistent state from which you would not be able to recover. The data would be logically corrupt. Not only that, but committing after every row is also slow. The update is done by ROWID instead of via a primary key lookup. With your original code, you perform 27,000,000 INDEX UNIQUE SCANS on your primary key. That is at least three, if not four or five, I/Os performed for each lookup! This ROWID optimization alone will probably save you around 100,000,000 I/Os. The code fetches and updates 1,000 records at a time. It eliminates 999 out of every 1,000 round-trips to the server. (Even though we are in PL/SQL, we still have round-trips to the server. They do not go over the network, but they do draw on CPU and other processing resources.) To show the net effect of this last improvement, I ll present a bit of material I use in an Efficient PL/SQL presentation. Among other things, I discuss the reasons for bulking up and when to bulk up versus when not to. In short, if you are in PL/SQL, retrieving data from the database, and not sending it back to the database, you do not need to bulk-collect. The following bit of code is a perfect example: for x in (select * from t where ) dbms_output.put_line( t.x ); end ; In this example, I retrieve data from the database via the SELECT statement but I don t go back to the database to INSERT/UPDATE/DELETE some bit of data, row by row. The SELECT statement is already using bulk processing even if it doesn t look like it. Since Oracle Database 10g, the for x in (select ) construct has been optimized to silently array-fetch 100 rows at a time. So all the SQL in the preceding code snippet already employs bulk processing. This code snippet for x in ( select * from t where ) process(x); update t set where ; end ; needs some work, however. It is doing array fetching for the SELECT but not array processing for the UPDATE. I need to revise the code to do explicit array processing. As a more concrete example, let s look at the stored procedure in Listing 3. Code Listing 3: The slow_by_slow stored procedure create or replace procedure slow_by_slow as begin for x in (select rowid rid, object_name from t t_slow_by_slow) x.object_name := substr(x.object_name,2) substr(x.object_name,1,1); update t set object_name = x.object_name where rowid = x.rid; end ;
5 T o m K y t e H e a d s h o t Tom Kyte is a database evangelist in Oracle s Server Technologies division and has worked for Oracle since He is the author of Expert Oracle Database Architecture (Apress, 2005, 2010) and Effective Oracle by Design (Oracle Press, 2003), among other books. Send us your comments this page Printer View Hardware and Software, Engineered to Work Together
Sql Server Check If Global Temporary Table Exists
Sql Server Check If Global Temporary Table Exists I am trying to create a temp table from the a select statement so that I can get the schema information from the temp I have yet to see a valid justification
More informationMASTER-DETAIL FORMS. In this Chapter, you will learn about: Master-Detail Forms Page 108
CHAPTER 4 MASTER-DETAIL FORMS CHAPTER OBJECTIVES In this Chapter, you will learn about: Master-Detail Forms Page 108 In the previous Chapters, you created and worked with forms that had only one base-table
More informationCIS 45, The Introduction. What is a database? What is data? What is information?
CIS 45, The Introduction I have traveled the length and breadth of this country and talked with the best people, and I can assure you that data processing is a fad that won t last out the year. The editor
More informationAssorted Topics Stored Procedures and Triggers Pg 1
Assorted Topics Stored Procedures and Triggers Pg 1 Stored Procedures and Triggers Ray Lockwood Points: A Stored Procedure is a user-written program stored in the database. A Trigger is a stored procedure
More informationMy experience building a custom ETL system
My experience building a custom ETL system Problems, solutions and Oracle quirks or How scary Oracle can look for a Java developer Agenda WHY do we need an ETL? HOW it works Experience: task existing solutions?
More informationEnhancements and New Features in Oracle 12c Summarized
Enhancements and New Features in Oracle 12c Summarized In this blog post I would be highlighting few of the features that are now available on Oracle Database 12cRelease. Here listing below in a summarized
More informationSQL Performance Hero and OMG Method Play the Anti-patterns Greatest Hits. Jeff Jacobs Jeffrey Jacobs & Associates
SQL Performance Hero and OMG Method Play the Anti-patterns Greatest Hits Jeff Jacobs Jeffrey Jacobs & Associates jmjacobs@jeffreyjacobs.com Survey Says DBAs Developers Architects Heavily non-oracle development
More informationLecture 08. Spring 2018 Borough of Manhattan Community College
Lecture 08 Spring 2018 Borough of Manhattan Community College 1 The SQL Programming Language Recent versions of the SQL standard allow SQL to be embedded in high-level programming languages to help develop
More informationChapter 9: Transactions
Chapter 9: Transactions modified from: Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 9: Transactions Transaction Concept Transaction State Concurrent Executions
More informationTop 5 Issues that Cannot be Resolved by DBAs (other than missed bind variables)
Top 5 Issues that Cannot be Resolved by DBAs (other than missed bind variables) March 12, 2013 Michael Rosenblum Dulcian, Inc. www.dulcian.com 1 of 43 Who Am I? Misha Oracle ACE Co-author of 2 books PL/SQL
More informationChapter 14: Transactions
Chapter 14: Transactions Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 14: Transactions Transaction Concept Transaction State Concurrent Executions Serializability
More informationORACLE DATABASE 12C INTRODUCTION
SECTOR / IT NON-TECHNICAL & CERTIFIED TRAINING COURSE In this training course, you gain the skills to unleash the power and flexibility of Oracle Database 12c, while gaining a solid foundation of database
More informationPASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year
PASS4TEST \ We offer free update service for one year Exam : 1z0-071 Title : Oracle Database 12c SQL Vendor : Oracle Version : DEMO Get Latest & Valid 1z0-071 Exam's Question and Answers 1 from Pass4test.
More informationLesson B Objectives IF/THEN. Chapter 4B: More Advanced PL/SQL Programming
Chapter 4B: More Advanced PL/SQL Programming Monday 2/23/2015 Abdou Illia MIS 4200 - Spring 2015 Lesson B Objectives After completing this lesson, you should be able to: Create PL/SQL decision control
More information5. Single-row function
1. 2. Introduction Oracle 11g Oracle 11g Application Server Oracle database Relational and Object Relational Database Management system Oracle internet platform System Development Life cycle 3. Writing
More information5 Integrity Constraints and Triggers
5 Integrity Constraints and Triggers 5.1 Integrity Constraints In Section 1 we have discussed three types of integrity constraints: not null constraints, primary keys, and unique constraints. In this section
More informationConsistency The DBMS must ensure the database will always be in a consistent state. Whenever data is modified, the database will change from one
Data Management We start our studies of Computer Science with the problem of data storage and organization. Nowadays, we are inundated by data from all over. To name a few data sources in our lives, we
More informationCHAPTER: TRANSACTIONS
CHAPTER: TRANSACTIONS CHAPTER 14: TRANSACTIONS Transaction Concept Transaction State Concurrent Executions Serializability Recoverability Implementation of Isolation Transaction Definition in SQL Testing
More informationComments will be open in case any of my imaginary readers want to chime in with advice or encouragement.
Why We re Here I play a baseball sim called Out of the Park Baseball. I have been playing it since 2005. On and off for a couple of years, I have been fooling around with databases. I m not a programmer
More informationCS6312 DATABASE MANAGEMENT SYSTEMS LABORATORY L T P C
CS6312 DATABASE MANAGEMENT SYSTEMS LABORATORY L T P C 0 0 3 2 LIST OF EXPERIMENTS: 1. Creation of a database and writing SQL queries to retrieve information from the database. 2. Performing Insertion,
More informationCHAPTER4 CONSTRAINTS
CHAPTER4 CONSTRAINTS LEARNING OBJECTIVES After completing this chapter, you should be able to do the following: Explain the purpose of constraints in a table Distinguish among PRIMARY KEY, FOREIGN KEY,
More informationOracle Database: SQL and PL/SQL Fundamentals NEW
Oracle Database: SQL and PL/SQL Fundamentals NEW Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training delivers the fundamentals of SQL and PL/SQL along with the
More informationAdvanced Oracle Performance Troubleshooting. Query Transformations Randolf Geist
Advanced Oracle Performance Troubleshooting Query Transformations Randolf Geist http://oracle-randolf.blogspot.com/ http://www.sqltools-plusplus.org:7676/ info@sqltools-plusplus.org Independent Consultant
More informationLab IV. Transaction Management. Database Laboratory
Lab IV Transaction Management Database Laboratory Objectives To work with transactions in ORACLE To study the properties of transactions in ORACLE Database integrity must be controlled when access operations
More informationDatabase Management System Dr. S. Srinath Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No.
Database Management System Dr. S. Srinath Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No. # 13 Constraints & Triggers Hello and welcome to another session
More informationLab # 2. Data Definition Language (DDL) Eng. Alaa O Shama
The Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4113: Database Lab Lab # 2 Data Definition Language (DDL) Eng. Alaa O Shama October, 2015 Objective To be familiar
More informationThe Structured Query Language Get Started
The Structured Query Language Get Started Himadri Barman 0. Prerequisites: A database is an organized collection of related data that can easily be retrieved and used. By data, we mean known facts that
More informationChapter 15: Transactions
Chapter 15: Transactions Chapter 15: Transactions Transaction Concept Transaction State Concurrent Executions Serializability Recoverability Implementation of Isolation Transaction Definition in SQL Testing
More informationOracle Database: Introduction to SQL/PLSQL Accelerated
Oracle University Contact Us: Landline: +91 80 67863899 Toll Free: 0008004401672 Oracle Database: Introduction to SQL/PLSQL Accelerated Duration: 5 Days What you will learn This Introduction to SQL/PLSQL
More informationRoadmap of This Lecture
Transactions 1 Roadmap of This Lecture Transaction Concept Transaction State Concurrent Executions Serializability Recoverability Implementation of Isolation Testing for Serializability Transaction Definition
More informationDifficult I.Q on Databases, asked to SCTPL level 2 students 2015
Do you know the basic memory structures associated with any Oracle Database. (W.r.t 10g / 11g / 12c)? The basic memory structures associated with Oracle Database include: System Global Area (SGA) The SGA
More informationTable of Contents. PDF created with FinePrint pdffactory Pro trial version
Table of Contents Course Description The SQL Course covers relational database principles and Oracle concepts, writing basic SQL statements, restricting and sorting data, and using single-row functions.
More informationLecture 20 Transactions
CMSC 461, Database Management Systems Spring 2018 Lecture 20 Transactions These slides are based on Database System Concepts 6 th edition book (whereas some quotes and figures are used from the book) and
More informationIdentifying and Fixing Parameter Sniffing
Identifying and Fixing Parameter Sniffing Brent Ozar www.brentozar.com sp_blitz sp_blitzfirst email newsletter videos SQL Critical Care 2017 Brent Ozar Unlimited. All rights reserved. 1 This is genuinely
More informationYou Don t Need a DBA. What Every PHP Developer Should Know about Database Development. Maggie Nelson php works 2007
You Don t Need a DBA or What Every PHP Developer Should Know about Database Development Maggie Nelson php works 2007 Database Developer PHP Developer = DBA System Administrator DB Developer: Help! My database
More informationOracle Warehouse Builder. Oracle Warehouse Builder. Quick Start Guide. Jean-Pierre Dijcks, Igor Machin, March 9, 2004
Oracle Warehouse Builder Quick Start Guide Jean-Pierre Dijcks, Igor Machin, March 9, 2004 What Can You Expect from this Starter Kit? First and foremost, you can expect a helping hand in navigating through
More informationTable of Contents. Oracle SQL PL/SQL Training Courses
Table of Contents Overview... 7 About DBA University, Inc.... 7 Eligibility... 8 Pricing... 8 Course Topics... 8 Relational database design... 8 1.1. Computer Database Concepts... 9 1.2. Relational Database
More informationChapter 14: Transactions
Chapter 14: Transactions Transaction Concept Transaction Concept A transaction is a unit of program execution that accesses and possibly updates various data items. E.g. transaction to transfer $50 from
More informationDatabase Developers Forum APEX
Database Developers Forum APEX 20.05.2014 Antonio Romero Marin, Aurelien Fernandes, Jose Rolland Lopez De Coca, Nikolay Tsvetkov, Zereyakob Makonnen, Zory Zaharieva BE-CO Contents Introduction to the Controls
More informationAdvanced Databases. Transactions. Nikolaus Augsten. FB Computerwissenschaften Universität Salzburg
Advanced Databases Transactions Nikolaus Augsten nikolaus.augsten@sbg.ac.at FB Computerwissenschaften Universität Salzburg Version October 18, 2017 Wintersemester 2017/18 Adapted from slides for textbook
More informationOracle Database 11g: SQL and PL/SQL Fundamentals
Oracle University Contact Us: +33 (0) 1 57 60 20 81 Oracle Database 11g: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn In this course, students learn the fundamentals of SQL and PL/SQL
More informationOracle Database: Introduction to SQL
Oracle University Contact Us: +27 (0)11 319-4111 Oracle Database: Introduction to SQL Duration: 5 Days What you will learn This Oracle Database: Introduction to SQL training helps you write subqueries,
More informationForeign and Primary Keys in RDM Embedded SQL: Efficiently Implemented Using the Network Model
Foreign and Primary Keys in RDM Embedded SQL: Efficiently Implemented Using the Network Model By Randy Merilatt, Chief Architect - January 2012 This article is relative to the following versions of RDM:
More informationLab # 4. Data Definition Language (DDL)
Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4113: Lab # 4 Data Definition Language (DDL) Eng. Haneen El-Masry November, 2014 2 Objective To be familiar with
More informationUpdate The Statistics On A Single Table+sql Server 2005
Update The Statistics On A Single Table+sql Server 2005 There are different ways statistics are created and maintained in SQL Server: to find out all of those statistics created by SQL Server Query Optimizer
More informationIntegrity constraints, relationships. CS634 Lecture 2
Integrity constraints, relationships CS634 Lecture 2 Foreign Keys Defined in Sec. 3.2.2 without mentioning nulls. Nulls covered in Sec. 5.6 First example: nice not-null foreign key column: create table
More informationFile Processing Approaches
Relational Database Basics Review Overview Database approach Database system Relational model File Processing Approaches Based on file systems Data are recorded in various types of files organized in folders
More informationOracle Database: Introduction to SQL Ed 2
Oracle University Contact Us: +40 21 3678820 Oracle Database: Introduction to SQL Ed 2 Duration: 5 Days What you will learn This Oracle Database 12c: Introduction to SQL training helps you write subqueries,
More information.NET Database Technologies. Entity Framework: Queries and Transactions
.NET Database Technologies Entity Framework: Queries and Transactions ORMs and query languages l With an ORM, queries must define data to be returned and criteria in terms of domain model objects and their
More informationData, Information, and Databases
Data, Information, and Databases BDIS 6.1 Topics Covered Information types: transactional vsanalytical Five characteristics of information quality Database versus a DBMS RDBMS: advantages and terminology
More informationSlides by: Ms. Shree Jaswal
Slides by: Ms. Shree Jaswal A trigger is a statement that is executed automatically by the system as a side effect of a modification to the database. To design a trigger mechanism, we must: Specify the
More informationIntroduction to SQL/PLSQL Accelerated Ed 2
Oracle University Contact Us: Local: 1800 103 4775 Intl: +91 80 67863102 Introduction to SQL/PLSQL Accelerated Ed 2 Duration: 5 Days What you will learn This Introduction to SQL/PLSQL Accelerated course
More informationMySQL 5.0 Stored Procedures, VIEWs and Triggers MySQL UC 2005, Santa Clara
MySQL 5.0 Stored Procedures, VIEWs and Triggers jan@mysql.com MySQL UC 2005, Santa Clara Trees in SQL The problem of how to handle trees in SQL has been talked about alot. The basic 3 ways are: store the
More informationBest Practices for Performance Part 2.NET and Oracle Database
Best Practices for Performance Part 2.NET and Oracle Database Alex Keh Christian Shay Product Managers Server Technologies September 19, 2016 Program Agenda 1 2 3 4 Caching SQL Tuning Advisor Oracle Performance
More information2. Use elementary row operations to rewrite the augmented matrix in a simpler form (i.e., one whose solutions are easy to find).
Section. Gaussian Elimination Our main focus in this section is on a detailed discussion of a method for solving systems of equations. In the last section, we saw that the general procedure for solving
More informationReferences. Transaction Management. Database Administration and Tuning 2012/2013. Chpt 14 Silberchatz Chpt 16 Raghu
Database Administration and Tuning 2012/2013 Transaction Management Helena Galhardas DEI@Técnico DMIR@INESC-ID Chpt 14 Silberchatz Chpt 16 Raghu References 1 Overall DBMS Structure Transactions Transaction
More informationData Manipulation (DML) and Data Definition (DDL)
Data Manipulation (DML) and Data Definition (DDL) 114 SQL-DML Inserting Tuples INSERT INTO REGION VALUES (6,'Antarctica','') INSERT INTO NATION (N_NATIONKEY, N_NAME, N_REGIONKEY) SELECT NATIONKEY, NAME,
More informationQuery Optimizer MySQL vs. PostgreSQL
Percona Live, Santa Clara (USA), 24 April 2018 Christian Antognini @ChrisAntognini antognini.ch/blog BASEL BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENEVA HAMBURG COPENHAGEN LAUSANNE MUNICH
More informationOracle 9i Application Development and Tuning
Index 2NF, NOT 3NF or BCNF... 2:17 A Anomalies Present in this Relation... 2:18 Anomalies (Specific) in this Relation... 2:4 Application Design... 1:28 Application Environment... 1:1 Application-Specific
More informationWith Tom Kyte and Andy Mendelsohn. plus special guest appearances: Dan McGhan, Natalka Roshak, Chris Saxon
With Tom Kyte and Andy Mendelsohn plus special guest appearances: Dan McGhan, Natalka Roshak, Chris Saxon TWEET AWAY! #yessql Copyright Copyright 2014, 2014, Oracle Oracle and/or and its affiliates. /
More informationManual Trigger Sql Server 2008 Insert Update Delete
Manual Trigger Sql Server 2008 Insert Update Delete Am new to SQL scripting and SQL triggers, any help will be appreciated ://sql-serverperformance.com/2010/transactional-replication-2008-r2/ qf.customer_working_hours
More informationUltra-High Performance SQL and PL/SQL in Batch Processing
Ultra-High Performance SQL and PL/SQL in Batch Processing Dr. Paul Dorsey Dulcian, Inc. www.dulcian.com December 13, 2005 The Problem: Overview Processing large amounts of data using SQL and PL/SQL poses
More informationSQL DDL II. CS121: Relational Databases Fall 2017 Lecture 8
SQL DDL II CS121: Relational Databases Fall 2017 Lecture 8 Last Lecture 2 Covered SQL constraints NOT NULL constraints CHECK constraints PRIMARY KEY constraints FOREIGN KEY constraints UNIQUE constraints
More informationSQL Interview Questions
SQL Interview Questions SQL stands for Structured Query Language. It is used as a programming language for querying Relational Database Management Systems. In this tutorial, we shall go through the basic
More informationTransaction Isolation Level in ODI
In this post I will be explaining the behaviour in Oracle 11g and regarding the ODI versions, there is not much difference between ODI 11g and 12c. If you see the drop down in 11g (11.1.1.9) procedure,
More informationPart VII Data Protection
Part VII Data Protection Part VII describes how Oracle protects the data in a database and explains what the database administrator can do to provide additional protection for data. Part VII contains the
More informationGeneral mapp Solutions FAQ
General mapp Solutions FAQ Cherwell mergeable applications (mapp solutions) are an easy way to extend the Cherwell Service Management platform and integrate new functionality including Lync, Express Software
More informationToad for Oracle Suite 2017 Functional Matrix
Toad for Oracle Suite 2017 Functional Matrix Essential Functionality Base Xpert Module (add-on) Developer DBA Runs directly on Windows OS Browse and navigate through objects Create and manipulate database
More informationOracle Database 12c SQL Fundamentals
Course Overview This course takes a unique approach to SQL training in that it incorporates data modeling theory, relational database theory, graphical depictions of theoretical concepts and numerous examples
More informationUsing Thick Database Principles to Leverage Oracle SQL and PL/SQL Part III:
Using Thick Database Principles to Leverage Oracle SQL and PL/SQL Part III: Implementation Techniques Peter Koletzke Technical Director & Principal Instructor Me 34 yrs. database industry 30 yrs. consulting
More informationIntroduction p. 1 The Logical and Physical View of Tables p. 1 Database Types p. 4 NULLs p. 6 DDL and DML Statements p. 7 Column and Table Constraint
Preface p. xv Introduction p. 1 The Logical and Physical View of Tables p. 1 Database Types p. 4 NULLs p. 6 DDL and DML Statements p. 7 Column and Table Constraint Clauses p. 7 Sample Database p. 9 A Quick
More informationOracle Database: SQL and PL/SQL Fundamentals Ed 2
Oracle University Contact Us: Local: 1800 103 4775 Intl: +91 80 67863102 Oracle Database: SQL and PL/SQL Fundamentals Ed 2 Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals
More informationChapter 2. DB2 concepts
4960ch02qxd 10/6/2000 7:20 AM Page 37 DB2 concepts Chapter 2 Structured query language 38 DB2 data structures 40 Enforcing business rules 49 DB2 system structures 52 Application processes and transactions
More informationOracle Login Max Length Table Name 11g Column Varchar2
Oracle Login Max Length Table Name 11g Column Varchar2 Get max(length(column)) for all columns in an Oracle table tables you are looking at BEGIN -- loop through column names in all_tab_columns for a given
More informationDrop Table If Exists Sql Command Not Properly Ended
Drop Table If Exists Sql Command Not Properly Ended Wait, this does not work! SQL_ drop table if exists t, drop table if exists t * ERROR at line 1: ORA-00933: SQL command not properly ended. Okay. It
More informationOracle Create Table Foreign Key On Delete No
Oracle Create Table Foreign Key On Delete No Action Can I create a foreign key against only part of a composite primary key? For example, if you delete a row from the ProductSubcategory table, it could
More informationOracle SQL. murach s. and PL/SQL TRAINING & REFERENCE. (Chapter 2)
TRAINING & REFERENCE murach s Oracle SQL and PL/SQL (Chapter 2) works with all versions through 11g Thanks for reviewing this chapter from Murach s Oracle SQL and PL/SQL. To see the expanded table of contents
More informationREPORT ON SQL TUNING USING INDEXING
REPORT ON SQL TUNING USING INDEXING SUBMITTED BY SRUNOKSHI KANIYUR PREMA NEELAKANTAN CIS -798 INDEPENDENT STUDY COURSE PROFESSOR Dr.TORBEN AMTOFT Kansas State University Page 1 of 38 TABLE OF CONTENTS
More informationCopy Data From One Schema To Another In Sql Developer
Copy Data From One Schema To Another In Sql Developer The easiest way to copy an entire Oracle table (structure, contents, indexes, to copy a table from one schema to another, or from one database to another,.
More informationMultiprocessor Cache Coherency. What is Cache Coherence?
Multiprocessor Cache Coherency CS448 1 What is Cache Coherence? Two processors can have two different values for the same memory location 2 1 Terminology Coherence Defines what values can be returned by
More informationThere is no free lunch! SERIALIZABILITY. NoCOUG Summer Conference. By Iggy Fernandez. Aug 18, 2005
There is no free lunch! By Iggy Fernandez NoCOUG Summer Conference Aug 18, 2005 1 CAVEAT LECTOR! Don t believe (blindly) anything I say What you are about to see and hear may be false or deficient in some
More informationOracle Database: Introduction to SQL
Oracle University Contact Us: (+202) 35 35 02 54 Oracle Database: Introduction to SQL Duration: 5 Days What you will learn View a newer version of this course This Oracle Database: Introduction to SQL
More informationIntroduction to Computer Science and Business
Introduction to Computer Science and Business This is the second portion of the Database Design and Programming with SQL course. In this portion, students implement their database design by creating a
More informationCSE 530A. Inheritance and Partitioning. Washington University Fall 2013
CSE 530A Inheritance and Partitioning Washington University Fall 2013 Inheritance PostgreSQL provides table inheritance SQL defines type inheritance, PostgreSQL's table inheritance is different A table
More informationTransaction Concept. Chapter 15: Transactions. Example of Fund Transfer. ACID Properties. Example of Fund Transfer (Cont.)
Chapter 15: Transactions Transaction Concept - ACID Transaction States Concurrent Executions Serializability Testing for Serializability Recoverability Transaction Definition in SQL Transaction Concept
More informationTransactions and Locking. Rose-Hulman Institute of Technology Curt Clifton
Transactions and Locking Rose-Hulman Institute of Technology Curt Clifton Outline ACID Transactions COMMIT and ROLLBACK Managing Transactions Locks The Setting Database systems are normally being accessed
More informationTopics covered 10/12/2015. Pengantar Teknologi Informasi dan Teknologi Hijau. Suryo Widiantoro, ST, MMSI, M.Com(IS)
Pengantar Teknologi Informasi dan Teknologi Hijau Suryo Widiantoro, ST, MMSI, M.Com(IS) 1 Topics covered 1. Basic concept of managing files 2. Database management system 3. Database models 4. Data mining
More information1.204 Computer Algorithms in Systems Engineering Spring 2010 Problem Set 2: Municipal Database Due: 12 noon, Wednesday, February 24, 2010
1.204 Computer Algorithms in Systems Engineering Spring 2010 Problem Set 2: Municipal Database Due: 12 noon, Wednesday, February 24, 2010 1. Problem statement You are given a realistic, though fictitious,
More informationDB2 SQL Class Outline
DB2 SQL Class Outline The Basics of SQL Introduction Finding Your Current Schema Setting Your Default SCHEMA SELECT * (All Columns) in a Table SELECT Specific Columns in a Table Commas in the Front or
More informationChapter 15: Transactions
Chapter 15: Transactions! Transaction Concept! Transaction State! Implementation of Atomicity and Durability! Concurrent Executions! Serializability! Recoverability! Implementation of Isolation! Transaction
More informationEfficient Object-Relational Mapping for JAVA and J2EE Applications or the impact of J2EE on RDB. Marc Stampfli Oracle Software (Switzerland) Ltd.
Efficient Object-Relational Mapping for JAVA and J2EE Applications or the impact of J2EE on RDB Marc Stampfli Oracle Software (Switzerland) Ltd. Underestimation According to customers about 20-50% percent
More informationCourse Outline and Objectives: Database Programming with SQL
Introduction to Computer Science and Business Course Outline and Objectives: Database Programming with SQL This is the second portion of the Database Design and Programming with SQL course. In this portion,
More informationQuery Optimizer MySQL vs. PostgreSQL
Percona Live, Frankfurt (DE), 7 November 2018 Christian Antognini @ChrisAntognini antognini.ch/blog BASEL BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENEVA HAMBURG COPENHAGEN LAUSANNE MUNICH STUTTGART
More informationUNIT 2 Set Operators
Course Title: Database Systems ( M.C.A 1 st Semester ) (Evening Batch) UNIT 2 Set Operators Set operators are used to join the results of two (or more) SELECT statements.the SET operators available in
More informationManaging Group Policy application and infrastructure
CHAPTER 5 Managing Group Policy application and infrastructure There is far more to managing Group Policy than knowing the location of specific policy items. After your environment has more than a couple
More information14 Index selection guidelines 12/08/17 11:42 PM. Index selection guidelines
Index selection guidelines 1 To use an index or not to use an index? Main principle Do not build index unless some query (including the query components of updates and deletions) benefits from it Selectivity
More informationOracle Class VI. Exception Block Cursors For Loops
Oracle Class VI Exception Block Cursors For Loops Pl/sql some more basics Loop through records, manipulating them one at a time. Keep code secure by offering encryption, and storing code permanently on
More informationChapter. Relational Database Concepts COPYRIGHTED MATERIAL
Chapter Relational Database Concepts 1 COPYRIGHTED MATERIAL Every organization has data that needs to be collected, managed, and analyzed. A relational database fulfills these needs. Along with the powerful
More informationCommon Coding and Design Mistakes (that really mess up performance)
SAGE Computing Services Customised Oracle Training Workshops and Consulting Common Coding and Design Mistakes (that really mess up performance) Penny Cookson SAGE Computing Services www.sagecomputing.com.au
More informationOracle Performance Tuning. Overview of performance tuning strategies
Oracle Performance Tuning Overview of performance tuning strategies Allan Young June 2008 What is tuning? Group of activities used to optimize and homogenize the performance of a database Maximize use
More information