Self-test Oracle fundamentals

Similar documents
Managing Objects with Data Dictionary Views. Copyright 2006, Oracle. All rights reserved.

Oracle Database 10g Express

DBMS Questions. 3.) For which two constraints are indexes created when the constraint is added?

Oracle. Brief Course Content This course can be done in modular form as per the detail below. ORA-1 Oracle Database 10g: SQL 4 Weeks 4000/-

A basic create statement for a simple student table would look like the following.

Oracle Database 10g: Introduction to SQL

Database 10g Edition: All possible 10g features, either bundled or available at additional cost.

Objectives. Oracle SQL and SQL*PLus. Database Objects. What is a Sequence?

Oracle DBA Course Contents

5. CHANGING STRUCTURE AND DATA

How To Create A Table In Sql (Ahem)

D61830GC30. MySQL for Developers. Summary. Introduction. Prerequisites. At Course completion After completing this course, students will be able to:

Delivery Method: Instructor-led, group-paced, classroom-delivery learning model with structured, hands-on activities.

2. Oracle SQL*PLUS Winter Some SQL Commands. To connect to a CS server, do:

Physical Design. Meeting the needs of the users is the gold standard against which we measure our success in creating a database.

Optimizing the Performance of the Oracle BI Applications using Oracle Datawarehousing Features and Oracle DAC

Oracle Database 11g Express Edition PL/SQL and Database Administration Concepts -II

MyOra 3.0. User Guide. SQL Tool for Oracle. Jayam Systems, LLC

Part 5: More Data Structures for Relations

Oracle Database 11 g Performance Tuning. Recipes. Sam R. Alapati Darl Kuhn Bill Padfield. Apress*

CSC 443 Data Base Management Systems. Basic SQL

Table Backup and Recovery using SQL*Plus

Database Extension 1.5 ez Publish Extension Manual

3.GETTING STARTED WITH ORACLE8i

Migrate Topaz databases from One Server to Another

Restore and Recovery Tasks. Copyright 2009, Oracle. All rights reserved.

Oracle Architecture. Overview

Oracle Database: SQL and PL/SQL Fundamentals NEW

FileMaker 14. ODBC and JDBC Guide

Database Administration with MySQL

SQL Server An Overview

Oracle 11g Database Administration

Topics Advanced PL/SQL, Integration with PROIV SuperLayer and use within Glovia

1 Changes in this release

Working with DB2 UDB objects

2874CD1EssentialSQL.qxd 6/25/01 3:06 PM Page 1 Essential SQL Copyright 2001 SYBEX, Inc., Alameda, CA

Oracle Database 11g: SQL Tuning Workshop

types, but key declarations and constraints Similar CREATE X commands for other schema ëdrop X name" deletes the created element of beer VARCHARè20è,

Database Extensions Visual Walkthrough. PowerSchool Student Information System

Oracle 10g PL/SQL Training

AV-004: Administering and Programming with ORACLE

Expert Oracle. Database Architecture. Techniques and Solutions. 10gr, and 11g Programming. Oracle Database 9/, Second Edition.

Programming with SQL

Database Programming with PL/SQL: Learning Objectives

FileMaker 13. ODBC and JDBC Guide

MyOra 3.5. User Guide. SQL Tool for Oracle. Kris Murthy

Programming Database lectures for mathema

Many DBA s are being required to support multiple DBMS s on multiple platforms. Many IT shops today are running a combination of Oracle and DB2 which

INFORMATION BROCHURE Certificate Course in Web Design Using PHP/MySQL

Oracle Database Development Standards For DNR Staff and Contractors. Table of Contents


Oracle Database 12c: Introduction to SQL Ed 1.1

HP Quality Center. Upgrade Preparation Guide

Oracle Database: SQL and PL/SQL Fundamentals

Introduction to the Oracle DBMS

Changes for Release 3.0 from Release 2.1.1

DbSchema Tutorial with Introduction in SQL Databases

Chapter 6: Physical Database Design and Performance. Database Development Process. Physical Design Process. Physical Database Design

DBA Tutorial Kai Voigt Senior MySQL Instructor Sun Microsystems Santa Clara, April 12, 2010

IT2305 Database Systems I (Compulsory)

Porting from Oracle to PostgreSQL

Introduction to SQL and database objects

Instant SQL Programming

Introduction to SQL Tuning. 1. Introduction to SQL Tuning SkillBuilders, Inc. SKILLBUILDERS

Information Systems SQL. Nikolaj Popov

SQL Simple Queries. Chapter 3.1 V3.0. Napier University Dr Gordon Russell

