



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
(a) Relation is a table storing logically related data. (b) Data must be atomic in cell. (c) All rows of relation are distinct.
Typology: Summaries
Uploaded on 05/11/2023
1 / 6
This page cannot be seen from the preview
Don't miss anything!




Worksheet 1 -SQL Q1. What does the abbreviation DBMS stand for? (a) Data Borrowing and Movement Software. (b) Database Management System. (c) Digital Base Mapping System. (d) Database Manipulation Software. Q2. Which is not an advantage of DBMS is? (a) Database Systems reduce data redundancy (b) Database Systems control data inconsistency (c) Database Systems restrict sharing of data (d) Database Systems ensure data security. Q3. In …. …….. , the data is organized in to tables i.e. rows & columns. (a) Relational Model (b) Network Model (c) Hierarchical Model (d) Object Oriented Model Q4. The essential features of Object Oriented Data Model are; (a) Object identity (b) Encapsulation (c) Data Abstraction (d) All of the above Q5. Which statement is false in context to the term Relation? (a) Relation is a table storing logically related data. (b) Data must be atomic in cell (c) All rows of relation are distinct. (d) Ordering of rows & columns is relevant. Q6. A row of relation generally referred to as ……….. and column of a relation is ………… (a) Domain & Attribute (b) Attribute & Domain (c) Tuple & Attribute (d) Attribute & Tuple
Q7. A relation has 45 tuples & 5 attributes, what will be the Degree & Cardinality of that relation? (a) Degree 5, Cardinality 45 (b) Degree 45, Cardinality 5 (c) Degree 50, Cardinality 45 (d) Degree 50, Cardinality 2250 Q8. _________is the attribute or group of attributes that uniquely identify occurrence of each entity. (a) Foreign key (b) Super Key (c) Primary Key (d) All of these Q9. A Candidate key that is not a primary key, is called …………… (a) Alternate key (b) Foreign key (c) Primary key (d) Super Key Q10. A non-key attribute, whose values are derived from primary key of some other table. (a) Alternate key (b) Foreign key (c) Primary key (d) Super Key Q11. MySQL database system consists of- (a) MySQL Server Instance (b) MySQL Database (c) MySQL Query Optimizer (d) (a) & (b) both Q12. Which commands are used to define or redefine schema objects? (a) DDL (b) DML (c) TCL (d) (a) & (b) both Q13. Data definition includes:
Q20. Which is a valid CREATE TABLE statement? (a) Create table emp add(id integer(3)); (b) Create table emp (id integers(3)); (c) Create table emp modified (id integer(3)); (d) Create table emp (id integer(3)); Q21. How can you insert a new row into the “STORE” table. (a) INSERT ROW (1,‟ RAM SINGH‟) INTO STORE; (b) INSERT VALUES(1,‟ RAM SINGH‟) INTO STORE; (c) INSERT INTO (1,‟ RAM SINGH‟) STORE; (d) INSERT INTO STORE VALUES (1,‟ RAM SINGH‟); Q22. Select statement has four clauses 1. Where 2.Having 3. Group By 4. Order by The correct order of all clause in a select is :- (a) 1, 2, 3 & 4 (b) 1, 3, 2 & 4 (c) 1, 4, 3 & 2 (d) 1, 3, 4 & 2 Q23. Conditionally retrieval of rows from a table with SELECT, which clause is used? (a) Where (b) Having (c) Group By (d) Order by Q24. The ……………. key word eliminates duplicate rows from the result of a SELECT statement. (a) All (b) Unique (c) Distinct (d) IN Q25. Which operator defines a range of values that the column values must fall in? (a) In (b) Like (c) Between (d) Is
Q26. To specify a list of values …………. Operator is used. (a) In (b) Like (c) Between (d) Is Q27. We use …………… operator with select for condition based on pattern matching. (a) In (b) Like (c) Between (d) Is Q28. Which SQL statement will not generate any error message? (a) SELECT * FROM EMP WHERE EMPNO LIKE (1,2,3,4); (b) SELECT * FROM EMP WHERE SAL BETWEEN 3000 TO 15000; (c) SELECT * FROM EMP WHERE COMM IS NOT NULL; (d) All of the above Q29. To display the detail of employee having „e‟ in their name in descending order of salary the correct SQL statement is : (a) SELECT * FROM emp WHERE ename LIKE „e%‟ ORDER BY SAL ; (b) SELECT * FROM emp ORDER BY SAL DESCWHERE ename LIKE „%e%‟ ; (c) SELECT * FROM emp WHERE ename LIKE „%e%‟ ORDER BY DESCSAL; (d) SELECT * FROM emp WHERE ename LIKE „%e%‟ ORDER BY SAL DESC; Q30. Which statement is valid? (a) ALTER TABLE EMPLOYEE MODIFY (last_name CHAR2(2000)); (b) ALTER TABLE EMPLOYEE CHANGE (last_name CHAR2(2000)); (c) ALTER TABLE EMPLOYEE CHANGE (last_name VARCHAR2 (2000)); (d) ALTER TABLE EMPLOYEE MODIFY (last_name VARCHAR2 (2000));