Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
Oracle Questions and Answers

Oracle Questions and Answers

|Views: 24|Likes:
Published by Ashok Babu

More info:

Published by: Ashok Babu on Oct 12, 2010
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less





Beginning Skills
Can you describeOracle
 Oracleis an object-relational database management system that stores data in adatabase. AnOracledatabase consists of logical and physical structures. For example, atablespace is used to logically define the physical storage of data in datafiles.Oracledatais stored in related tables and SQL is utilized to retrieve information from the tables.
In the command, "Connect Scott/Tiger@ORCL," the @ORCL isneeded for what purpose? 
 @ORCL, a host string, determines what database instance the user wishes to access.The statement will connect the user, Scott, to the database associated with the ORCLinstance.
Will the database start if the control file is missing? 
 The database will not start without the control file. The control file contains ncecessarydatafile information and transaction control numbers.
How is SQL*Plus started? 
Sqlplus <username><password.
What is a sequence? 
A sequence is used to provide a sequential unique number. A sequence will provide anumeric value increased by a specified increment. An example of a sequence follows:
 The preceding statement will do the following:A sequence is referenced with the NEXTVAL and CURRVAL pseudocolumns. TheNEXTVAL generates a new sequence number. The next example illustrates how toreference a sequence.
INSERT INTO PURCHASES(Orderno, Customer)VALUES(Orderno_seq.NEXTVAL,7021);
 START WITH 1:Sets the starting point of the sequenceINCREMENT BY 1: Specifies the value by which the next sequence valueshould be increasedNOMAXVALUE: Sets no maximum value for the sequenceNOCYCLE: Indicates that the sequence cannot generate additionalvalues after reaching a maximum value that has been setCACHE 20: Pre-allocates 20 sequence numbers to memory for faster retrieval
What is SQL*Plus? 
SQL*Plus, anOracletool, is an extension of SQL. SQL* Plus is used to connect to anOracledatabase. The user can also use the tool to process SQL queries.
What is Net8? 
Net 8 is used to establish network connections and to transfer data based on networkingprotocols such as TCP/IP. Net 8 allows clients to connect to remoteOracledatabasesresiding on multiple servers.
If I need to add data to a table,which SQL command should I use? 
 The SQL command used to add data to a table is "insert." Here's an example:
Insert into employees(first_name,last_name)VALUES "Donna", "Matthews";
What is the difference between anindex created by ASC and an index 
The difference is that ASC will create an index with ascending values, such as A, B, C.The DESC index will create an index with descending values, such as C, B, A.
created by DESC? 
What is a join? 
A join is used to linkOracletables together through a key field, usually handled by awhere condition in the SQL statement. Here's an example:Select * From Employee, Department where Employee.Deptno= Department Deptno.Additional joins also exist:Inner Join: An inner join will only return the rows where matches were foundOuter Join: An outer join will return all rows, including rows where a match does not exist.Union: A union is the opposite of an inner join and returns those rows where no matchwas found between the tables.
What is a trigger? 
A trigger is a procedure that is executed when a specific event occurs, such as when atable is inserted, updated, or deleted.
What is a view? 
A view is an overlay for tables. Views and tables are queried and accessed in the sameway as a table. Views make it possible to hide the actual name of a table as well as fieldsthat a user should not access.
What is a procedure? 
A procedure is a block of PL/SQL statements that is called by applications. A procedureallows the user to store frequently used commands for easy access later.
What does the distinct clause inSQL statements do? 
 The distinct clause in an SQL statement will remove any duplicate values. For example, if two last_name values of Matthews exist in a table, only one will be displayed.
Which one must return a value, a procedure, or a function? 
A function must return a value and a procedure may never return a value.
What is the purpose of the HAVINGclause in SQL? 
 The HAVING clause restricts the group of rows returned. It is similar to the WHEREclause, except that it is employed when a GROUP_BY clause has been used in the SQLquery. Here's an example:
SELECT snum, state, AVG(amount), MAX(amount)From salesrepGROUP BY snumHAVING state = 'IL';
In a relational database, which oneof the following describes anattribute? 
 A.FieldB.RecordC.DatabaseD.None of the aboveThe correct answer is A. A record is a combination of fields or attributes. A database is acombination of records.
Which one of the programming languages below is used inrelational databases to manipulatethe data? 
 A.Visual BasicB.C++C.SQLD.None of the aboveThe correct answer is C. SQL is used to manipulate the data in relational databases.Answer A is incorrect because Visual Basic is usually a front-end to the database, butSQL is used to manipulate the data. Answer B is also incorrect because C++ must useSQL to manipulate the data.
What is SQL? 
SQL stands for structured query language, which is used to accessOracledatabases.
Oracle8i does not support Java programming.
 The correct answer is B. Oracle8
supports Java programming wherever PL/SQL is used.Java programming can be used for stored procedures and functions, as well as for  triggers.
 _____ are queries based on tables.
 A.ViewsB.SequencesC.IndexesD.None of the aboveThe correct answer is A. B is incorrect because sequences generate unique numbers for numeric columns in a table. C is incorrect because indexes are used to speed up theaccess of data from a database.
Given the tables"Employee_Information" and "Employee_Resume," what type of relationship do you think exists? 
 A.One-to-oneB.Many-to-manyC.One-to-manyThe correct answer is A. Each employee should have only one resume.
What does the SQL statement "Select * From Employees wherestate = 'IL';" do? 
 This statement will display all the fields in the employee table where an employee islocated in the state of Illinois.
What is the purpose of an index? 
An index is used to store data in a specific way in a table which will permit easy retrievalof data. An index to a database is similar to an index in a book; it allows the user toimmediately access the information he or she is seeking without having to read everypage. Indexes sort one or more fields in a database in ascending or descending order.
How can a user create a table? 
The SQL statement "Create table" is used to create a table inOracle. An example of thestatement follows:
CREATE TABLE students (Student_id NUMBER(5) NOT NULL;Department CHAR(3) NOT NULL);
How does a user create an index? 
The SQL statement "Create index" is used to create an index inOracle. The syntax is"Create Index "ORCL.employees (empid);" is an example of a create statement.<indexname> on <table_name (column_name(s)>.
What is data normalization? 
The goal of data normalization is to eliminate redundant data in tables. For example, in apayroll table where the hourly rate of $60 per hour is stored in a new field for each andevery supervisor, a table can be created that is used to retrieve the hourly rate by the useof a join. This configuration will allow changes to be made once rather than in multiplelocations for all supervisors in the table.
Can you give an example of a one-to-one relationship? 
 The relationship between an employee table and an employee resume table, where eachemployee has only one resume, illustrates a one-to-one relationship.
Can you give an example of a one-to-many relationship? 
 An example of a one-to-many relationship can be illustrated by the relationship betweensales_reps and sales offices. Sales_reps can report to only one office, but an office canhave more than one sales rep.
What does the command "DropTable Employees" do? 
 The drop table command is used to delete the employee table and to remove informationabout it from the data dictionary.
What is the purpose of an Entity Relationship Diagram (ERD)? 
 An ERD is used to graphically depict the relationship between tables in anOracledatabase.
What is PL/SQL? 
PL/SQL is a programming language used to accessOracledatabases. PL/SQLenhances the SQL programming language with additional programming capabilities, suchas if-then statements, functions, procedures, and so on.
In a SQL statement, what is the purpose of the where clause? 
 The where clause is used to restrict the data returned from a SQL query.
If the department name for Human
The SQL command update would be used to change the department name. The syntax

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->