Showing posts with label Database. Show all posts
Showing posts with label Database. Show all posts

Monday, December 8, 2014

JDBC, Java Server Pages, and MySQL

1. 
How many JDBC driver types does Sun define?
A.OneB.Two
C.ThreeD.Four
2. 
Where is metadata stored in MySQL?
A.In the MySQL database metadata
B.In the MySQL database metasql
C.In the MySQL database mysql
D.None of the above is correct.
3. 
Who invented Java?
A.Netscape
B.Microsoft
C.Sun
D.None of the above is correct.
4. 
To run a compiled Java program, the machine must have what loaded and running?
A.Java virtual machine
B.Java compiler
C.Java bytecode
D.A Web browser
5. 
Which JDBC driver Type(s) can be used in either applet or servlet code?
A.Both Type 1 and Type 2
B.Both Type 1 and Type 3
C.Both Type 3 and Type 4
D.Type 4 only

Sunday, December 7, 2014

ODBC, OLE DB, ADO, and ASP

1. 
ODBC minimum SQL grammar contains which of the following?
A.INSERT, UPDATE, DELETE only
B.Stored Procedures only
C.Literals for date, time and timestamp only
D.CREATE VIEW, DROP VIEW only
2. 
When using ODBC, which of the following processes ODBC requests and submits specific SQL statements to a given type of data source?
A.Data source
B.Driver
C.Driver manager
D.DBMS
3. 
The ODBC core API consists of which of the following functions?
A.Commit or rollback transactions only
B.Connect to data sources with driver-specific information only
C.Connect to data sources only
D.Both 1 and 3 above are in the OBDC core API.
4. 
________ is a simple object model that is easier to understand and use than OLE DB, and is frequently used for database applications.
A.ASPB.XML
C.ODBCD.ADO
5. 
ODBC core SQL grammar contains which of the following?:
A.INSERT, UPDATE, DELETE only
B.Stored procedures only
C.Full SELECT (includes subqueries) only
D.Both 1 and 3 above are contained in the ODBC core SQL.

Saturday, December 6, 2014

Managing Databases with Oracle

1. 
What type of failure occurs when Oracle fails due to an operating system or computer hardware failure?
A.Application failure
B.Instance Failure
C.Media Failure
D.Rollback failure
2. 
Which statement about sequences is not true?
A.A sequence is an object that generates a sequential series of unique numbers.
B.Sequences are most often used to provide values for surrogate keys.
C.NextVal and CurrVal are both sequence methods.
D.Sequences guarantee valid surrogate key values.

3. 
Which prefixes are available to Oracle triggers?
A.:new only
B.:old only
C.Both :new and :old
D.Neither :new nor :old
4. 
In creating a procedure, you may get a message if you have compile errors. Which of the following is true?
A.The line numbers reported match the line numbers you see in your text editor.
B.SQL*Plus will automatically show the errors to you.
C.To see the errors, enter SHOW ERRORS in SQL*Plus.
D.If there are no syntax errors, you will receive the message "NO ERRORS."
5. 
Which of the following is not true about indexes?
A.Indexes are created to enforce uniqueness on columns.
B.Indexes are created to enable fast retrieval by column values.
C.Columns that are frequently used with equal conditions in WHERE clauses are good candidates for indexes.
D.Indexes are created with the ALTER TABLE command.

Friday, December 5, 2014

Database Redesign

1. 
Which of the following SQL statements are helpful in database redesign?
A.Correlated subqueries only
B.EXISTS/NOT EXISTS expressions only
C.Both of the above are helpful
D.None of the above are helpful.
2. 
What SQL command can be used to delete columns from a table?
A.MODIFY TABLE TableName DROP COLUMN ColumnName
B.MODIFY TABLE TableName DROP ColumnName
C.ALTER TABLE TableName DROP COLUMN ColumnName
D.ALTER TABLE TableName DROP ColumnName
3. 
Database redesign is not terribly difficult if the:
A.database is structured.
B.database is well-designed.
C.database has no data.
D.database is relatively small.
4. 
Which SQL-92 standard SQL command can be used to change a table name?
A.RENAME TABLE
B.CHANGE TABLE
C.ALTER TABLE
D.None of the above is correct.
5. 
The process of reading a database schema and producing a data model from that schema is known as:
A.data modeling.
B.database design.
C.reverse engineering.
D.None of the above is correct.

Tuesday, December 2, 2014

Introduction to SQL

1. 
You can add a row using SQL in a database with which of the following?
A.ADDB.CREATE
C.INSERTD.MAKE
2. 
The command to remove rows from a table 'CUSTOMER' is:
A.REMOVE FROM CUSTOMER ...
B.DROP FROM CUSTOMER ...
C.DELETE FROM CUSTOMER WHERE ...
D.UPDATE FROM CUSTOMER ...
3. 
The SQL WHERE clause:
A.limits the column data that are returned.
B.limits the row data are returned.
C.Both A and B are correct.
D.Neither A nor B are correct.
4. 
Which of the following is the original purpose of SQL?
A.To specify the syntax and semantics of SQL data definition language
B.To specify the syntax and semantics of SQL manipulation language
C.To define the data structures
D.All of the above.
5. 
The wildcard in a WHERE clause is useful when?
A.An exact match is necessary in a SELECT statement.
B.An exact match is not possible in a SELECT statement.
C.An exact match is necessary in a CREATE statement.
D.An exact match is not possible in a CREATE statement.

Monday, December 1, 2014

Object-Oriented Database

1. 
ODL supports which of the following types of association relationships?
A.Unary
B.Unary and Binary
C.Unary and Binary and Ternary
D.Unary and Binary and Ternary and higher
2. 
An extent is which of the following?
A.A keyword that indicates that the subclass inherits from a superclass
B.A keyword that indicates that the superclass inherits from a subclass
C.The set of all instances of a class within a database
D.Only one instance of a class within a database
3. 
Identify the class name for the following code: ABC123 course();
A.ABC123
B.course
C.course()
D.All of the above.
4. 
Using ODL, you can define which of the following?
A.Attribute
B.Structure
C.Operation
D.All of the above.
5. 
The keyword "inverse" is used in which of the following?
A.Class
B.Attribute
C.Relationship
D.All of the above.

Distributed Databases

1. 
A distributed database has which of the following advantages over a centralized database?
A.Software cost
B.Software complexity
C.Slow Response
D.Modular growth
2. 
An autonomous homogenous environment is which of the following?
A.The same DBMS is at each node and each DBMS works independently.
B.The same DBMS is at each node and a central DBMS coordinates database access.
C.A different DBMS is at each node and each DBMS works independently.
D.A different DBMS is at each node and a central DBMS coordinates database access.
3. 
A transaction manager is which of the following?
A.Maintains a log of transactions
B.Maintains before and after database images
C.Maintains appropriate concurrency control
D.All of the above.
4. 
Location transparency allows for which of the following?
A.Users to treat the data as if it is at one location
B.Programmers to treat the data as if it is at one location
C.Managers to treat the data as if it is at one location
D.All of the above.
5. 
A heterogeneous distributed database is which of the following?
A.The same DBMS is used at each location and data are not distributed across all nodes.
B.The same DBMS is used at each location and data are distributed across all nodes.
C.A different DBMS is used at each location and data are not distributed across all nodes.
D.A different DBMS is used at each location and data are distributed across all nodes.