Questions for Sql

Only available on StudyMode
  • Topic: Data modeling, Natural key, Unique key
  • Pages : 3 (784 words )
  • Download(s) : 416
  • Published : November 14, 2010
Open Document
Text Preview
1. In Oracle, when is it better to use materialized views?

A. It is always better to use materialized views because views are obsolete and materialized views replace them B. When a query is slow and its results need to be cached C. When the involved query is called many times from different places D. When there are many materials involved in the view

E. Every time a view is slow

2. We have two tables, each with one column X of type number which is the primary key. Table A has 100 rows, Table B has 50 rows. When doing an Inner Join between A and B on X, which option would be correct?

A. The maximum number of rows is 100, the minimum number of rows 50 B. The maximum number of rows is 5000, the minimum number of rows 0 C. The maximum number of rows is 50, the minimum number of rows 0 D. The maximum number of rows is 100, the minimum number of rows 100 E. It is not possible to estimate a maximum and minimum. More information is needed.

3. What is the difference between a primary key and a unique key?

A. A primary key does not have to be unique; a unique key has to be unique B. A primary key is mandatory; a unique key is not mandatory C. Primary keys are not allowed on multiple columns, unique keys are allowed on multiple columns D. A primary key must start with PK; a unique key can start with any character E. No answer is correct

4. We have two tables, each with one column X of type number which is the primary key. Table A has 100 rows, Table B has 50 rows. When doing a Left Outer Join from A to B on X, which option would be correct?

A. The maximum number of rows is 100, the minimum number of rows 50 B. The maximum number of rows is 5000, the minimum number of rows 0 C. The maximum number of rows is 50, the minimum number of rows 0 D. The maximum number of rows is 100, the minimum number of rows 100 E. It is not possible to estimate a maximum and minimum. More information is needed....
tracking img