You are on page 1of 20

An RDBMS is a (a) remote DBMS (b) relative DBMS (c) Relational DBMS (d)Reliable DBMS What does SQL

stand for? (a)Structured Query Language (b)Strong Question (c)Structured Question Language. Which SQL statement is used to extract data from a database? SELECT GET OPEN EXTRACT Which SQL statement is used to update data in a database? SAVE MODIFY UPDATE SAVE AS

Which SQL statement is used to delete data from a database? DELETE TRUNCATE REMOVE Which SQL statement is used to delete data from a database? DELETE TRUNCATE REMOVE With SQL, how do you select a column named "FirstName" from a table named "Persons"? SELECT Persons.FirstName EXTRACT FirstName FROM Persons SELECT FirstName FROM Persons With SQL, how do you select all the columns from a table named "Persons"? SELECT [all] FROM Persons

SELECT Persons SELECT *.Persons SELECT * FROM Persons With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" is "Peter"? SELECT [all] FROM Persons WHERE FirstName='Peter' SELECT * FROM Persons WHERE FirstName='Peter' SELECT * FROM Persons WHERE FirstName LIKE 'Peter' SELECT [all] FROM Persons WHERE FirstName LIKE 'Peter' With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" starts with an "a"? SELECT * FROM Persons WHERE FirstName LIKE '%a' SELECT * FROM Persons WHERE FirstName='a' SELECT * FROM Persons WHERE FirstName LIKE 'a%' SELECT * FROM Persons WHERE FirstName='%a%'

The OR operator displays a record if ANY conditions listed are true. The AND operator displays a record if ALL of the conditions listed are true False True With SQL, how do you select all the records from a table named "Persons" where the "FirstName" is "Peter" and the "LastName" is "Jackson"? SELECT * FROM Persons WHERE FirstName='Peter' AND LastName='Jackson' SELECT * FROM Persons WHERE FirstName LIKE 'Peter' AND LastName LIKE 'Jackson' SELECT FirstName='Peter', LastName='Jackson' FROM Persons With SQL, how do you select all the records from a table named "Persons" where the "LastName" is alphabetically between (and including) "Hansen" and "Pettersen"? SELECT * FROM Persons WHERE LastName>'Hansen' AND LastName<'Pettersen' SELECT * FROM Persons WHERE LastName BETWEEN 'Hansen' AND 'Pettersen'

SELECT LastName>'Hansen' AND LastName<'Pettersen' FROM Person Which SQL statement is used to return only different values? SELECT DIFFERENT SELECT DISTINCT SELECT UNIQUE Which SQL keyword is used to sort the result-set? ORDER SORT SORT BY ORDER BY With SQL, how can you return all the records from a table named "Persons" sorted descending by "FirstName"? SELECT * FROM Persons SORT 'FirstName' DESC SELECT * FROM Persons ORDER BY FirstName DESC SELECT * FROM Persons ORDER FirstName DESC SELECT * FROM Persons SORT BY 'FirstName' DESC

With SQL, how can you insert a new record into the "Persons" table? INSERT ('Jimmy', 'Jackson') INTO Persons INSERT VALUES ('Jimmy', 'Jackson') INTO Persons INSERT INTO Persons VALUES ('Jimmy', 'Jackson') With SQL, how can you insert "Olsen" as the "LastName" in the "Persons" table? INSERT INTO Persons ('Olsen') INTO LastName INSERT INTO Persons (LastName) VALUES ('Olsen') INSERT ('Olsen') INTO Persons (LastName) How can you change "Hansen" into "Nilsen" in the "LastName" column in the Persons table? UPDATE Persons SET LastName='Nilsen' WHERE LastName='Hansen' MODIFY Persons SET LastName='Hansen' INTO LastName='Nilsen UPDATE Persons SET LastName='Hansen' INTO

LastName='Nilsen' MODIFY Persons SET LastName='Nilsen' WHERE LastName='Hansen' With SQL, how can you delete the records where the "FirstName" is "Peter" in the Persons Table? DELETE FROM Persons WHERE FirstName = 'Peter' DELETE FirstName='Peter' FROM Persons DELETE ROW FirstName='Peter' FROM Persons With SQL, how can you return the number of records in the "Persons" table? SELECT COLUMNS(*) FROM Persons SELECT COUNT() FROM Persons SELECT COUNT(*) FROM Persons SELECT COLUMNS() FROM Persons

