Quick Revision

GK One-Line Question & Answer

15541+ short questions with short answers, covering every category and sub-category on the site — no long articles to scroll through. Good for a fast recap before an exam, or a few minutes of daily practice.

DBMS → Introduction to DBMS 3

Which one of the following attribute can be taken as a primary key?
id
click to copy
Which of the following statements contains an error?
select empid where empid = 1009 and lastname = ‘geller’;
click to copy
SQL applies predicates in the                 clause after groups have been formed, so aggregate functions may be used.
with
click to copy

DBMS → Database Architecture 3

Which one of the following cannot be taken as a primary key?
street
click to copy
In SQL the spaces at the end of the string are removed by                function.
trim
click to copy
The                  keyword is used to access attributes of preceding tables or subqueries in the from clause.
lateral
click to copy

DBMS → Data Models 3

An attribute in a relation is a foreign key if the                key from one relation is used as an attribute in that relation.
primary
click to copy
The union operation is represented by
u
click to copy
Which of the following creates a temporary relation for the query on which it is defined?
with
click to copy

DBMS → ER Model 3

The relation with the attribute which is the primary key is referenced in another relation. The relation which has the attribute as a primary key is called                              
referenced relation
click to copy
The intersection operator is used to get the            tuples.
common
click to copy
Subqueries cannot:
join tables
click to copy

DBMS → Relational Model 2

The              is the one in which the primary key of one relation is used as a normal attribute in another relation.
referenced relation
click to copy
If we want to retain all duplicates, we must write                  in place of union.
union all
click to copy

DBMS → Normalization 2

A                    integrity constraint requires that the values appearing in specified attributes of any tuple in the referencing relation also appear in specified attributes of at least one tuple in the referenced relation.
referential
click to copy
The number of attributes in relation is called as its
degree
click to copy

DBMS → Functional Dependency 2

The           operation allows the combining of two relations by merging pairs of tuples, one from each relation, into a single tuple.
join
click to copy
           clause is an additional filter that is applied to the result.
having
click to copy

DBMS → SQL Basics 2

The result which operation contains all pairs of tuples from the two relations, regardless of whether their attribute values match.
cartesian product
click to copy
                   joins are SQL server default
inner
click to copy

DBMS → DDL Commands 2

The               operation performs a set union of two “similarly structured” tables
union
click to copy
The                            is essentially used to search for patterns in target string.
like predicate
click to copy

DBMS → DML Commands 2

The most commonly used operation in relational algebra for projecting a set of tuple from a relation is
select
click to copy
A            indicates an absent value that may exist but be unknown or that may not exist at all.
null value
click to copy

DBMS → Joins 2

The                operator takes the results of two queries and returns only rows that appear in both result sets.
intersect
click to copy
If the attribute phone number is included in the relation all the values need not be entered into the phone number column. This type of entry is given as
null
click to copy

DBMS → Views 2

A                  is a pictorial depiction of the schema of a database that shows the relations in the database, their attributes, and primary keys and foreign keys.
schema diagram
click to copy
The predicate in a where clause can involve Boolean operations such as and. The result of true and unknown is               false and unknown is            while unknown and unknown is            
unknown, false, unknown
click to copy

DBMS → Indexes 2

The                    provides a set of operations that take one or more relations as input and return a relation as an output.
relational algebra
click to copy
Using the              clause retains only one copy of such identical tuples.
distinct
click to copy

DBMS → Transactions 2

Which one of the following provides the ability to query information from the database and to insert tuples into, delete tuples from, and modify tuples in the database?
dml(data manipulation langauge)
click to copy
The result of           unknown is unknown.
not
click to copy

DBMS → Concurrency Control 2

To remove a relation from an SQL database, we use the              command.
drop table
click to copy
Aggregate functions are functions that take a                        as input and return a single value.
collection of values
click to copy

DBMS → Deadlock 2

Updates that violate                      are disallowed.
integrity constraints
click to copy
A Boolean data type that can take values true, false, and                 
unknown
click to copy

DBMS → Database Security 2

The              clause allows us to select only those rows in the result relation of the           clause that satisfy a specified predicate.
where, from
click to copy
The          connective tests for set membership, where the set is a collection of values produced by a select clause. The           connective tests for the absence of set membership.
in, not in
click to copy

DBMS → PL/SQL 2

The                  clause is used to list the attributes desired in the result of a query.
select
click to copy
The phrase “greater than at least one” is represented in SQL by            
> some
click to copy