Using SQL Server Management Studio

SQL Databases Course. by Applied Technology Research Center. This course provides training for MySQL, Oracle, SQL Server and PostgreSQL databases.

Oracle Database: SQL and PL/SQL Fundamentals

SAP Sybase Adaptive Server Enterprise Shrinking a Database for Storage Optimization 2013

PeopleSoft DDL & DDL Management

FileMaker 12. ODBC and JDBC Guide

How To Understand The Error Codes On A Crystal Reports Print Engine

MS-40074: Microsoft SQL Server 2014 for Oracle DBAs

Oracle server: An Oracle server includes an Oracle Instance and an Oracle database.

Oracle Database Links Part 2 - Distributed Transactions Written and presented by Joel Goodman October 15th 2009

Fundamentals of Database Design

Guide to Upsizing from Access to SQL Server

Services. Relational. Databases & JDBC. Today. Relational. Databases SQL JDBC. Next Time. Services. Relational. Databases & JDBC. Today.

news from Tom Bacon about Monday's lecture

Oracle Architecture, Concepts & Facilities

IceWarp Server Upgrade

Developing SQL and PL/SQL with JDeveloper

Developing Web Applications for Microsoft SQL Server Databases - What you need to know

Oracle Database Security

Creating Database Tables in Microsoft SQL Server

CA DataMinder. Database Guide. Release th Edition

Database Management Systems Comparative Study: Performances of Microsoft SQL Server Versus Oracle

Oracle Backup and Recover 101. Osborne Press ISBN

Performance Tuning for the Teradata Database

Oracle Database: Introduction to SQL

Oracle SQL. Course Summary. Duration. Objectives

Geodatabase Programming with SQL

Oracle Database: SQL and PL/SQL Fundamentals NEW

Virtual Private Database Features in Oracle 10g.

Oracle USF

Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification

SQL. Short introduction

IBM DB2: LUW Performance Tuning and Monitoring for Single and Multiple Partition DBs

Transcription:

Self-test Oracle fundamentals Document: e0475test.fm 05/01/2016 ABIS Training & Consulting P.O. Box 220 B-3000 Leuven Belgium TRAINING & CONSULTING

INTRODUCTION TO THE SELF-TEST ORACLE FUNDAMENTALS The following questionnaire might help to check your personal knowledge of the various topics discussed in the Oracle fundamentals course, in order to find out whether it is useful for you to follow this course. In this test, 25 questions are asked. For some questions, there is more than one correct answer. In such cases this will be clearly indicated. A question is answered correctly only if all correct answers are given. This test will take approximately 10 minutes. You can find the right answers and guidelines for the evaluation at the end of this document. Good luck! 05/01/2016 Self-test Oracle fundamentals 2

QUESTIONS SELF-TEST ORACLE FUNDAMENTALS 1. Which of the following are SQL commands? (2 answers) Start script1 Analyze table persons compute statistics If vcono=10 then List 10 30 Create procedure Pinsert... 2. What is the name of the Oracle memory shared by Oracle processes? O (a) The PGA O (b) The SGA O (c) The BUFPOOL O (d) The MGA 3. Which of the following object orderings is correct? O (a) Instance - Tablespace - Database - Table - Rows O (b) Instance - Database - Tablespace - Table - Rows O (c) Instance - Database - Table - Tablespace - Rows O (d) Database - Instance - Tablespace - Table - Rows 4. An Oracle instance is: O (a) The ensemble of files useful for the functioning of an Oracle database. O (b) The process and the memory areas used for the functioning of an Oracle database. O (c) The installation phase of the Oracle software. O (d) A database which does not want to start up. 05/01/2016 Self-test Oracle fundamentals 3

5. I connect to an Oracle server running on Linux, from SQL*Plus running on my Windows computer. Which of the following is true? O (a) The listener process must be running on my Windows machine. O (b) The host string/connect string allows me to connect to a very specific database. O (c) I cannot connect since with an Oracle server on Linux, the client application must also run on Linux. O (d) The name of the host string/connect string must be identical to the Oracle server name. 6. Consider the following commands: create table comp (cono number(3), coname varchar(30) not null, cocountr char(1) ); alter table comp add primary key (cono); create table pers (pno number(3) primary key, pfname varchar(20), plname varchar(20), psex char check (psex in ('F','M')), ptel char(12) unique, pa_cono number, constraint fk_pa_cono foreign key (pa_cono) references comp on delete cascade ); alter table pers modify plname varchar2(20) not null; alter table comp add constraint ck_country check (cocountr in ('B','F','L','NL')); Which rows cannot be found in this table? COMP (3 answers) 10 ABIS B 10 ABIS NL 11 ABIS NL 12 B 13 SBB F [_] [f] 14 NASA B PERS (4 answers) [_] [g] 1A Wim Dooshekspij M 999-987-7898 10 [_] [h] 2 Eddy Martens X +32 789-887-8767 10 [_] [i] 3 Peter Nap M ab3369886 13 [_] [j] 4 Halley F 32-788 213 13 [_] [k] 5 Louis Trump M 33365656 15 05/01/2016 Self-test Oracle fundamentals 4

