Class 12

Information Technology (802)

351 questions available

Refine

All questions

351 results
301

Which payment method is NOT mentioned as an option in the XYZ Shopping Website case study?

MCQ Medium
a. Cash on Delivery
b. Credit/Debit card
c. Net Banking
d. Cryptocurrency
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
Cryptocurrency
Explanation: The case study mentions Cash on Delivery, credit/debit card, and net banking as payment options — not cryptocurrency.
302

Which command lists all the tables created in the currently selected database?

MCQ Easy
a. LIST TABLES
b. SHOW TABLES
c. DISPLAY TABLES
d. VIEW TABLES
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
SHOW TABLES
Explanation: SHOW TABLES; displays all the tables created in the current database.
303

A shopping website's database design typically requires separate tables for entities like Category, Product, Customer, and Orders.

TRUE FALSE Medium
a. TRUE
b. FALSE
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
TRUE
Explanation: Different entities (Category, Product, etc.) are typically modeled as separate tables in the database design of a shopping website, connected via primary/foreign keys.
304

Which constraint ensures that a user-specified value (e.g., 40000) is stored when no value is provided for an attribute?

MCQ Easy
a. NOT NULL
b. DEFAULT
c. CHECK
d. UNIQUE
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
DEFAULT
Explanation: The DEFAULT constraint specifies a default value to be used when the user does not provide a value for that attribute.
305

List any four domains/sectors where database management applications are commonly used, as mentioned in the textbook.

SHORT Easy
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
Explanation: Any four of: Education, Banking, Hospitals, Government Sector, Companies, E-Commerce, Airlines, Railways, Telecommunications, Hotels.
306

Which constraint is used to restrict the values of an attribute to a specific range (e.g., Dept_No <= 110)?

MCQ Medium
a. NOT NULL
b. DEFAULT
c. CHECK
d. PRIMARY KEY
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
CHECK
Explanation: The CHECK constraint restricts attribute values within a specified range or condition (note: MySQL does not enforce CHECK, though it doesn't give an error).
307

Write the CREATE TABLE command for the CATEGORY table with schema CATEGORY(Category_id INT(10) Primary Key, Name VARCHAR(20), Description VARCHAR(40)).

LONG Medium
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
Explanation: CREATE TABLE CATEGORY (Category_id INT(10) PRIMARY KEY, Name VARCHAR(20), Description VARCHAR(40));
308

By default, primary key columns are:

MCQ Medium
a. Nullable and can have duplicates
b. NOT NULL, with no need to specify it separately
c. Optional and rarely used
d. Always of type VARCHAR
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
NOT NULL, with no need to specify it separately
Explanation: By default, primary keys are NOT NULL — this constraint does not need to be mentioned separately when declaring a primary key.
309

Explain the four phases of database application development as applied to designing a shopping website, referencing entity identification and table design.

LONG Hard
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
Explanation: Requirement Definition: identify what the shopping website needs to do (browse products, add to cart, checkout) and check feasibility. Design: identify entities like CATEGORY, PRODUCT, CUSTOMER, ORDERS; design their schemas with attributes, data types, and primary/foreign key relationships (e.g., Category_id as foreign key in PRODUCT). Implementation: write the CREATE TABLE SQL statements for the backend database, build the frontend pages (product listing, cart, checkout), and connect them via database connectivity code. Testing: test browsing, cart operations, and payment processing with sample data, fixing any bugs found.
310

If a table's primary key comprises MORE than one attribute, how must it be specified in the CREATE TABLE command?

MCQ Medium
a. Each attribute individually marked PRIMARY KEY
b. As a list of attributes within parentheses using PRIMARY KEY(...)
c. It cannot have more than one attribute
d. Using the FOREIGN KEY clause
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
As a list of attributes within parentheses using PRIMARY KEY(...)
Explanation: A composite primary key must be specified separately as PRIMARY KEY (attribute1, attribute2, ...) listing all attributes comprising it.
311

Given int a=15, b=4; what is the value of a%b?

MCQ Easy
a. 3
b. 60
c. 11
d. 4
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
3
Explanation: The % operator returns the remainder of a divided by b. 15 % 4 = 3.
312

Which clause is used to specify a foreign key and the table/column it references?

MCQ Easy
a. REFERENCES only
b. FOREIGN KEY ... REFERENCES ...
c. LINK TO
d. JOIN ON
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
FOREIGN KEY ... REFERENCES ...
Explanation: FOREIGN KEY (column) REFERENCES table(primary_key_column) is used to specify a foreign key relationship.
313

Given int a=22, b=7; what is the value of a%b?

MCQ Easy
a. 1
b. 3
c. 154
d. 15
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
1
Explanation: The % operator returns the remainder of a divided by b. 22 % 7 = 1.
314

In the Key column of a DESC output, what does 'MUL' next to a foreign key column indicate?

MCQ Hard
a. The column is a primary key
b. Multiple occurrences of a given value can appear in that column
c. The column cannot be NULL
d. The column is unique
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
Multiple occurrences of a given value can appear in that column
Explanation: 'MUL' indicates the column is a foreign key permitting multiple occurrences of a given value.
315

Given int a=9, b=5; what is the value of a%b?

MCQ Easy
a. 4
b. 1
c. 45
d. 5
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
4
Explanation: The % operator returns the remainder of a divided by b. 9 % 5 = 4.
316

Which referential action automatically sets the foreign key value to NULL when the referenced primary key row is deleted?

MCQ Medium
a. CASCADE
b. SET NULL
c. RESTRICT
d. NO ACTION
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
SET NULL
Explanation: ON DELETE SET NULL sets the corresponding foreign key attribute to NULL when the referenced row is deleted.
317

Given int a=31, b=6; what is the value of a%b?

MCQ Easy
a. 1
b. 5
c. 186
d. 25
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
1
Explanation: The % operator returns the remainder of a divided by b. 31 % 6 = 1.
318

Which referential action automatically deletes the corresponding rows in the referencing table when the referenced row is deleted?

MCQ Medium
a. SET NULL
b. RESTRICT
c. CASCADE
d. IGNORE
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
CASCADE
Explanation: ON DELETE CASCADE deletes the corresponding rows in the referencing (child) table when the referenced row in the parent table is deleted.
319

Given int a=18, b=4; what is the value of a%b?

MCQ Easy
a. 2
b. 4
c. 72
d. 14
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
2
Explanation: The % operator returns the remainder of a divided by b. 18 % 4 = 2.
320

Which referential action rejects the delete/update operation on the referenced table if there are related rows in the referencing table?

MCQ Medium
a. CASCADE
b. SET NULL
c. RESTRICT
d. SET DEFAULT
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
RESTRICT
Explanation: RESTRICT rejects the delete or update on the referenced table if there are related foreign key values in the referencing table.