SQL Fundamentals and DBMS Concepts

Covers basic SQL statements (SELECT, INSERT, UPDATE, DELETE), database constraints, DBMS advantages, and SQL*Plus fundamentals

20 Questions Published

Questions

Question 1 True/False

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

  1. True
  2. False
Question 2 Multiple Choice (Single Answer)

With SQL, how can you return all the records from a table named "Persons" sorted descending by "FirstName"?

  1. SELECT * FROM Persons SORT BY 'FirstName' DESC
  2. SELECT * FROM Persons SORT 'FirstName' DESC
  3. SELECT * FROM Persons ORDER BY FirstName DESC
  4. SELECT * FROM Persons ORDER FirstName DESC
Question 3 Multiple Choice (Single Answer)

Which SQL statement is used to extract data from a database?

  1. OPEN
  2. EXTRACT
  3. SELECT
  4. GET
Question 4 Multiple Choice (Single Answer)

Which SQL statement is used to update data in a database?

  1. UPDATE
  2. MODIFY
  3. SAVE
  4. SAVE AS
Question 5 Multiple Choice (Single Answer)

Which SQL statement is used to insert new data in a database?

  1. ADD NEW
  2. INSERT INTO
  3. ADD RECORD
  4. INSERT NEW
Question 6 Multiple Choice (Single Answer)

What does SQL stand for?

  1. Strong Question Language
  2. Structured Query Language
  3. Structured Question Language
  4. Strong Query Language
Question 7 Multiple Choice (Single Answer)

With SQL, how do you select all the columns from a table named "Persons"?

  1. SELECT * FROM Persons
  2. SELECT [all] FROM Persons
  3. SELECT Persons
  4. SELECT FROM Persons
Question 8 Multiple Choice (Single Answer)

Which SQL statement is used to return only different values?

  1. SELECT DIFFERENT
  2. SELECT UNIQUE
  3. SELECT DISTINCT
  4. SELECT EXACT
Question 9 Multiple Choice (Single Answer)

With SQL, how can you insert a new record into the "Persons" table?

  1. INSERT INTO Persons VALUES ('Jimmy', 'Jackson')
  2. INSERT VALUES ('Jimmy', 'Jackson') INTO Persons
  3. INSERT ('Jimmy', 'Jackson') INTO Persons
  4. INSERT VALUES ('Jimmy', 'Jackson')
Question 10 Multiple Choice (Single Answer)

With SQL, how can you insert "Olsen" as the "LastName" in the "Persons" table?

  1. INSERT INTO Persons (LastName) VALUES ('Olsen')
  2. INSERT ('Olsen') INTO Persons (LastName)
  3. INSERT INTO Persons ('Olsen') INTO LastName
  4. INSERT INTO Persons ('Olsen')
Question 11 Multiple Choice (Single Answer)

With SQL, how can you delete the records where the "FirstName" is "Peter" in the Persons Table?

  1. DELETE ROW FirstName='Peter' FROM Persons
  2. DELETE FROM Persons WHERE FirstName = 'Peter'
  3. DELETE FirstName='Peter' FROM Persons
  4. REMOVE FROM Persons WHERE FirstName = 'Peter'
Question 12 Multiple Choice (Single Answer)

Which SQL statement is used to delete data from a database?

  1. DELETE
  2. COLLAPSE
  3. REMOVE
  4. ERASE
Question 13 Multiple Choice (Single Answer)

With SQL, how do you select a column named "FirstName" from a table named "Persons"?

  1. EXTRACT FirstName FROM Persons
  2. SELECT FirstName FROM Persons
  3. SELECT Persons.FirstName
  4. SELECT * FROM Persons
Question 14 Multiple Choice (Single Answer)

With SQL, how do you select all the records from a table named "Persons" where the "FirstName" is "Peter" and the "LastName" is "Jackson"?

  1. SELECT * FROM Persons WHERE FirstName='Peter' AND LastName='Jackson'
  2. SELECT FirstName='Peter', LastName='Jackson' FROM Persons
  3. SELECT * FROM Persons WHERE FirstName<>'Peter' AND LastName<>'Jackson'
  4. SELECT * FROM Persons WHERE FirstName='Jackson' AND LastName='Peter'
Question 15 Multiple Choice (Single Answer)

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"?

  1. SELECT * FROM Persons WHERE LastName>'Hansen' AND LastName<'Pettersen'
  2. SELECT * FROM Persons WHERE LastName BETWEEN 'Hansen' AND 'Pettersen'
  3. SELECT LastName>'Hansen' AND LastName<'Pettersen' FROM Persons
  4. SELECT LastName<>'Hansen' AND LastName<>'Pettersen' FROM Persons
Question 16 Multiple Choice (Single Answer)

Which SQL statement defines a FOREIGN KEY constraint on the DEPT NO column of the EMP table?

  1. CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) NOT NULL, CONSTRAINT emp_deptno_fk FOREIGN KEY deptno REFERENCES dept deptno);
  2. CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) CONSTRAINT emp_deptno_fk REFERENCES dept (deptno));
  3. CRETE TABLE EM (empno NUMBER(4), ename VARCHAR2(35) deptno NUMBER (7,2) NOT NULL, CONSTRAINT em_deptno_fk REFERENCES dept (deptno) FOREIGN KEY (deptno));
  4. CREATE TABLE EMP (empno NUMBER (4), ename VARCHAR2(35), deptno NUMBER(7,2) FOREIGN KEY CONSTRAINT emp deptno fk REFERENCES dept (deptno));
Question 17 Multiple Choice (Single Answer)

Evaluate the set of SQL statements: CREATE TABLE dept (deptbi NUMBER (2) dname VARCHAR2(14), Ioc VARCHAR2(13)); ROLLBACK; DESCRIBE DEPT What is true about the set?

  1. The DESCRIBE DEPT statement displays the structure of the DEPT table
  2. The ROLLBACK statement frees the storage space occupied by the DEPT table.
  3. The DESCRIBE DEPT statement returns an error ORA-04043: object DEPT does not exist
  4. The DESCRIBE DEPT statement displays the structure of the DEPT table only if there is a COMMIT statement introduced before the ROLLBACK statement.
Question 18 Multiple Choice (Multiple Answers)

Which two are attributes of /SQL* Plus? (Choose two).

  1. /SQL * Plus commands cannot be abbreviated
  2. /SQL* Plus commands are accessed from a browser.
  3. /SQL*Plus commands are used to manipulate data in tables
  4. /SQL* Plus command manipulate table definitions in the database
  5. /SQL* Plus is the Oracle proprietary interface for executing SQL statements.
Question 19 True/False

Is the database and DBMS software together is called as Database system?

  1. True
  2. False
Question 20 Multiple Choice (Multiple Answers)

which of the following are the advantages of DBMS? (Select 2)

  1. Redundancy is controlled
  2. graphical and statistical capabilities
  3. proprietary formats may limit arichival quality of data
  4. Providing multiple user interfaces