Db Midterm Essay

917 Words Nov 27th, 2015 4 Pages
 A composite primary key occurs when you define more than one column as your primary key.
 A char string can be up to 8,000 characters long.
 By definition, a primary key must be unique and must have a value (which is not null).
 How can you prevent the accidental loss of an entire table? Referential integrity
 How many bytes does a single character take up if it is a varchar that supports English and most European languages? 1 byte
 How many bytes does the int data type take up? 4 bytes
 How many bytes does the money data type take up? 8 bytes
 How many clustered indexes can you have for a table? 1
 How many non-clustered indexes can you have? 999
 If you define a primary key, what level have you reached? 1NF
 What
…show more content…
View
 What is an attribute or set of attributes that can be used to uniquely identify the row? Primary key
 What is the set of rules that determine how data is sorted and compared? Collation
 What key is replicated from the primary key of one table to a secondary table, and then all the key attributes get duplicated from the primary table? Foreign key
 What keyword used with the SELECT statement is used to not output specified records? NOT
 What kind of character takes up two bytes of storage and can include almost any language including Chinese, Japanese, and Arabic? Unicode
 What statement is used to delete a table from a database? DROP
 What statement is used to delete one or more rows in a table? DELETE
 What statement would you use to add data to a table? INSERT
 What statement would you use to change data in a table? UPDATE
 What statement would you use to delete the Equipment table? DROP TABLE Equipment;
 What statement would you use to list the First_Name and Last_Name from the Users table which Department is not IT?
SELECT First_Name, Last_Name;
FROM Users;
WHERE Department <> 'IT';

 What statement would you use to pull all records in which the State is CA from the Users table?
SELECT * FROM Users
WHERE State='CA'

 What statement would you use to pull First_Name and Last_Name from the Users table in which Gender is F and State is CA?
SELECT First_Name, Last_Name;
FROM Users;
WHERE Gender = F,

Related Documents

Me and Kaminski (Ich und Kaminski) 2015 | AR ARREDAMENTI | Aventura