Skip to main content

Introduction to Computing MCQs with Answers

Practice important Introduction to Computing MCQs with answers and explanations.

Chapter: 156
Q2201:
Fill in the blank: The `SELECT` operation in relational databases creates a new relation that contains only the tuples __________.
A. From a different relation
B. Matching the specified condition
C. With all attributes of the parent relation
D. Without any specific attributes
Correct Answer: B
Chapter: 156
Q2202:
What kind of relation is formed by performing the SELECT operation with a condition?
A. A relation with only one tuple
B. A relation with no tuples
C. A relation with all tuples
D. A relation with tuples matching the condition
Correct Answer: D
Chapter: 156
Q2203:
In the SELECT operation syntax `NEW <- SELECT from EMPLOYEE where EmplId = '34Y70'`, which part specifies the filter criterion?
A. `NEW`
B. `EMPLOYEE`
C. `SELECT`
D. `where EmplId = '34Y70'`
Correct Answer: D
Chapter: 156
Q2204:
Fill in the blank: To create a relation containing tuples from `EMPLOYEE` where the `EmplId` is '34Y70', the SELECT operation would use the syntax __________.
A. `NEW <- SELECT from EMPLOYEE where EmplId = '34Y70'`
B. `NEW <- INSERT into EMPLOYEE where EmplId = '34Y70'`
C. `NEW <- UPDATE EMPLOYEE where EmplId = '34Y70'`
D. `NEW <- DELETE from EMPLOYEE where EmplId = '34Y70'`
Correct Answer: A
Chapter: 156
Q2205:
What is the outcome if no tuples match the condition `EmplId = '34Y70'` in the SELECT operation?
A. The `NEW` relation will contain all tuples from `EMPLOYEE`
B. The `NEW` relation will contain only the tuples with different `EmplId` values
C. The `NEW` relation will be empty
D. The `NEW` relation will contain the same tuples as `EMPLOYEE`
Correct Answer: C
Chapter: 157
Q2206:
What does the PROJECT operation in relational databases do?
A. It extracts rows from a relation
B. It extracts columns from a relation
C. It updates tuples in a relation
D. It deletes tuples from a relation
Correct Answer: B
Chapter: 157
Q2207:
In the statement `NEW2 <- PROJECT JobTitle from NEW1`, what does `NEW2` represent?
A. A new relation containing the JobTitle column
B. A new relation containing all columns from NEW1
C. A new relation with no data
D. A new relation containing only the selected rows
Correct Answer: A
Chapter: 157
Q2208:
What will the `MAIL` relation contain after executing `MAIL <- PROJECT Name, Address from EMPLOYEE`?
A. A single column of names and addresses
B. All columns of EMPLOYEE relation
C. Only names of employees
D. Only addresses of employees
Correct Answer: A
Chapter: 157
Q2209:
If you want to extract multiple columns using the PROJECT operation, what should you specify?
A. Multiple column names separated by commas
B. One column name with a condition
C. Multiple relations with a common column
D. Only the first column of the relation
Correct Answer: A
Chapter: 157
Q2210:
What is the result of the PROJECT operation `MAIL <- PROJECT Name, Address from EMPLOYEE`?
A. A relation with employee names and addresses
B. A relation with employee IDs and names
C. A relation with all employee data
D. A relation with only the department names
Correct Answer: A
Chapter: 157
Q2211:
Fill in the blank: To create a relation with just the JobTitle column from NEW1, the PROJECT operation would use the syntax __________.
A. `NEW2 <- PROJECT Name from NEW1`
B. `NEW2 <- PROJECT JobTitle from NEW1`
C. `NEW2 <- SELECT JobTitle from NEW1`
D. `NEW2 <- EXTRACT JobTitle from NEW1`
Correct Answer: B
Chapter: 157
Q2212:
Fill in the blank: The PROJECT operation is used to create a new relation containing __________ from an existing relation.
A. Rows
B. Columns
C. Constraints
D. Indexes
Correct Answer: B
Chapter: 157
Q2213:
Which of the following operations extracts specific columns from a relation?
A. PROJECT
B. SELECT
C. JOIN
D. UNION
Correct Answer: B
Chapter: 157
Q2214:
What type of relation is produced by the PROJECT operation `MAIL <- PROJECT Name, Address from EMPLOYEE`?
A. A two-column relation containing names and addresses
B. A relation with all employee details
C. A single-column relation with names
D. A relation with addresses only
Correct Answer: A
Chapter: 157
Q2215:
Fill in the blank: The PROJECT operation on the relation EMPLOYEE with columns Name and Address will create a new relation called __________.
A. ADDRESS
B. NAME
C. MAIL
D. EMPLOYEE_CG
Correct Answer: A
Chapter: 157
Q2216:
Which statement accurately describes the PROJECT operation?
A. It filters rows based on conditions
B. It combines tuples from multiple relations
C. It selects specific columns from a relation
D. It updates existing tuples in a relation
Correct Answer: C
Chapter: 158
Q2217:
What does the JOIN operation in relational databases do?
A. It combines rows from different relations
B. It extracts columns from a relation
C. It updates tuples in a relation
D. It deletes tuples from a relation
Correct Answer: A
Chapter: 158
Q2218:
In the JOIN operation `C <- JOIN A and B where A.W = B.X`, what does the condition `A.W = B.X` specify?
A. The values of attributes W and X must be equal
B. The values of attributes W and X must be different
C. The values of attributes W and X must be greater than a threshold
D. The values of attributes W and X must be less than a threshold
Correct Answer: A
Chapter: 158
Q2219:
What is the purpose of prefixing attributes with the relation name in the JOIN operation?
A. To ensure unique attribute names in the result relation
B. To specify which relation to update
C. To filter tuples based on attribute values
D. To aggregate data from multiple relations
Correct Answer: A
Chapter: 158
Q2220:
In the JOIN operation `C <- JOIN A and B where A.W < B.X`, what does `A.W < B.X` imply?
A. Attribute W in relation A must be less than attribute X in relation B
B. Attribute W in relation A must be greater than attribute X in relation B
C. Attribute W in relation A must be equal to attribute X in relation B
D. Attribute W in relation A must not be equal to attribute X in relation B
Correct Answer: A

Test Your Knowledge

Take a timed quiz on Introduction to Computing

🚀 Start Quiz Now