Menu

Question Discussion & Solution

MCQ
Q.
a)

forum Community Discussion

speaker_notes_off

No discussions yet. Be the first to start!

You must be logged in to participate in the discussion.

login Login to Discuss

auto_awesome Similar Questions

NAT
1.
Consider a table **EmployeeLogs(emp_id INT, log_time TIMESTAMP, action VARCHAR(10))** where **action ∈ { 'LOGIN', 'LOGOUT' }**. Each employee may log in and out multiple times per day. Assume the table contains **10,00,000 rows**, and the following advanced SQL query is executed on a PostgreSQL-like system: ``` WITH session_pairs AS ( SELECT emp_id, log_time AS login_time, LEAD(log_time) OVER (PARTITION BY emp_id ORDER BY log_time) AS logout_time, LEAD(action) OVER (PARTITION BY emp_id ORDER BY log_time) AS next_action FROM EmployeeLogs ) SELECT COUNT(*) FROM session_pairs WHERE next_action = 'LOGOUT' AND logout_time IS NOT NULL AND logout_time > login_time; ``` Assume: - For every employee, **exactly 60%** of all rows are `'LOGIN'` actions. - Every `'LOGIN'` is eventually followed by a `'LOGOUT'` for the same employee. - No two consecutive actions for the same employee are `'LOGIN'`. - The distribution of rows across employees does not affect the ratio. Compute the **exact number of valid login–logout session pairs** returned by the query. Give the numerical answer.
forum Discussion
MCQ
2.
Which of the following is used to store movie and image files?
forum Discussion
MCQ
3.
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 _____
forum Discussion
MCQ
4.
Which of the following database object does not physically exist?
forum Discussion
MCQ
5.
In the query given above which one of the following is a temporary relation?
forum Discussion

category More Database Management System Topics

article

Miscellaneous or General

format_list_bulleted 71 MCQs
article

Relational Algebra

format_list_bulleted 3 MCQs
article

Database Systems

format_list_bulleted 49 MCQs
article

Data Models

format_list_bulleted 16 MCQs
article

The Relational Database Model

format_list_bulleted 58 MCQs
article

Entity Relationship (ER) Modeling

format_list_bulleted 59 MCQs
article

Advanced Data Modeling

format_list_bulleted 1 MCQs
article

Normalization

format_list_bulleted 58 MCQs
article

Structured Query Language (SQL)

format_list_bulleted 7 MCQs
article

Advanced SQL

format_list_bulleted 90 MCQs
article

Database Design

format_list_bulleted 2 MCQs
article

Transaction and Concurrency

format_list_bulleted 10 MCQs
article

Data Warehouses

format_list_bulleted 10 MCQs
article

Database Administration

format_list_bulleted 1 MCQs
article

Mixed

format_list_bulleted 10 MCQs