What does the abbreviation DBMS stand for?

Digital Base Mapping System. Database Manipulation Software. Data Borrowing and Movement Software. Database Management System. Database Manipulation Software. Digital Base Mapping System. Database Management System. Data Borrowing and Movement Software.

The advantages of Standard Query Language (SQL) include which of the following in relation to GIS databases? It is good at handling geographical concepts. It is widely used. It uses a pseudo-English style of questioning. It is simple and easy to It is widely used. understand. It uses a pseudo-English style of questioning. It is simple and easy to understand. It is good at handling geographical concepts.

Tables are linked by common data known as keys. Queries are possible on individual or groups of tables. Data are organized in a series of two-dimensional tables each of which contains records for one entity. It cannot use SQL. Keys may be unique or have multiple occurrences in the database. Keys may be unique or have multiple occurrences in the

database. Queries are possible on individual or groups of tables. Data are organized in a series of two-dimensional tables each of which contains records for one entity. Tables are linked by common data known as keys. It cannot use SQL.

What is a 'tuple'? Another name for a table in an RDBMS. A row or record in a database table. An attribute attached to a record. Another name for the key A row or record in a linking different tables in a database table. database. An attribute attached to a record. Another name for a table in an RDBMS. Another name for the key linking different tables in a database.

Which of the following are issues to be considered by users of large corporate GIS databases? The need for multiple views or different windows into the same databases. The need for concurrent access and multi-user update. The need for multiple copies of the same data and

subsequent merging after separate updates. The need to manage long transactions. The need for manual The need for multiple views or transfer of records to different windows into the same databases. paper. The need for multiple copies of the same data and subsequent merging after separate updates. The need for manual transfer of records to paper. The need for concurrent access and multi-user update. The need to manage long transactions. Which of the following are features of the object-oriented approach to databases? The ability to develop more realistic models of the real world. The ability to represent the world in a non-geometric way. The need to split objects into their component parts. The ability to develop database models based on location rather than state and behaviour. The ability to develop databases using natural language approaches. The need to split objects into their component parts. The ability to represent the world in a non-geometric way. The ability to develop database models based on location rather than state and behaviour. The ability to develop more realistic models of the real world. The ability to develop databases using natural language approaches.

Redundancy is minimised with a computer based database approach. True Fals

The relational database model is based on concepts proposed in the 1960s and 1970s. True False

A row in a database can also be called a domain. True False

A first step in database creation should be needs analysis. True False

In entity attribute modelling a many to many relationship is represented by M:M. True False

User Janko would like to insert a row into the Emp table, which has 3 columns: empid, lastname, salary. The user would like to enter data for empid 59694, lastname Harry, but no salary. Which statement would work best. A. INSERT INTO EMP VALUES (59694,Harry, NULL); B. INSERT INTO EMP VALUES (59694,Harry); C. INSERT INTO EMP (empid, lastname, salary) VALUES (59694,Harry); D. INSERT INTO EMP VALUES (Select 59694 from Harris); E. INSERT INTO EMP(empid, lastname) VALUES (59694,Harry);

13. Overall logical structure of a database can be expressed graphically by ______________ A. B. C. D. ER diagram Records Relations Hierarchy

14. A table can have maximum _____________ no. Of Long Raw datatype columns A. One B. No limit

C. 255 D. depends on tablespace . A user is setting up a join operation between Emp and Dept tables. The query should return all the employees, which are assigned dept, as well as the employees which are yet not assigned any dept. A. Select e.empid, d.head from emp e, dept d; B. Select e.empid, d.head from emp e, dept d where e.deptno = d.deptno; C. Select e.empid, d.head from emp e, dept d where e.deptno = d.deptno (+); D. Select e.empid, d.head from emp e, dept d where e.deptno (+)= d.deptno; 17. Output from a table called PLAYS with two columns, PLAY_NAME and AUTHOR, is shown next. Which of the following SQL statements produced it? PLAY_TABLE ------------------------------------"Midsummer Nights Dream", SHAKESPEARE "Waiting For Godot", BECKETT "The Glass Menagerie", WILLIAMS A. select PLAY_NAME|| AUTHOR from PLAYS; B. select PLAY_NAME, AUTHOR from PLAYS; C. select PLAY_NAME||, || AUTHOR from PLAYS;

