IM PRELIM Flashcards
Who proposed the relational model for database systems in 1970?
a) Charles Babbage
b) Edgar F. Codd
c) Alan Turing
d) Donald Knuth
Edgar F. Codd
What is the unique identifier for each row in a relational database table?
a) Foreign Key
b) Index
c) Primary Key
d) Column
Primary Key
What property of relational tables ensures that the order of rows does not matter?
a) Data Integrity
b) Sequence Independence
c) Data Redundancy
d) Foreign Key Constraint
Sequence Independence
What SQL keyword is used to retrieve all rows and columns from a table?
a) DISPLAY *
b) FETCH *
c) SELECT *
d) SHOW *
SELECT *
What clause is used to filter records in an SQL query?
a) HAVING
b) WHERE
c) ORDER BY
d) SELECT
WHERE
Which SQL clause is used to sort query results?
a) SORT BY
b) FILTER BY
c) ORDER BY
d) GROUP BY
ORDER BY
What function is used to return the current date and time in Oracle SQL?
a) GETDATE()
b) SYSDATE
c) CURRENT_DATE()
d) DATE()
SYSDATE
Which arithmetic operator has the highest precedence in SQL?
a) Addition (+)
b) Multiplication (*)
c) Subtraction (-)
d) Division (/)
Multiplication (*)
What is the result of NULL in an arithmetic expression?
a) 0
b) Error
c) NULL
d) Infinity
NULL
Which operator is used in SQL to filter a range of values?
a) IN
b) BETWEEN
c) LIKE
d) HAVING
BETWEEN
What SQL operator is used to check if a value is in a given list?
a) LIKE
b) IN
c) EXISTS
d) HAVING
IN
Which SQL condition is used for wildcard searches in text fields?
a) LIKE
b) IN
c) BETWEEN
d) EXISTS
LIKE
Which category of SQL statements is used to modify table structures?
a) DML
b) DDL
c) TCL
d) DCL
DDL
What SQL command is used to add new records into a table?
a) ADD
b) INSERT
c) UPDATE
d) MERGE
INSERT
Which SQL keyword is used to give a user access to a database object?
a) REVOKE
b) GRANT
c) PERMIT
d) ACCESS
GRANT
Who proposed the relational model for database systems in 1970?
a) Charles Babbage
b) Edgar F. Codd
c) Alan Turing
d) Donald Knuth
Edgar F. Codd
What is the main purpose of a relational database?
a) Storing images and videos
b) Managing unstructured data
c) Organizing data into related tables
d) Replacing programming languages
Organizing data into related tables
Which of the following is a basic storage structure in a relational database?
a) Column
b) Table
c) Field
d) Index
Table
What is a foreign key in a relational database?
a) A unique identifier for a row
b) A key that refers to the primary key in another table
c) A randomly generated key
d) A key used for encryption
A key that refers to the primary key in another table
Which of the following is NOT a property of a relational table?
a) Each row is unique
b) The sequence of columns is significant
c) Entries in a column must be of the same type
d) Each column has a unique name
The sequence of columns is significant
What SQL statement is used to retrieve data from a database?
a) INSERT
b) SELECT
c) DELETE
d) UPDATE
SELECT
Which keyword is used to select all columns from a table?
a) ALL
b) SELECT *
c) FETCH *
d) SHOW *
SELECT *
What clause is used to filter data in an SQL query?
a) FILTER
b) SORT
c) WHERE
d) ORDER BY
WHERE
What clause is used to sort the results of an SQL query?
a) GROUP BY
b) SORT BY
c) ORDER BY
d) ARRANGE
ORDER BY