7. Take a look at the following instruction. create sequence seq_1 start with 100 increment by 10 nocycle nocache Transaction 1 requests 2 digits, and commits. Transaction 2 starts while transaction 1 is running, requests 2 digits, and rolls back. Afterwards, when both transactions are finished, Transaction 1 requests again a digit. What will the digit look like? O (a) 120 O (b) 140 O (c) 160 O (d) Can not be specified - after all a sequence is a random digit generator! 8. Take a look at the following situation. alter table sales_item add constraint fk1 foreign key (sno) references sales; I get the following error message - what does this error means? ORA-xxxx: parent key not found O (a) One of the values in the sales_item table, column sno (the foreign key) has no corresponding values in the sales table (primary key). O (b) The sales table has no primary key - and a foreign key can only reference a primary key. O (c) At creation time of a foreign key it is mandatory to specify a modification rule, like on delete restrict, on delete cascade. O (d) The user executing this statement has unsufficient privileges on the sales table. After the user has been granted the references privilege on the sales table, the problem should be solved. 9. Regarding a tablespace, indicate which of the statements are true (2 answers). A tablespace cannot contain more than one table. A tablespace contains either tables or indexes. A tablespace may contain at the same time tables and indexes. A tablespace can span more than one file. A tablespace has a fixed size and cannot be enlarged. 05/01/2016 Self-test Oracle fundamentals 5

10. Which type of data doesn t exist or cannot be used for a column in an Oracle table? (2 answers) biginteger number varchar2 boolean date 11. Regarding tables, indicate which statements are true. (4 answers) [_] [f] [_] [g] [_] [h] [_] [i] A table must always contain a primary key. A table must always be placed in a single file. The structure of a table is defined once and forever, and cannot be changed. A primary key uses a unique index. A column on which a unique key has been defined may contain NULL values. It is possible to redefine the order of columns in a table without recreating the table. It is possible to define several constraints on the same column. An empty table does not take any place on the hard disk. It is possible to temporarily deactivate a primary key. 12. What could you certify about XYZ in the following instruction? select * from XYZ O (a) XYZ is a table, a view or a synonym. O (b) XYZ is a table or a view. O (c) XYZ can only be a table. O (d) XYZ has been created in the schema of the user executing the statement. 13. Which statement concerning indexes is always false? O (a) An index can be created as a reverse index or as a unique index. O (b) Normally it is never up to the developer to determine whether an index should be used or not. O (c) When a table has to be reorganized, it is often useful to also reorganise the indexes on that table. O (d) Even tables can be created as a balanced index structure: they are called index-only tables. O (e) The synchronization of indexes with tables is a manual process, that the DBA has to perform regularly. 05/01/2016 Self-test Oracle fundamentals 6

14. One wants to control the value of a column such that it may not be augmented by more than 10 percent. To implement this rule, which of the following can be used? O (a) A CHECK constraint on the column, with an appropriate rule. O (b) A trigger on the table. O (c) A view which will filter the allowed modifications. O (d) It is impossible to implement this in the database, one has to do it in the application. 15. I have created a user-defined function get_price(n) which returns the price of product n. To know the price of product 5, which of the following commands should be used in SQL*Plus? O (a) start get_price(5) O (b) execute get_price(5) O (c) execute function (get_price,5) O (d) select get_price(5) from dual 16. As an ordinary user, which of the following catalog tables can I consult? (3 answers) user_tables v$datafiles dba_tables all_tables cat 17. Amongst the following privileges, which one is considered an object privilege? O (a) create session O (b) select any table O (c) delete on tutcompanies O (d) grant any object privilege 18. A user has created a table (tutcompanies) and also a stored procedure (pinsert) which allows for rows to be added to that table. In order for me to be able to add rows to that table, what must that user do? (2 answers) grant execute on pinsert to myusername grant execute on myusername.pinsert to myusername grant select on tutcompanies to myusername grant insert on tutcompanies to myusername grant select on tutcompanies, execute on pinsert to myusername 05/01/2016 Self-test Oracle fundamentals 7

