0% found this document useful (0 votes)
2 views2 pages

Unit 3_dbms_cs Worksheet 2.Docx

The document is a worksheet focused on Database Management Systems (DBMS) and SQL, containing a series of questions and tasks related to SQL commands, database constraints, and data integrity. It includes true/false questions, multiple-choice questions, and practical SQL query tasks. The worksheet aims to test knowledge and understanding of key concepts in DBMS and SQL programming.

Uploaded by

arunalokesh85
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Unit 3_dbms_cs Worksheet 2.Docx

The document is a worksheet focused on Database Management Systems (DBMS) and SQL, containing a series of questions and tasks related to SQL commands, database constraints, and data integrity. It includes true/false questions, multiple-choice questions, and practical SQL query tasks. The worksheet aims to test knowledge and understanding of key concepts in DBMS and SQL programming.

Uploaded by

arunalokesh85
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

COMPUTER SCIENCE WORKSHEET

TOPIC: DBMS & SQL

1. Say True/False. In SQL, the values for date data type can be stored in the form ‘DD-MM-YYYY’.
2. Which of the following SQL command allows us to perform tasks related to database schema?
a) DDL ​ ​ b) DML ​ ​ c) TCL ​ ​ d) None of these.
3. Identify the following which is a text that is not executed in MySQL.
a) Statement ​ ​ b) Query ​ ​ c) Comment ​ ​ d) Clause.
4. Which of the following type of table constraints will prevent the entry of duplicate rows?
a) Unique ​ ​ b) Distinct ​ ​ c) Primary Key ​ d) NULL
5. Which of the following special character cannot be used to name a table?
a)$ ​ ​ ​ b) @ ​ ​ ​ c) - ​ ​ ​ d)All of these
6. Write a query to create and open a database DB and Create a table EMPLOYEE with fields
EMP_NO – string , EMP_DESGN – string , EMP_SAL – decimal , DOJ – date.
7. In RDBMS, R stands for_________
a) Relational ​ ​ b)Rotational ​​ c)Rational ​ ​ d)None of the above
8. Cardinality is total ___________.
a) number of rows in a table ​ ​ ​ b) number of columns in a table
c) number of data items in a table ​ ​ d) none of the above
6. Degree refers to total_________
a) number of rows in a table ​ ​ ​ b) number of columns in a table
c) number of data items in a table ​ ​ d) none of the above
7. Referential Integrity is a rule that ensures ____________ between records in related tables are valid.
a) Links ​ ​ b)difference ​ ​ c)relationship ​​ d)similarity
8. Data about data is _________.
a) Data redundancy ​ b) Meta Data ​​ c) Database schema ​ ​ d) None of the above
9. Repetition of data is called ________.
a) Data redundancy ​ b) Data Description ​ c) Data inconsistency ​​ d) None of the above
10. Mismatched redundant copies of data is known as data _______.
a) Dependence ​ b)Inconsistency ​ c)Isolation ​ ​ ​ d)Redundancy
18. A _____ is a property of the entire relation, rather than of the individual tuples in which each
tuple is unique.
a) Rows ​ ​ b)Key ​​ ​ c)Attribute ​ ​ ​ d)Fields
19. A _________ integrity constraint requires that the values appearing in specified attributes of any tuple in
the referencing relation also appear in specified attributes of at least one tuple in the referenced relation.
a) Referencing ​ b) Referential ​ c) Primary ​ ​ ​ d) Specific

Choose the correct choice as:


(a) Both Assertion (A) and Reason (R) are the true and (R) is a correct explanation of (A).
(b) Both Assertion (A) and Reason (R) are the true but (R) is not a correct explanation of (A).
(c) Assertion (A) is true and Reason (R) is false. (d) Assertion (A) is false and Reason (R) is true.

20. Assertion (A): Primary key constraints allows NULL values.


Reason (R): The primary key constraints ensures that a column can contain unique Values for each row.

21. Assertion (A): UNIQUE keyword ensures no duplicate values in a table.


Reason (R): DISTINCT is similar to UNIQUE
22. A table TEACHER has attributes CODE, NAME, POST, CATEGORY. Write down the command to
delete the attribute CATEGORY from this table.

23. Write the queries to Create a database named as ‘Company’ and then Create a Table with use of
NOT NULL and Primary Key constraints for following relation definition:
Staff (StaffID, FirstName, LastName, IsQualified) where

24. An organisation named PRIDE wants to put all the data in the form of records. The records are
stored in a table and tables are stored in a database. Which DDL command is used to create a
database name PRIDE.

25. James wants to see the whole structure of a relation titled as “MotorCycle” which have already
been developed in MySQL in the database named as “TwoWheeler”. What query he should write
when he just opened MySQL on his machine?

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy