Anda di halaman 1dari 3

SQL Commands:

SQL commands are instructions, coded into SQL statements, which are used to
communicate with the database to perform specific tasks, work, functions and
queries with data.
SQL commands can be used not only for searching the database but also to
perform various other functions like, for example, you can create tables, add
data to tables, or modify data, drop the table, set permissions for users. SQL
commands are grouped into four major categories depending on their
functionality:
 Data Definition Language (DDL) - These SQL commands are used for
creating, modifying, and dropping the structure of database objects. The
commands are CREATE, ALTER, DROP, RENAME, and TRUNCATE.
 Data Manipulation Language (DML) - These SQL commands are used for
storing, retrieving, modifying, and deleting data.
These Data Manipulation Language commands
are: SELECT, INSERT, UPDATE, and DELETE.
 Transaction Control Language (TCL) - These SQL commands are used
for managing changes affecting the data. These commands are COMMIT,
ROLLBACK, and SAVEPOINT.
 Data Control Language (DCL) - These SQL commands are used for
providing security to database objects. These commands are GRANT and
REVOKE.

Following are the multiple choice questions of data base management system (DBMS)
and SQL concepts based on the UGC-NET exams, TET exams and other competitive
exams point of view.

1) Related fields in a database are grouped to form ?


a. Data Fields
b. Data Record
c. Menu
d. Bank
e. None of above
Show/Hide Answer
Answer = B
Explanation: Related fields in the data base are grouped into the Records. Records are
the total of all information of a particular item.

2) Entities having primary key are called ?


a. Primary Entities
b. Strong Entities
c. Weak Entities
d. Primary Key
Show/Hide Answer
Answer = B
Explanation: Entity having its own primary key is called a strong entity and the entity
not having its own primary key is called a weak entity.
3) In the E-R diagrams, the term cardinality is a synonym for the term ?
a. Attribute
b. Degree
c. Entities
d. Cartesian
Show/Hide Answer
Answer = D
Explanation: No Explanation
4) TRUNCATE statement in SQL is a ?
a. DML statement
b. DDL statement
c. DCL statement
d. None of above
Show/Hide Answer
Answer = B
Explanation: TRUNCATE statement remove all records from a table, including all spaces
allocated for the records are removed.
5) The default date format in SQL is ?
a. DD-MON-YY
b. DD-MM-YY
c. DD-MM-YYY
d. MM-DD-YY
Show/Hide Answer
Answer = A
Explanation: No Explanation
6) For adding number of hours to a date, which of the following statement is used ?
a. Date + Number
b. Date + Number/24
c. Date + Number of Hours
d. None of above
Show/Hide Answer
Answer = B
Explanation: For example we want to add 3hrs to the date then we use the statement :
DATE + 3/24

7) Which syntax is the more accurate for creating SYNONYM ?


a. CREATE [PUBLIC] SYNONYM synonym for object
b. CREATE SYNONYM synonym for object from table name
c. CREATE [PUBLIC] SYNONYM synonym for column name
d. None of these
Show/Hide Answer
Answer = A
Explanation: No Explanation
8) A data dictionary is a special file that contains ?
a. the names of all fields in all files
b. the data types of all fields in all files
c. the widths of all fields in all files
d. All of above
e. None of above
Show/Hide Answer
Answer = D
Explanation: Refer: http://en.wikipedia.org/wiki/Data_dictionary

9) A command that lets you change one or more fields of a record is ?


a. insert
b. Modify
c. Look-up
d. All of above
e. None of above
Show/Hide Answer
Answer = B
Explanation: No Explanation
10) In a large DBMS ?
a. Each user can see only a small part of the entire database
b. Each user can access every sub schema
c. Each sub schema contains every field in the logical schema
d. All of above
e. None of above
Show/Hide Answer
Answer = A
Explanation: No Explanation
- See more at: http://allquiz.blogspot.in/2012/06/objective-type-questions-on-data-
base.html#sthash.UYPq566k.dpuf

Anda mungkin juga menyukai