D. select PLAY_NAME||, || AUTHOR play_table from PLAYS; 18. Which of the following statements contains an error? A. select * from EMP where EMPID = 493945; B. select EMPID from EMP where EMPID = 493945; C. select EMPID from EMP; D. select EMPID where EMPID = 56949 and LASTNAME = SMITH; 19. Which of the following statements are NOT TRUE about ORDER BY clauses? A. Ascending or descending order can be defined with the asc or desc keywords. B. Only one column can be used to define the sort order in an order by clause. C. Multiple columns can be used to define sort order in an order by clause. D. Columns can be represented by numbers indicating their listed order in the select E. clause within order by. 20. A Cartesian product is A. A group function B. Produced as a result of a join select statement with no where clause C. The result of fuzzy logic D. A special feature of Oracle server

21. In order to perform an inner join, which criteria must be true? A. The common columns in the join need to have shared values. B. The tables in the join need to common columns. C. The common columns in the join may not have shared values. D. The common columns in the join have shared values. do not have may or must

23. Developer ANJU executes the following statement: CREATE TABLE animals AS SELECT * from MASTER.ANIMALS; What is the effect of this statement? A. A table named ANIMALS will be created in the MASTER schema with the same data as the ANIMALS table owned by ANJU. B. A table named ANJU will be created in the ANIMALS schema with the same data as the ANIMALS table owned by MASTER. C. A table named ANIMALS will be created in the ANJU schema with the same data as the ANIMALS table owned by MASTER. D. A table named MASTER will be created in the ANIMALS schema with the same data as the ANJU table owned by ANIMALS

24. Which line of the following statement will produce an error? A. create table GOODS B. (GOODNO number, C. GOOD_NAME varchar2 check(GOOD_NAME in (select NAME FROM AVAIL_GOODS)), D. constraint PK_GOODS_01 E. primary key (GOODNO)); F. There are no errors in this statement. 56. UPDATE OR DELETE ON SOCCER_FAN_SNACKS. Which two of the following keywords may be useful in your trigger source code to distinguish what should run, and when? A. inserting B. updating C. deleting D. truncating 61. The max length of varchar2 when used in a table is A. B. C. D. 16k 32k 4k Either b or c

The keys that can have NULL values are

A. B. C. D.

Primary Key Unique Key Foreign Key Both b and c

. The number of columns in a table is known as its A. B. C. D. Degree Cardinality Domain Range ANS-(a)

GRANT and REVOKE are (a) (b) (c) (d) DDL statements DML statements DCL statements None of these

88. TRUNCATE TABLE statement (a) Drops a (b) Removes (c) Removes a table (d) Removes ANS-(b) table temporarily all rows of a table specified number of rows from all constraints from a table

91. Consider a table OLD with few rows. The statement CREATE TABLE new AS SELECT * FROM OLD WHERE 1=2

(a) copies all the rows from OLD to NEW (b) creates a dummy NEW table (c) creates an empty NEW table with column definitions same as OLD (d) creates a table NEW that acts as a synonym for OLD ANS-(c) 92. Oracle 8i runs on (a) (b) (c) (d) (e) Windows NT UNIX Solaris (a) and (b) (a), (b) and (c) ANS-(e)

96. Which of the following is not a RDBMS (a) (b) (c) (d) MS Access Oracle 8i MS SQL Server Informix ANS-(a)

95. The address of the Oracle name server is contained in (a) (b) (c) (d) listener.ora tnsnames.ora init.ora sqlnet.ora ANS-(d)

The character used for concatenating strings in Oracle is

(a) (b) (c) (d)

&& + | None of these ANS-(d)

1. In a query with a GROUP BY clause, the columns in the SELECT clause (a) must be aggregate functions only (b) must also appear in the GROUP BY clause (c) must also appear in the GROUP BY and HAVING clauses (d) Both (a) and (b) (e) Can be selected arbitrarily ANS-(d) The CHAR and NCHAR data types (a) have no difference (b) belong to two different character sets (c) have different storage requirements (d) have different storage requirements and retrieval time ANS-(b) The wild card character % used in strings means (a) (b) (c) (d) any number of characters one or more characters at least one character at least one alphabet ANS-(a)

Storing a separate copy of the database at multiple locations is which of the following?

Data Replication Horizontal Partitioning Vertical Partitioning Horizontal and Vertical Partitioning

You might also like