Professional Documents
Culture Documents
Structured Query Language is a database tool which is used to create and access database to
support software application.
2. What are the three types of SQL statement? List and describe them.
1) DDL (Data Definition Language): It is used to define the database structure such as tables. It
includes three statements such as Create, Alter, and Drop.
2) DML (Data Manipulation Language): These statements are used to manipulate the data in
records. Commonly used DML statements are Insert, Update, and Delete.
The Select statement is used as partial DML statement that is used to select all or relevant
records in the table.
3) DCL (Data Control Language): These statements are used to set privileges such as Grant
and Revoke database access permission to the specific user.
SQL Injection is a type of database attack technique where malicious SQL statements are
inserted into an entry field of database such that once it is executed the database is opened for an
attacker. This technique is usually used for attacking Data-Driven Applications to have an access
to sensitive data and perform administrative tasks on databases.
When a one table’s primary key field is added to related tables in order to create the common
field which relates the two tables, it called a foreign key in other tables.
Foreign Key constraints enforce referential integrity.
9. What is DBMS?
Database Management System is a collection of programs for managing data. It is system
software which enables the storage, modification, manipulation, and extraction of data from a
database.
It supports the varied users to CREATE, MANAGE, RETRIEVE, UPDATE, and STORE the
information.
10. List the 4 categories of Database which available in the market.
The four categories of Database available in the market include:
• Hierarchical Databases
• Network Databases
• Relational Databases
• Object-oriented Databases
High-security level
Consistency
Data Independence
Enforcement of standards
12. Which of the following views contains command buttons that execute operations on entire
databases?
A. Layout view B. Backstage view C. Design view D. Datasheet view
ANSWER: B
13. List some of database applications.
Some of the popular database applications are: Oracle, Sybase, MS Access, MS SQL Server,
Paradox, DB/2, Dbase, FoxPro, MySql
14. What are the elements of a database?
The major elements of a database are
Tables, Queries, Form, Reports, Macros, Modules
15. Which one from the following is not Data Definition Language command?
A. Create B. Alter C. Insert D. Drop
Answer: C. Insert
Insert is Data Manipulation Language command
16. Which one of from the following commonly used constraints available in SQL?
20. Which of the following is the preferred way to recover a database after a system failure?
A. Rollback
B. Rollforward
C. Switch to duplicate database
D. Reprocess transactions
Answer: C
21. What are different backups available in SQL Server?
Ans. Different possible backups are:
Full backup
Differential Backup
Transactional Log Backup
Copy Only Backup
File and Filegroup backup
Incremental backup
22. Which statement is wrong about PRIMARY KEY constraint in SQL?
A. The PRIMARY KEY uniquely identifies each record in a SQL database table
B. Primary key can be made based on multiple columns
C. Primary key must be made of any single columns
D. Primary keys must contain UNIQUE values.
Answer: C
Primary key of a table can be made based on single column or with combination of
multiple columns.
23. In a table, a column contains duplicate value, if you want to list all different value only, then
which SQL clause is used?
A. SQL DISTINCT
B. SQL UNIQUE
C. SQL BETWEEN
D. SQL Exists
Answer: A
DISTINCT keyword is used to fetch different (unique) value. UNIQUE keyword is known as
constraint that is applied to a table, e.g. if UNIQUE is applied to a column, that column will
allow only unique records to store and will not accept duplicate record.
24. Logical operators used in SQL are
A. AND, OR , NOT
B. &&, ||,!
C. $,|,!
D. None of the above
Answer: A
25. The command to eliminate a table from a database in SQL is:
A. REMOVE TABLE CUSTOMER;
B. DROP TABLE CUSTOMER;
C. DELETE TABLE CUSTOMER;
D. UPDATE TABLE CUSTOMER;
E. None
Answer: B
26. Which of the following is the correct order of keywords for SQL SELECT statements?
A.SELECT, WHERE, FROM
B. FROM, WHERE, SELECT
C.WHERE, FROM, SELECT
D. SELECT, FROM, WHERE
Answer: D
27. Which one of the following sorts rows in SQL?
A. SORT BY
B. ALIGN BY
C. ORDER BY
D. GROUP BY
Answer:C
28. Which one of the following statements is false?
A. The data dictionary is normally maintained by the database administrator.
B. Data elements in the database can be modified by changing the data dictionary.
C. The data dictionary contains the name and description of each data element.
D. The data dictionary is a tool used exclusively by the database administrator.
Answer: B