Module 1 Flashcards
A common reason that SQL Server 2012 installation might fail is because the Windows OS is not up to date with service packs or security updates.
True 21
A string concatenation operation evaluates to null if all of the input columns have a value.
False 155
Client applications can only connect to the SQL Server instance on the local computer.
False 89
Define the logical operators AND, OR, and NOT.
• AND – Null conditions must be true. • OR = Any condition must be true. • NOT – Reverses the truth of the original condition. (Page 156)
Describe how to create a database using the SQL programming language and explain why it might be the preferred method.
User databases can be created by executing the CREATE database syntax (STOP)
and supplying a set of configuration parameters using the SQL programming language. (STOP)
The CREATE statement is a SQL instruction to create an object. (STOP)
This option is sometimes preferred by experienced database administrators because it allows them to create standardized scripts, rather than having to manually change each configuration parameter in a Windows form. (Page 117)
Describe the logical organization of a database.
Each database is organized using a logical structure of database objects that overlay the physical average. (STOP)
A logical structure is a way of organizing data, with defined rules for storing, manipulating, and retrieving the data; (STOP)
client applications interact with these logical objects within a database rather than the physical files (Page 75)
Describe the use of the SELECT statement.
The SELECT statement is used to retrieve data from a database, and it is the most commonly used statement in the SQL language. (STOP)
Data retrieved by a SELECT query is returned as a two-dimensional result set. (STOP)
When writing a SELECT statement, you follow the SELECT keyword with a list of the column names that you want to be included in the result set. (STOP)
After specifying the column names, you follow the FROM keyword with a list of the table and view names that will be used to retrieve data (Page 153)
How do you combine data using joins?
A join is a database operation that can be used to merge and retrieve data that is stored in more than one table or view.(STOP)
Inner and outer joins use join conditions – using the ON clause – that specify which columns from each table should be used as the matching key. (Page 163)
How does the SQL language handle case and what are the recommendations on using case when constructing SQL statements?
The SQL language is not case sensitive, however, the normal convention is to write all keywords (e.g. SELECT) in uppercase. (STOP)
Consistent use of naming conventions make your SQL query easier to read and follow,(STOP)
especially once you start writing more complex queries. (Page 153)
If you want to compare a value in a column against a list of values, which syntax would you use? a. WHERE [Column Name] LIKE ([Value1], [Value2], [Value3]) c. WHERE [Column Name] IN ([Value1], [Value2], [Value3]) b. WHERE [Column Name] = ([Value1], [Value2], [Value3]) d. WHERE [Column Name] EXISTS ([Value1], [Value2], [Value3])
(C – Page 156)
If you want to remove duplicates from a result set, which command should you use? a. SELECT AS c. SELECT ONLY b. SELECT UNIQUE d. SELECT DISTINCT
(D – Page 154)
If you want to set the maximum number of digits a numeric data type can hold, what should you set? a. precision c. scale b. length d. size
C 122
If you want to set the number of places after the decimal point in a numeric data type, what should you set? a. precision c. scale b. length d. size
A 122
It’s best to just install SQL Server 2012 using default settings and fine-tune it later.
False 28
Linked servers can be created, modified, or dropped by using a SQL query.
True 99
List and describe three of the five system databases found in an SQL Server 2012 system.
- master – Stores information on the structure of other databases and their components; maintains configuration settings , including security
- tempdb – Stores temporary data that is generated when the database engine executes processes
- model – Stores a database template that is used as a blueprint when creating a new user database
- resource – Stores the system objects in a read-only database; these logically appear in each database in the sys schema
- msdb – Stores information related to jobs, schedules, and database backups (Page 75)
Many tasks can be performed with SQL Server Management Studio, but to delete a database, you need to use a SQL statement in the SQLCMD command prompt.
False 132
Since it is easy to make configuration changes after a database is created, it’s best to get the database created and make changes as necessary afterward.
False 116
SQL is an imperative programming language.
False 152
SQL Server 2012 is only available in 64-bit versions.
False 2
SQL Server 2012 stores the majority of configuration values within one of the user databases that was created automatically during installation.
False 59
The database schema is defined by the DDL components in the SQL programming language.
True 172
The NEW table SQL language statement is used to make a new table.
False 137
The two main physical file types in an SQL Server database are data files and log files.
True 119