Match the following -List I List II (a) DDL (i) LOCK TABLE (b) DML (ii) COMMIT (c) TCL (iii) Natural Difference (d) Binary operation (iv) REVOKE
This question asks us to match different types of database commands and operations with specific examples. Let's understand each category and example provided in the lists.
Now let's match the categories from List I with the specific examples from List II based on their functions:
| List I | List II | Match |
|---|---|---|
| (a) DDL | (i) LOCK TABLE | (a) - (iv) |
| (b) DML | (ii) COMMIT | (b) - (i) |
| (c) TCL | (iii) Natural Difference | (c) - (ii) |
| (d) Binary operation | (iv) REVOKE | (d) - (iii) |
The correct matching is a - (iv), b - (i), c - (ii), d - (iii).
| Category | Purpose | Example from List II | Other Examples |
|---|---|---|---|
| DDL (Data Definition Language) | Define/modify database structure, permissions | REVOKE | CREATE, ALTER, DROP, GRANT |
| DML (Data Manipulation Language) | Manage data within objects | LOCK TABLE | SELECT, INSERT, UPDATE, DELETE |
| TCL (Transaction Control Language) | Manage transactions | COMMIT | ROLLBACK, SAVEPOINT |
| Binary Relational Operation | Combine two relations | Natural Difference | Union (\( \cup \)), Intersection (\( \cap \)), Cartesian Product (\( \times \)) |
Relational algebra is a procedural query language used in database systems. It provides a set of operations to manipulate relations (tables) and produce new relations. These operations can be unary (acting on one relation) or binary (acting on two relations).
SQL (Structured Query Language) is the standard language for managing relational databases. While SQL has commands that correspond to relational algebra concepts, it also includes commands for data definition, transaction control, and other database management tasks, categorized into DDL, DML, and TCL.
CREATE TABLE, ALTER TABLE, DROP TABLE, GRANT, and REVOKE are DDL.SELECT, INSERT, UPDATE, and DELETE are DML.COMMIT, ROLLBACK, and SAVEPOINT are TCL.UNION, EXCEPT/MINUS, JOIN clauses).Consider a relation book (title, price) which contains the titles and prices of different books.
Assuming that no two books have the same price, what does the following SQL query list ?
Select title
from book as B
where (select count (*)
from book as T
where T.price > B.price) < 7Given the following STUDENT‐COURSE scheme : STUDENT (Rollno, Name, courseno) COURSE (courseno, coursename, capacity), where Rollno is the primary key of relation STUDENT and courseno is the primary key of relation COURSE. Attribute coursename of COURSE takes unique values only. Which of the following query(ies) will find total number of students enrolled in each course, along with its coursename.
A. SELECT coursename, count(*) 'total' from STUDENT natural join COURSE group by coursename;
B. SELECT C.coursename, count(*) 'total' from STUDENT S, COURSE C where S.courseno = C.courseno group by coursename;
C. SELECT coursename, count(*) 'total' from COURSE C where courseno in (SELECT courseno from STUDENT);
Which of the following is used to create a database schema?
Which of the component module of DBMS does rearrangement and possible ordering of operations, eliminate redundancy in query and use efficient algorithms and indexes during the execution of a query?
Which of the following statements are DML statements?
(a) Update [tablename] Set [columnname] = VALUE
(b) Delete [tablename]
(c) Select * from [tablename]