click below
click below
Normal Size Small Size show me how
Sql
SQL Certified Expert Exam
Question | Answer |
---|---|
What is 3NF? | 2NF plus all the tables contain no data other than that which describes the intent of the primary key - erroneous data is placed in separate tables. |
Select Statement? | Retrieves data from a table. |
Insert Statement? | Add new data to a table. |
Update Statement? | Modifies existing data in a table. |
Delete Statement? | Removes existing data from a table. |
What is the Create Object_Type statement? | Creates a new database object, such as a table |
What is the Alter Object_Type statement? | Modified the structure of an object, such as a table. |
What is the Drop Object_Type statement? | Removes an existing database object, such as a table. |
What are the database objects to be included on the exam? | Constraints, Indexes, Roles, Sequences, Synonyms, Tables, Users, Views. |
What is a Synonym? | An alias for another object in the database. |
What is a constraint> | A small bit of logic defined by you to instruct a particular table about how it will accept, modify, or reject incoming data. |
Who are the Users? | The owners of the database objects. |
What are Roles? | A set of one or more privileges that can be generated to a user. |
What is a Table? | A structure that can store data. |
What is an Index? | An object designed to speed up searches in a table. |
What is an View? | Stores no data itself and simply serves as a window into one or more tables |
What is a Sequence? | a counter, often used to generate unique #s as identifiers for new rows. |
What is a User Account? | houses the objects owned by a user. |
What is a Schema? | Logical collection of database objects, like tables, Indexes, and Views. These objects are owned by a user, which are housed within the schema. |
What are the different types of schema objects? | Tables, Constraints, Indexes, Views, Sequences, Private Synonyms. |
What are the different types of non-schema objects? | Users, Roles, Public Synonyms. |
What command is used to create a table in SQL? | Create |
What is an Object_Type | Tables, Indexes, Views, Sequences, Private Synonyms |
What is an Object_Name | Name given to an Object_Type in SQL |
What are attributes? | Zero to a series of clauses that are unique to each individual object Type. |
What is the Syntax that is mandatory for creating a table? | Reserved word Create, Table, and the name of a table chosen by you. Parenthesis followed by name of column data type and a command to separate each column. semicolon to end the statement. |
Naming conventions for database objects are applicable to which database objects? | Tables, Views, Indexes, table constraints, table columns, and synonyms. Note: All tables have a name. |
What are the naming rules for database objects with regard to length? | The length of a name must be at least one character and no more than 30 characters? |
What must the first character in a name be? | Letter. |
What are the only characters that can be included in a name after the fist letter? | $, _, #, no other special character is allowed |
Name of Database objects can't be what? | SQL reserved words. |
What is the basic rules for case sensitivity with regard to naming database objects? | They are case insensitive and treated as though they are typed in uppercase letters. |
What happens if a name has double quotation marks | It is case sensitive and must always be referenced with case sensitivity and with double quotation marks. |
By using double quotation marks around the names of database objects, what special characters can you include that aren't otherwise allowed | Spaces. Ex: "Company Employee" |
What is a namespace? | Logical boundary within the database that encompasses a particular set of database objects. |
Should you provide unique names for an object within its own namespace, Yes or No? | Yes. |
Should objects that share a namespace have unique names within that namespace, Yes or No? | Yes |
Are objects in different namespaces allowed to have identical names, Yes or No? | Yes |
What are the different types of namespaces? | User, Role, and Public Synonym; Table, View, Sequence, Private Synonym, and user defined types; Index Objects; Constaints |
What is an indirectly created object? | System Generated name for an object. |
What does the exam test for with regard to SQL create Table statements? | How to create columns, specify data types, and create constraints. |
Ex of an explicitly named constraint? | Constraint Cruise_PK PRIMARY KEY (Cruise _id) |
Ex of an system generated or indirectly named constraint? | Captain_id Number Not Null |
Once a table has been created successfully, what command is used to review the table's structure. | Descr Name of Table, ex Desc Cruises |
Most data types fall under what types of general categories? | Numeric, Character, Dates, and LOB data types. Large Database Objects |
What can't Large Database Objects not be included in? | They can't be included in Primary Keys, DISTINCT, GROUP BYs, ORDER Bys, or Joins. |
What are character data types know as? | Text or String Datatypes. |
What do character data type include? | Char(n), Varchar2(n), Number(n,m), Date, Timestamp(n), Timestamp(n) with Time Zone, TimeStamp(n) with local time Zone, Interval Year(n) to Month, Interval Day(n1) to Second(n2) |
What are the characteristics that functions encompass? | They accept incoming values, they perform task on incoming data, they return one single answer as a result. |
What function does the function INIT Cap perform? | It returns the capitalization of the first character of a word while the remaining characters are shown in lower case letters. |
Functions can be invoked from what type of SQL statements? | SELECT, INSERT, UPDATE, DELETE |
What are the two major variety of functions in SQL? | built-in and user-defined |
What are the categories of functions? | Character, Number, Date, Conversion, and Other |
What are the types of character functions? | LENGTH, RPAD, LPAD, RTRIM, LTRIM, TRIM, INSTR, SUBSTR, REPLACE, SOUNDEX |
What are character functions used for? | Used to manipulate text. |
What are number functions used for? | Perform mathematical analysis. |
What are the types of mathematical functions? | SIN, ASIN, SINH, COS, ACOS, SOSH, ABS, SIGN, ROUND, TRUNC |
What are the types of date functions? | SYSDATE, SYSTIMESTAMP, |
What is MONTHS_BETWEEN | The difference between a date in terms of months. |
What is ADD_MONTHS? | Spans of time between a date. |
What is the function of a conversion function? | Convert values from one datatype to another. |
What is a type of function that falls in the Other category? | User |
What is a User function | A user function takes no parameters, it simply returns a value showing the name of the current user account. |