Qiuz 4
Qiuz 4
What is the correct SQL syntax for creating a table with a primary key
and auto-increment?
A) UNIQUE
B) FOREIGN KEY
C) NOT NULL
D) DEFAULT
3.Which of the following data types is used for representing currency values in
SQL?
A) NUMERIC
B) MONEY
C) DATE
D) DECIMAL
4.Which data type would be best for storing scientific measurements with
large precision in SQL?
A) DECIMAL
B) DOUBLE
C) NUMERIC
D) FLOAT
A) UNIQUE
B) PRIMARY KEY
C) NOT NULL
D) CHECK
A) CHECK
B) UNIQUE
C) FOREIGN KEY
D) NOT NULL
A) 1
B) NULL
C) 0
D) 10
Correct answer
A) 1
A) MongoDB
B) MySQL
C) Cassandra
D) Firebase
12.What does a relational database use to establish relationships between
tables?
A) Primary key
B) Index
C) Foreign key
D) Constraints
Correct answer
C) Stores data in documents (e.g., JSON)
A) DELETE
B) REMOVE
C) DROP TABLE
D) ALTER TABLE
16.In a database system, the term "database instance" refers to which of the
following?
19.Which of the following is the correct way to insert a new record into a table
named students?*
A) /* comment */
B) -- comment --
C) /* comment
D) // comment
Correct answer
A) /* comment */
A) VARCHAR
B) INT
C) DECIMAL
D) IMAGE
22.Which of the following SQL functions is used to calculate the total sum of a
column in a table?*
A) COUNT()
B) MAX()
C) SUM()
D) AVG()
23.Which of the following SQL clauses is used to remove duplicates from the
results of a query?*
A) REMOVE
B) UNIQUE
C) DISTINCT
D) UNIQUE RECORD
A) DELETE
B) TRUNCATE
C) REMOVE
D) DROP
C) PostgreSQL
D) SQLite
A) db.collection.insert()
B) db.collection.insertMany()
C) db.collection.insertDocuments()
D) db.collection.addDocuments()
Correct answer
B) Conceptual, External, and Internal
B) End User
C) Data Analyst
D) Database Query Processor