SQL Question Answer For Beginners - Part B

1. What is a relational database and how is it different from a flat file or a
2. What is referential integrity?
3. How is data integrity enforced in RDBMS?
4. What is the difference between a key and an index?
5. What databases are supplied with every SQL Server installation?

6. What is the purpose of the Master database in SQL Server?
7. Which SQL Server system database is a template database?
8. How do you resolve many-to-many relationships in RDBMS?
9. What is data normalization?
10. What is the purpose of the first normal form?

11. What components must you define for every database created in SQL
12. How do you create a database with T-SQL?
13. What is the T-SQL syntax for deleting a database?
14. Which databases cannot be deleted from SQL Server?
15. How are SQL Server databases physically stored under Windows 2000?

16. What is the internal language of SQL Server 2000?
17. How do you execute T-SQL statements?
18. What is a variable? How do you declare one?
19. What value could be assigned to VARCHAR datatype.
20. What are the four basic queries in SQL?

21. What are the main control-of-flow T-SQL constructs?
22. What are the different types of joins and what do they do?

1. A relational database is a collection of database objects: tables maintain-ing
relationships based on the primary/foreign key principle, various
means of manipulating these tables, and the rules that enforce the rela-tionships
and their integrity. Unlike spreadsheet tables or flat files,
RDBMS tables are related in a parent/child-like relationship.
2. Referential integrity is a relational database concept referring to a state
of data meaning that there are no “orphaned” records; each record in the
child table must be linked to an existing record in the parent table.
3. Data integrity is enforced on four levels through indices, constraints,
rules, and triggers.
4. A key is a column or combination of columns within the table; each table
can have one primary key and several foreign keys. An index is a separate
database structure created to facilitate faster data access.
5. System databases (Master, MSDB, Model, Temp) and sample databases
(Pubs, Northwind).

6. The Master database contains information about the entire SQL Server
instance: settings, startup information, a description of every database
created on the system, and system stored procedures.
7. The Model database serves as a template for every custom database cre-ated
on the system.
8. You resolve a many-to-many relationship with an intermediate table,
which usually consists of primary-key columns of the tables it relates.
9. Data normalization is a process of breaking large tables into smaller
ones to prevent redundancy and data duplication.
10. The first normal form eliminates repeating groups.

11. In order to create a database you must define the data component and
the transaction log component.
12. Execute the statement CREATE DATABASE with all the
appropriate optional parameters.
13. DROP DATABASE . You can specify more than one data-base
in a single statement.
14. You cannot delete any system databases.
15. A database created within SQL Server 2000 is physically maintained as
two or more system files.

16. Transact SQL (Structured Query Language).
17. You can pass Transact SQL statements to SQL Server to be executed
through a number of interfaces: Query Analyzer, ISQL command line,
OSQL, or any client application programmed to connect to the SQL
18. A variable is a data holder; declaring a variable reserves space where
eventually value would put when it assigned to the variable. You declare
a variable in Transact-SQL with the DECLARE keyword, followed by the
variable name and type. (For example, DECLARE @MyVariable VAR-CHAR(
19. Any text data (character string) up to a length specified in that variable
declaration. It cannot be a number, or date or binary.


No comments: