0% found this document useful (0 votes)
284 views

A) Collection of Values

1) Aggregate functions take a collection of values as input and return a single value. They are used with the SELECT statement to retrieve aggregate data from database tables. 2) The COUNT function is used to eliminate duplicate values in an aggregate expression. 3) In a relational database, primary and foreign keys are used to define relationships between tables and enforce referential integrity constraints.

Uploaded by

Rimu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
284 views

A) Collection of Values

1) Aggregate functions take a collection of values as input and return a single value. They are used with the SELECT statement to retrieve aggregate data from database tables. 2) The COUNT function is used to eliminate duplicate values in an aggregate expression. 3) In a relational database, primary and foreign keys are used to define relationships between tables and enforce referential integrity constraints.

Uploaded by

Rimu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

1) Aggregate functions are functions that take a ___________ as input and return a

single value
a) Collection of values
b) Single value
c) Aggregate value
d) both a& b

2)Select ________ from instructor where dept name= ’Comp. Sci.’;


Which of the following should be used to find the mean of the salary ?

a) Mean(salary)
b) Avg(salary)
c) Sum(salary)
d) Count(salary)

3) Select count (____ ID) from teaches where semester = ’Spring’ and year = 2010;
If we do want to eliminate duplicates, we use the keyword ______in the aggregate
expression.

a)Count
b)Distinct
c)Avg
d)Primary Key

4) . A Boolean data type that can take values true, false, and________

a)1
b)0
c)Null
d)Unknown

5) A Delete command operates on ______ relation


a)one
b)two
c)several
d)null
6) Delete from r where P;
The above command
a) Deletes a particular tuple from the relation
b) Deletes the relation
c) Clears all entries from the relation
d) All of the mentioned

7) Update instructor_____ salary= salary * 1.05;


a)Where
b)set
c)in
d)select

8) Every weak entity set can be converted into a strong entity set by:
a. using generalization
b. adding appropriate attributes
c. using aggregation
d. none of the above
9) The number of entities to which another entity can be associated via a relationship set is
expressed as:
a. Entity
b. Cardinality
c. Schema
d. Attributes

10) In a relational database a referential integrity constraint can be specified with the help of
a. primary key
b. foreign key
c. secondary key
d. none of the above

11) A super key is a set of one or more attributes that, taken collectively, allow us
a. to identify uniquely an entity in the entity set
b. to make the key most powerful for faster retrieval
c. to increase effectiveness of database access
d. none of the above
12) Which command is used to remove all rows from a table?
a. Delete
b. Remove
c. Truncate
d. Both [A] and [B]
13) Which of the following is an aggregate function in SQL?
a. Union
b. Like
c. Group By
d. Max
14) Which command is used to add a column to an existing table?
a. Create
b. Update
c.Alter
d. None of these
15)The Relational Model concern with
a)Data Structure & Data Integrity
b)Data Manipulation
c)Both a and b
d)None of these
16) Which key provides the basic tuple-level addressing mechanism in a relational
System ?
a) Candidate Key
b) Alternative Key
c) Primary Key
d) None of these
17) Any entity in A is associated with any number of entities in B, however an
entity in B is associated with almost one entity in A
a) One to One
b) Many to Many
c) Many to One
d) One to Many
18) Which of the following is not an integrity constraint?
a) not null
b) unique
c) identical
d) check

20) In a relation database, every tuples divided into the fields are known as
the______.
a. Queries
b. Domains
c. Relations
d. All of the above

21) Which of the following refers collection of the information stored in a database
at a specific time?
a. Independence
b. Instance of the database
c. Schema
d. Data domain

22) The term "Data independence" refers to____


a. Data is defined separately and not included in the programs
b. Programs are not dependent on the logical attributes of the data
c. Programs are not dependent on the physical attributes of the data
d. Both B & C

23) Which one of the following refers to the total view of the database content?
a. Conceptual view
b. Physical view
c. Internal view
d. External view

24) The architecture of a database can be viewed as the ________


a. One level
b. Two-level
c. Three-level
d. Four level

25) Which of the following levels is considered as the level closed to the end-
users?
a. Internal Level
b. External Level
c. Conceptual Level
d. Physical Level