19. For which tasks can the sqlldr utility be used? O (a) Export an Oracle table to a flat text file on my hard disk. O (b) Move a table from one schema to another. O (c) Import a text file with my client information into an Oracle table. O (d) Move all objects of a certain user to another Oracle server. 20. For which tasks can the exp/imp utility be used? (2 answers) Export an Oracle table to a flat text file on my hard disk. Move a table from one schema to another. Import a text file with my client information into an Oracle table. Move all objects of a certain user to another Oracle server. 21. Consider the following sqlldr-action: sqlload userid = system/manager@tsti control = test.ctl load data infile test.dat badfile test.bad discardfile test.dsc discardmax 10 replace continueif this (1) = * into table customers (custno position(1:5) integer external, custname position(6:20) char, custadr position(21:29) char) Which of the following statements are true? (2 answers) [_] [f] [_] [g] The name of the file containing the sqlldr instructions is test.dat. The name of the file containing the sqlldr instructions is test.ctl. The password of the user who executes sqlldr is system. The rows to load are unconditionally added to the table. The character * which is mentioned here is in the file test.dat, in the first column. The complete name of the table being loaded is tsti.system.customers. The records which do not satisfy a constraint defined on the database level will be written to the file test.bad. 05/01/2016 Self-test Oracle fundamentals 8

22. One of the following statements is NOT correct. O (a) Oracle transforms an SQL statement to a Query Execution Plan and stores it in the Oracle shared pool. O (b) The optimizer uses statistics to generate an optimal, efficient QEP. O (c) The use of (host)variables in a query has no impact on the behaviour of Oracle in the context of optimization and QEP generation. O (d) The more a QEP can be reused, the more performance is increased. 23. Think about the properties of views. Which of the statements is not correct? O (a) One single view can be created on several tables. O (b) It is often, but not always, possible to modify the underlying basetable-rows by means of views (update instruction). O (c) When a table is dropped, all views on that table are automatically dropped as well. O (d) When trying to add rows to a view, the viewdefinition and the basetable definition determine whether this operation will succeed or not. 24. Consider the following result and indicate which statement is true. 0 SELECT STATEMENT Optimizer=CHOOSE (Cost=4 Card=1 Bytes=50) 1 0 SORT (GROUP BY) (Cost=4 Card=1 Bytes=50) 2 1 MERGE JOIN (CARTESIAN) (Cost=2 Card=2 Bytes=100) 3 2 TABLE ACCESS (FULL) OF 'TUTCOMPANIES' (Cost=2 Card=1 Bytes=48) 4 2 BUFFER (SORT) (Cost=2 Card=2 Bytes=4) 5 4 INDEX (RANGE SCAN) OF 'IND_PA_CONO' (NON-UNIQUE) O (a) The final result contains 4 rows. O (b) The column FULL of the table TUTCOMPANIES has been read. O (c) The only table being read by Oracle is the table TUTCOMPANIES. O (d) The index IND_PA_CONO is used by the primary key of the table. O (e) The segments of the tables TUTPERSONS and TUTCOMPANIES are completely run through. 25. In a single transaction, I am changing a table with several update - and insert -commands one after the other. What can another user do in the meantime? O (a) He cannot read the table because I am blocking it. O (b) He can read the whole table without problems, and if he performs several select -statements one after the other, he will see the new changes and any newly inserted row. O (c) He can read the whole table without problems, but he doesn t see any modifications; he will just see the newly inserted rows. O (d) He can read the whole table without problems, but he doesn t see any modification nor any newly inserted row. 05/01/2016 Self-test Oracle fundamentals 9

EVALUATION. Here are the correct answers to all questions: 1. b e 2. b 3. b 4. b 5. b 6. b c d g h j k 7. b 8. a 9. c d 10. a d 11. d e g i 12. a 13. e 14. b 15. d 16. a d e 17. c 18. a d 19. c 20. b d 21. b e 22. c 23. c 24. c 25. d Give 1 point per correctly answered question, also for questions with multiple correct answers. If your score is more than 80%, you do not have to follow this course. You have sufficient background to follow one of the courses Oracle PL/SQL or Oracle DBA 1 - Core competences. When you have a score between 50% and 80%, following the Oracle Fundamentals course can improve your knowledge. When your score is less than 50%, we strongly suggest you follow the Oracle fundamentals course. 05/01/2016 Self-test Oracle fundamentals 10