26) Which one of the following is commonly used to define the overall design of
the database?
a. Application program
b. Data definition language
c. Schema
d. Source code
27) The 'NULL' represents
a.0
b.blank space
c.absence of any value
d.none of the above
28)Student(ID, name, dept name, tot_cred)
In this query which attribute form the primary key?
a) Name
b) Dept
c) Tot_cred
d) ID

29 )Constraints are the preferred method for enforcing data

A. data topple
B. data integrity
C. data inheritance
D. None of the above
30) An ________ is a set of entities of the same type that share the same
properties, or attributes.
A. Entity set
B. Attribute set
C. Relation set
D. Entity model
31) Which of the following is a single valued attribute?

A. Register_number
B. Address
C. SUBJECT_TAKEN
D. Reference
32) The attributes made up of more than one single attributes are called

A. Composite attribute
B. Derived attribute
C. Single value attribute
D. Multi value attribute
33) Which is the subset of SQL commands used to manipulate Oracle Database
structures, including tables?

A. Data Definition Language(DDL)


B. Data Manipulation Language(DML)
C. DML and DDL
D. None of the Mentioned
34_ In SQL, which of the following is not a data definition language commands?

A. RENAME
B. REVOKE
C. GRANT
D. UPDATE
35) Which requirements can be implemented using a CHECK constraint?

A. Customer must have a name


B. Two customers cannot have same email id
C. Both A and B
D. None of the above
36)What is the meaing of “ GROUP BY” clause in MySql?

a) None of the mentioned


b)group by column values
c)group data by row value
d)group data by column and row value
37) Which clause is similar to “HAVING” clause in Mysql?
a)select
b)where
c)from
d)none of the above
38) Which clause is used with an “aggregate functions”?
a)group by
b)select
c)where
d)both group by and having
39) What will be the order of sorting in the following MySQL statement?
SELECT emp_id, emp_name
FROM person
ORDER BY emp_id, emp_name;
a) Sorting {emp_id, emp_name}
b) Sorting {emp_name, emp_id}
c) Sorting (emp_id} but not emp_name
d) None of the mentioned
40) If emp_id contain the following set {-1, -2, 2, 3, -3, 1}, what will be the output
on execution of the following MySQL statement?
SELECT emp_id
FROM person
ORDER BY emp_id;
a) {-3, -2, -1, 1, 2, 3}
b) {-1, 1, -2, 2, -3, 3}
c) {1, 2, 3, -1, -2, -3}
d) None of the mentioned
41) Which keyword is used for sorting the data in descending order in Mysql?
a)DESC
B)ASC
C)alter
d)modify
42) Which of the following clauses is used to display information that match a
given pattern?
a)LIKE
b)WHERE
c)IS
d) SAME
43) What is ‘xyz’ in the following SQL statement?
SELECT abc FROM xyz;
a) row name
b) column name
c) table name
d) database name
44)  What does comparing a known value with NULL result into?
a)zero
b)a positive value
c)a negative value
d)null
45) Which of the following columns in a table cannot be updated?

A. DATE type columns in the table


B. Columns which allows NULL values in the table
C. A primary key column which also serves as foreign key reference in another
table
D. All of the above
46) ) A type of query that is placed within a WHERE or HAVING clause of
another query is called

A. Master query
B. Sub query
C. Super query
D. Multi-query
47) Select the sequence for how the query mechanism works?
A. Authentication-> DDL->DML->query optimizer->output
B. DDL->DML->query optimizer-> Authentication->output
C. DML->query optimizer-> Authentication-> DDL-> output
D. All of the mentioned
48) Choose a data type to store weight of a person in kilograms with accuracy of 1
gram. As per wikipedia, Jon Brower Minnoch was the heaviest human ever
recorded with a weight of 635kg.

A. NUMBER(3,3)
B. NUMBER(3,2)
C. NUMBER(6,2)
D. NUMBER(6,3)

49) In general, a file is basically a collection of all related______.


a. Rows & Columns
b. Fields
c. Database
d. Records

50) The term "TCL" stands for_____.


a. Ternary Control Language
b. Transmission Control Language
c. Transaction Central Language
d. Transaction Control Language

You might also like