0 valutazioniIl 0% ha trovato utile questo documento (0 voti)
31 visualizzazioni26 pagine
DATA vs. INFORMATION Consider an example where an Oracle database works "behind the scenes" for common Internet activity. The overall mission of the Oracle Corporation is to use the Internet and fast servers to meet the needs of organizations by only storing data.
DATA vs. INFORMATION Consider an example where an Oracle database works "behind the scenes" for common Internet activity. The overall mission of the Oracle Corporation is to use the Internet and fast servers to meet the needs of organizations by only storing data.
DATA vs. INFORMATION Consider an example where an Oracle database works "behind the scenes" for common Internet activity. The overall mission of the Oracle Corporation is to use the Internet and fast servers to meet the needs of organizations by only storing data.
ACADEMY What are the major content areas covered in the Oracle Academy? Data Modeling, SQL, and PL/SQL
There is a big increase in demand for Information Technology professionals in today's market. True or False? True
DATA VS. INFORMATION Consider an example where an Oracle database works "behind the scenes" for common internet activity. Which of the following best describes a database transaction? A person searching an airline website to find all available fares for a flight.
What are the results of having all your data in one central location? Improved performance Easier access to data
Which of the following are examples of data vs. information. E. Both A and B
How do you turn "data" into "information"? By querying it or accessing it
HISTORY OF THE DATABASE
Which of the following is the correct order for the Database Development Process? Strategy, Analysis, Design, Build
Data Modeling is the last stage in the development of a database. True or False? False
Oracle was one of the first relational database systems available commercially? True or False? True
MAJOR TRANSFORMATIONS IN COMPUTING
Which of the following are examples of e-businesses that use database software? Online clothing store Online book store Online personal shopping service
Are all of the following examples of how changes in computing have affected day-to-day activities? Yes or No? In the past you used to use the phone system to call directory assistance to get a phone number. Today you can use your PC to look up a phone number online. In the past you used to have to go to the shoe store to buy shoes. Today you can use your PC to order shoes online. In the past you had to use your PC to send a person an email message. Today you can use your phone to send a text message. Yes
The overall mission of the Oracle Corporation is to use the internet and fast servers to meet the needs of organizations by only storing data. False
Users would use which of the following software to access essential business applications? GUI Interface Internet Browser Operating System
Personal computers (PCs) have been in existence since 1950. True or False? False
In the grid computing model, resources are pooled together for efficiency. True or False? True
Section 2 Design CONCEPTUAL & PHYSICAL MODELS A customized hat is an example of the conceptual model or the physical model? Physical Model
Many reasons exist for creting a conceptual model. Choose three appropriate reasons from the options below. They model functional and informational needs. They capture current and future data needs. They accurately describe what a physical model will contain.
An Entity Relationship Diagram is an example of a Physical Model. True or False? False
Which of the following are reasons we create conceptual models? All of the above
ENTITIES, INSTANCES, ATTRIBUTES AND IDENTIFIERS Which of the following entities most likely contains invalid attributes? Entity: Car. Attributes: Owner Occupation, Owner Salary, Speed
All of the following would be instances of the entity PERSON except which? Male
What is the purpose of a Unique Identifier? To identify one unique instance of an entity, by using one or more attributes and/or relationships.
A/an _________ is a piece of information that in some way describes an entity. It is a property of the entity and it quantifies, qualifies, classifies or specifies the entity. Attribute
In a physical data model, an attribute is represented as a/an Column
Unique Identifiers.... Distinguish one instance of an entity from all other instances of that entity
Which of the following statements about attributes are true? They describe, qualify, quantify, classify, or specify an entity. They have a data type such as a number or character string.
Entities are usually verbs. True or False? False
Some of the following could be attributes of an ENTITY called PERSON. Select the incorrect attributes for PERSON. Freddy Wilson Priya Hansenna
An entity may have which of the following? Instances
The word "Volatile" means.... Changing constantly; unstable
In the following statements, find two examples of ENTITY: Instance. DAIRY PRODUCT: milk BOOK: Biography of Mahatma Gandhi
ENTITY RELATIONSHIP MODELING AND ERDS A well structured ERD will show only some parts of the finished data model. You should never try to model the entire system in one diagram, no matter how small the diagram might be. True or False? False
An Entity Relationship model is independent of the hardware or software used for implementation. True or False? True
Which of the following statements are true about ERD's? A piece of information should only be found one place on an ERD. You should not model derivable data.
The purpose of an ERD is to document the proposed system and facilitate discussion and understanding of the requirements captured by the developer. True or False? True
Section 3 Design IDENTIFYIND RELATIONSHIPS What are the three properties that every relationship should have? Name, optionality, degree
In a business that sells computers, choose the best relationship name from CUSTOMER to ITEM (computer, in this case). Each CUSTOMER must be the buyer of one or more ITEMS.
Relationships can be either mandatory or optional. True or False? True
Relationships always exist between 2 entities (or one entity twice)
ER DIAGRAMMING CONVERNTIONS Attributes are written inside the entity to which they belong. True or False? True
Entity names are always plural. True or False? False
Consider the recommended drawing conventions for ERD's. Indicate which of the following accurately describes diagramming conventions for entities and attributes: The * means that an attribute is mandatory or required and the entity name should be singular
On an ER diagram which symbol identifies an attribute as part of a unique identifier. #
Entity boxes are drawn as Soft Boxes
Which symbol is used to show that a particular attribute is optional? o
SPEAKING ERDISH AND DRAWING RELATIONSHIPS Two entities can have one or more relationships between them. True or False? True
After looking at the diagram, choose the sentence below that could be "read" from the existing relationship (even though you're missing relationship labels!) Each Student may participate in one or more Activities.
When reading a relationship between 2 entities, the relationship is only read from left to right. True or False? False
MATRIX DIAGRAMS Matrix Diagrams helps verify you have identified all possible relationships between your existing entities. True or False? True
A Matrix Diagram will help you with all of the following except: Defining Instances of Entities
Creating a Matrix Diagram is mandatory when doing Data Modeling. True or False? False
Section 4 Design SUPERTYPES AND SUBTYPES Which of the following is the best scenario for using supertype/subtype entities: A vehicle dealership that sells cars, trucks and boats on trailers.
The "Other" subtype is best used: As an extra subtype to ensure that all instances of subtypes are mutually exclusive and complete. By having an "Other" subtype, all instances of the Supertype will be of one subtype type.
Which of the following is a TRUE statement about the diagram below? Every A is a B
A supertype should have at least two subtypes. True or False? True
All instances of the subtypes must be an instance of the supertype. True or False? True
A subtype can have a relationship not shared by the supertype. True or False? True
Which of the following is true about supertypes and subtypes? Subtypes inherit the relationships and attributes of the supertype.
All instances of the supertype are also instances of one of the subtypes. True or False? True
DOCUMENTING BUSINESS RULES How would you model a business rule that states that on a student's birthday, they do not have to attend their classes? You cannot model this. You need to document it
Why is it important to identify and document business rules? It allows you to create your data model and then check it for accuracy.
How should you handle constraints that cannot be modeled on an ER diagram? List them on a separate document to be handled programmatically
'Only managers can approve travel requests' is an example of which of the following? A procedural business rule.
Business rules are important to data modelers because: A. They capture all of the needs, processes and required functionality of the business.
A business rule such as "All accounts must be paid in full within 10 days of billing" is best enforced by: Hiring a programmer to create additional programming code to identify and report accounts past due.
Which of the following is an example of a structural business rule? All employees must belong to at least one department.
Section 5 Design RELATIONSHIP TRANSFERABILITY If a relationship can be moved between instances of the entities it connects, it is said to be: Transferrable
A non-transferable relationship is represented by which of the following symbols? Diamond
Non-transferable relationships can only be mandatory, not optional. True or False? True
RELATIONSHIP TYPES Which of the following pairs of entities is most likely to be modeled as a M:M relationship? STUDENT and CLASS CAR and DRIVER
When resolving an M:M relationship, the new relationships will always be __________ on the many side. Mandatory
If the same relationship is represented twice in an Entity Relationship Model, it is said to be: Redundant
Many to many relationships between entities usually hide what? Another entity
What uncommon relationship is described by the statements: "Each LINE must consist of many POINTS and each POINT must be a part of many LINES" Many to Many Mandatory
When are relationships unnecessary? When you can derive the relationship from other relationships in the model
Which of the following are relationship types? Many to Many One to Many
RESOLVING MANY-TO-MANY RELATIONSHIPS Many-to-Many relationships are perfectly acceptable in a finished ERD. There is no need to do any more work on them. True or False? False
If an intersection entity is formed that contains no attributes of its own, its uniqueness may be modeled by Barring the relationships to the original entities.
When you resolve a M-M by creating an intersection entity, this new entity will always inherit: A relationship to each entity from the original M-M.
Section 6 Design ARTIFICIAL, COMPOSITE AND SECONDARY UID People are not born with "numbers," but a lot of systems assign student numbers, customer IDs, etc. A shoe has a color, a size, a style, but may not have a descriptive "number". So, to be able to uniquely and efficiently identify one instance of the entity SHOE, a/an ______________ UID can be created. Artificial
A unique identifier can only be made up of one attribute. True or False? False
A UID can be made up from the following: Attributes Relationships
An entity can only have one UID. True or False? False
NORMALIZATION AND FIRST NORMAL FORM An entity can have repeated values and still be in 1st Normal Form. True or False? False
When all attributes are single-valued, the database model is said to conform to: 1st Normal Form
The following entity is on 1st normal form: True or False? ENTITY: VEHICLE ATTRIBUTES: REGISTRATION MAKE MODEL COLOR DRIVER PASSENGER 1 PASSENGER 2 PASSENGER 3 False
When data is stored in more than one place in a database, the database violates the rules of ___________. Normalization
SECOND NORMAL FORM An entity can be on 2nd Normal Form even if it has repeated values. True or False? False
What is the rule of Second Normal Form? All non-UID attributes must be dependent upon the entire UID
Examine the following entity and decide which attribute breaks the 2nd Normal Form rule: ENTITY: CLASS ATTRIBUTES: CLASS ID DURATION SUBJECT TEACHER NAME AND ADDRESS TEACHER NAME AND ADDRESS
THIRD NORMAL FORM No databases in the world is ever truly on 3rd Normal Form. Everyone always stops after 2nd Normal Form. True or False? False
Examine the following Entity and decide which sets of attributes breaks the 3rd Normal Form rule: ENTITY: TRAIN (SYNONYM: ROLLING STOCK) ATTRIBUTES: TRAIN ID MAKE MODEL DRIVER NAME DEPARTURE STATION NUMBER OF CARRIAGES NUMBER OF SEATS DATE OF MANUFACTURE DEPARTURE STATION, DRIVER NAME NUMBER OF CARRIAGES, NUMBER OF SEATS
As a database designer it is your job to store data in only one place and the best place. True or False? True Section 7 Design ARCS Which of the following is the definition for Third Normal Form? No non-UID attribute can be dependent on another non-UID attribute
If the entity CD has the attributes: #number, *title, *producer, *year, o store name, o store address, this entity is in 3rd Normal Form ("no non-UID attribute can be dependent on another non-UID attribute). True or False? False
Which of the following can be added to a relationship? An arc can be assigned
To visually represent exclusivity between two or more relationships in an ERD you would most likely use an ________. Arc
Which of the following would best be represented by an arc? STUDENT ( University, Trade School)
Secondary UID's are Useful as an alternative means identifying instances of an entity
All parts of a UID are mandatory. True or False? True
This diagram could also be expressed as a supertype/subtype construction. True or False? False
HIERARCHIES AND RECURSIVE RELATIONSHIPS A recursive rationship should not be part of a UID. True or False? True
Which of the following would be a good Unique Identifier for its Entity? Identification Number for Person Birthdate for Baby Which Includes Hour, Minute, and Seconds
A relationship can be both recursive and hierachal at the same time. True or False? False
In this simple diagram, what comprises the unique identifier for the student class entity? student id and course id
MODELING HISTORICAL DATA
Historical data should always be kept. True or False? False
Which of the following scenarios should be modeled so that historical data is kept? LIBRARY and BOOK STUDENT and GRADE
Modeling historical data can produce a unique identifier that includes a date. True or False? True
Audit trail attributes cannot be placed in the entities they are auditing, they must be placed in separate, new entities, created just for that purpose. True or False? False
Section 10 Design DRAWING CONVENTIONS FOR READABILITY It is a good idea to group your entities in a diagram according to the expected volumes. By grouping high volume entities together, the diagrams could become easier to read. True or False? True
You must make sure all entities of a proposed system can fit onto one diagram. It is not allowed to break up a data model into more than one diagram. True or False? False
There are no formal rules for how to draw ERD's. The most important thing is to make sure all entities, attributes and relationships are documented on diagram. The Layout is not significant. True or False? False
Which of the following statements are true for ERD's to enhance their readability. There should be no crossing lines. All crows feet (Many-ends) of relationships should point the same way.
GENERIC MODELING Generic models are generally less complex than a specific model. True or False? False
All data models MUST have some portions of the model modeled as a generic component. True or False? False
When you transform a specific model to be generic, which of the following statements are true? You tend to end up with fewer entities in the generic model than you had in the specific model Either all or none of the original attributes make it into the generic model
Section 9 Design MODELING CHANGE: TIME How do you know when to use the different types of time in your design? It depends on the functional needs of the system
It is desirable to have an entity called DAY with a holiday attribute when you want to track special holidays in a payroll system. True or False? True
Which of the following would be a logical constraint when modeling time for a country entity? Countries may need an end date in your system, because they can change fundamentally over time, e.g. Yugoslavia.
Modeling historical data produces efficient ways for a business to operate such as: Providing valuable information via reports to management.
When you add the concept of time to your data model, you are: Adding complexity to your model.
What is the benefit to the users of a system that includes "time," e.g. Start Date and End Date for Employees? Increased usability and flexibility of a system; we can the trace e.g. the different managers an employee had over time.
If you are tracking employment dates for an employee, do you need to have an "End Date" attribute? Yes, if the company wants to track employee information, like multiple start and end dates
MODELING CHANGE: PRICE You are doing a data model for a computer sales company, where the price goes down on a regular basis. If you want to allow them to modify the price and keep track of the changes, what is the best way to model this? E. Both A and C
Why would you want to model a time component when designing a system that lets people buy bars of gold? The price of gold fluctuates and for determining price, you need to know the time of purchase
What is the function of logging or journaling in conceptual data models? Allows you to track the history of attribute values, relationships and/or entire entities
Which of the following is a logical constraint that could result from considering how time impacts an example of data storage? An ASSIGNMENT may only refer to a COUNTRY that is valid at the Start Date of the ASSIGNMENT.
Final Exam Semester 1 The text below is an example of what constraint type: The value in the manager_id column of the EMPLOYEES table must match a value in the employee_id column in the EMPLOYEES table. (4) Referential integrity
A table must have at least one candidate key, as well as its primary key. True or False? (2) False
A table must have a primary key. True or False? (2) False
If a primary key is a set of columns then one column must be null. True or False? (2) False
Attributes become tables in a database. True or False? (2) False
In a physical data model, an attribute becomes a _____________. (4) Column
The transformation from an ER diagram to a physical design involves changing terminology. Primary Unique Identifiers in the ER diagram become __________ and relationships become ____________. (2) Primary keys, Foreign keys
The Oracle Database can implement a many to many relationship. You simply create two foreign keys between the two tables. True or False? (2) False
Many to many relationships are implemented via a structure called a: ________________ (2) Intersection Table
An "Arc Implementation" can be done just like any other Relationship - you simply add the required Foreign Keys. True or False? (2) False
What command will return data from the database to you? (3) SELECT
The DESCRIBE command returns all rows from a table. True or False? (2) False
What command can be used to create a new row in a table in the database? (4) INSERT
The f_customers table contains the following data: ID Name Address City State Zip 1 Cole Bee 123 Main Street Orlando FL 32838 2 Zoe Twee 1009 Oliver Avenue Boston MA 02116 3 Sandra Lee 22 Main Street Tampa FL 32444 If you run the following statement: DELETE FROM F_CUSTOMERS WHERE ID <= 2; How many rows will be left in the table? (3) 1
The SQL statement ALTER TABLE EMPLOYEES DELETE COLUMN SALARY is a valid statement. True or False? (2) False
Systems are always just rolled out as soon as the programming phase is finished. No further work is required once the development is finished. True or False? (2) False
System Documentation is developed right at the end once the system has gone live and users have been using it for a little while. You are more likely to get it correct that way. True or False? (2) False
Which SQL statement will return an error? (1) SEL * FR sky;
When you use the SELECT clause to list one or two columns only from a table and no WHERE clause, which SQL capability is used? (3) Projection only
Which statement best describes how arithmetic expressions are handled? (4) Division and multiplication operations are handled before subtraction and addition operations.
In a SELECT clause, what is the result of 2 + 3 * 2? (2) 8
Evaluate this SELECT statement: SELECT (salary * raise_percent) raise FROM employees; If the RAISE_PERCENT column only contains null values, what will the statement return? (2) Only null values
Which SQL keyword specifies that an alias will be substituted for a column name in the output of a SQL query? (1) AS
You need to display employees with salaries that are at least 30000 or higher. Which comparison operator should you use? (3) >=
You need to display employees whose salary is in the range of 30000 and 50000. Which comparison operator should you use? (3) BETWEEN...AND...
Which symbol represents the not equal to condition? (3) !=
The Concatenation Operator does which of the following? (2) Links two or more columns or literals to form a single output column
You need to display all the rows in the EMPLOYEES table that contain a null value in the DEPARTMENT_ID column. Which comparison operator should you use? (4) IS NULL
What does the DISTINCT keyword do when it is used in a SELECT clause? (3) Eliminates duplicate rows in the result
You need to display all the values in the EMAIL column that contains the underscore (_) character as part of that email address. The WHERE clause in your SELECT statement contains the LIKE operator. What must you include in the LIKE operator? (4) The ESCAPE option (\)
You need write a SELECT statement that should only return rows that contain 34, 46, or 48 for the DEPARTMENT_ID column. Which operator should you use in the WHERE clause to compare the DEPARTMENT_ID column to this specific list of values? (3) IN
You want to determine the orders that have been placed by customers who reside in Chicago. You write this partial SELECT statement: SELECT orderid, orderdate, total FROM orders; What should you include in your SELECT statement to achieve the desired results? (3) WHERE city = 'Chicago';
What will be the result of the SELECT statement and what will display? SELECT last_name, salary, salary + 300 FROM employees; (1) Display the last name, salary and the results of adding 300 to each salary for all the employees When is an entity in 2nd Normal Form? (1) When all non-UID attributes are dependent upon the entire UID.
Would it be a good idea to model age as an attribute of STUDENT? (4) No - it breaks the Normalization rules
Which comparison condition means "Less Than or Equal To"? (4) "<="
Which of the following best describes the meaning of the LIKE operator? (3) Match a character pattern.
You need to change the default sort order of the ORDER BY clause so that the data is displayed in reverse alphabetical order. Which keyword should you include in the ORDER BY clause? (1) DESC
Which clause would you include in a SELECT statement to sort the rows returned by the LAST_NAME column? (1) ORDER BY
The ORDER BY clause always comes last. True or False? (1) True
Which of the following are TRUE regarding the logical AND operator? (4) TRUE AND FALSE return FALSE
Evaluate this SELECT statement: SELECT last_name, first_name, salary FROM employees; How will the results of this query be sorted? (1) The database will display the rows in whatever order it finds it in the database, so no particular order. Evaluate this SELECT statement: SELECT * FROM employees WHERE department_id = 34 OR department_id = 45 OR department_id = 67; Which operator is the equivalent of the OR conditions used in this SELECT statement? (1) IN
Evaluate this SELECT statement: SELECT first_name, last_name, email FROM employees ORDER BY last_name; Which statement is true? (2) The rows will be sorted alphabetically by the LAST_NAME values.
What value will the following SQL statement return? SELECT employee_id FROM employees WHERE employee_id BETWEEN 100 AND 150 OR employee_id IN(119, 175, 205) AND (employee_id BETWEEN 150 AND 200); (3) 100, 101, 102, 103, 104, 107, 124, 141, 142, 143, 144, 149
Evaluate this SELECT statement: SELECT employee_id, last_name, first_name, salary 'Yearly Salary' FROM employees WHERE salary IS NOT NULL ORDER BY last_name, 3; Which clause contains an error? (1) SELECT employee_id, last_name, first_name, salary 'Yearly Salary'
The EMPLOYEES table contains these columns: EMPLOYEE_ID NUMBER(9) PK LAST_NAME VARCHAR2(25) FIRST_NAME VARCHAR2(25) DEPARTMENT_ID NUMBER(9) Compare these two SQL statements: 1. SELECT DISTINCT department_id DEPT, last_name, first_name FROM employees ORDER BY department_id; 2. SELECT department_id DEPT, last_name, first_name FROM employees ORDER BY DEPT; How will the results differ? (3) There is no difference in the result between the two statements.
The PLAYERS table contains these columns: PLAYERS TABLE: LAST_NAME VARCHAR2 (20) FIRST_NAME VARCHAR2 (20) SALARY NUMBER(8,2) TEAM_ID NUMBER(4) MANAGER_ID NUMBER(9) POSITION_ID NUMBER(4) You must display the player name, team id, and salary for players whose salary is in the range from 25000 through 100000 and whose team id is in the range of 1200 through 1500. The results must be sorted by team id from lowest to highest and then further sorted by salary from highest to lowest. Which statement should you use to display the desired result? (2) SELECT last_name, first_name, team_id, salary FROM players WHERE salary BETWEEN 25000 AND 100000 AND team_id BETWEEN 1200 AND 1500 ORDER BY team_id, salary DESC; The PLAYERS table contains these columns: PLAYERS TABLE: LAST_NAME VARCHAR2 (20) FIRST_NAME VARCHAR2 (20) SALARY NUMBER(8,2) TEAM_ID NUMBER(4) MANAGER_ID NUMBER(9) POSITION_ID NUMBER(4)
You want to display all players' names with position 6900 or greater. You want the players names to be displayed alphabetically by last name and then by first name. Which statement should you use to achieve the required results? (1) SELECT last_name, first_name FROM players WHERE position_id >= 6900 ORDER BY last_name, first_name;
The explanation below is a column integrity constraint: A column must contain only values consistent with the defined data format of the column. True or False? (1) True
Identify all of the incorrect statements that complete this sentence: A primary key is: (1) A single column that uniquely identifies each column in a table (3) A set of columns in one table that uniquely identifies each row in another table (4) Only one column that must be null
The explanation below is a User Defined integrity rule and must therefore be manually coded, the Database cannot enforce this rule automatically: A primary key must be unique, and no part of the primary key can be null. True or False? (2) False
The text below is an example of what constraint type: The value in the manager_id column of the EMPLOYEES table must match a value in the employee_id column in the EMPLOYEES table. (4) Referential integrity
In a physical data model, an attribute becomes a _____________. (4) Column
The transformation from an ER diagram to a physical design involves changing terminology. Primary Unique Identifiers in the ER diagram become __________ and relationships become ____________. (2) Primary keys, Foreign keys
In a physical data model, a relationship is represented as a combination of: (2) Primary Key or Unique Key (4) Foreign Key
It is possible to implement non-transferability via a simple Foreign Key Relationship. True or False? (2) False
Many to many relationships are implemented via a structure called a: ________________ (2) Intersection Table
When mapping supertypes, relationships at the supertype level transform as usual. Relationships at subtype level are implemented as foreign keys, but the foreign key columns all become mandatory. True or False? (2) False
Which of the following are reasons why you should consider using a Subtype Implementation? (3) Business functionality and business rules, access paths and frequency of access are all very different between subtypes.
The _______ clause can be added to a SELECT statement to return a subset of the data. (3) WHERE
The DESCRIBE command returns all rows from a table. True or False? (2) False
Which SQL keyword specifies that an alias will be substituted for a column name in the output of a SQL query? (1) AS
You query the database with this SQL statement: SELECT * FROM transaction WHERE product_id = 4569; Which SQL SELECT statement capabilities are achieved when this statement is executed? (1) Selection only
Evaluate this SELECT statement: SELECT (salary * raise_percent) raise FROM employees; If the RAISE_PERCENT column only contains null values, what will the statement return? (2) Only null values
What would you use in the SELECT clause to return all the columns in the table? (1) An asterisk (*)
When you use the SELECT clause to list one or two columns only from a table and no WHERE clause, which SQL capability is used? (3) Projection only
In a SELECT clause, what is the result of 2 + 3 * 2? (2) 8
You query the database with this SQL statement: SELECT * FROM students; Why would you use this statement? (2) To view data
Any Non-UID must be dependant on the entire UID. True or False? (1) True
When is an entity in 2nd Normal Form? (1) When all non-UID attributes are dependent upon the entire UID.
What does the DISTINCT keyword do when it is used in a SELECT clause? (3) Eliminates duplicate rows in the result
Which symbol represents the not equal to condition? (3) !=
Which statement best describes how column headings are displayed by default in Oracle Application Express: (3) Column headings are displayed centered and in uppercase.
Which operator is used to combine columns of character strings to other columns? (4) ||
You need to display employees whose salary is in the range of 30000 and 50000. Which comparison operator should you use? (3) BETWEEN...AND...
Which clause would you include in a SELECT statement to restrict the data returned to only the employees in department 10? (1) WHERE
Evaluate this SELECT statement: SELECT * FROM employees WHERE department_id IN(10, 20, 30) AND salary > 20000; Which values would cause the logical condition to return TRUE? (4) DEPARTMENT_ID = 10 and SALARY = 20001
What will the result of the following SELECT statement be: SELECT last_name, salary, salary + 300 FROM employees; How will the heading for the SALARY column appear in the display by default in Oracle Application Express? (1) Display the last name, salary and the results of adding 300 to each salary for all the employees
The PLAYERS table contains these columns: PLAYER_ID NUMBER(9) LAST_NAME VARCHAR2(20) FIRST_NAME VARCHAR2 (20) TEAM_ID NUMBER (4) MANAGER_ID NUMBER (9) POSITION_ID NUMBER (4) Which SELECT statement should you use if you want to display unique combinations of the TEAM_ID and MANAGER_ID columns? (3) SELECT DISTINCT team_id, manager_id FROM players;
You need write a SELECT statement that should only return rows that contain 34, 46, or 48 for the DEPARTMENT_ID column. Which operator should you use in the WHERE clause to compare the DEPARTMENT_ID column to this specific list of values? (3) IN
Which SELECT statement will display both unique and non-unique combinations of the MANAGER_ID and DEPARTMENT_ID values from the EMPLOYEES table? (2) SELECT manager_id, department_id FROM employees;
The EMPLOYEES table contains these columns: EMPLOYEE_ID NUMBER(9) PrimaryKey LAST_NAME VARCHAR2 (20) FIRST_NAME VARCHAR2 (20) DEPARTMENT_ID NUMBER(5) NOT NULL MANAGER_ID NUMBER(9) NOT NULL Evaluate these two SELECT statements: 1. SELECT DISTINCT employee_id, department_id, manager_id FROM employees; 2. SELECT employee_id, department_id, manager_id FROM employees; Which of the following statements is true? (1) The two statements will display the same data.
The STUDENT table contains these columns: STUDENT_ID NUMBER(10) Primary Key LAST_NAME VARCHAR2(25) FIRST_NAME VARCHAR2(25) MAIN_SUBJECT_ID NUMBER(3) ADVISOR_ID NUMBER(5) Evaluate this statement: SELECT DISTINCT advisor_id, main_subject_id FROM student; Which statement is true? (2) Each MAIN_SUBJECT_ID can be displayed more than once per ADVISOR_ID.
The EMPLOYEES table includes these columns: EMPLOYEE_ID NUMBER(4) NOT NULL LAST_NAME VARCHAR2(15) NOT NULL FIRST_NAME VARCHAR2(10) NOT NULL HIRE_DATE DATE NOT NULL You want to produce a report that provides the first names, last names and hire dates of those employees who were hired between March 1, 2000, and August 30, 2000. Which statements can you issue to accomplish this task? (1)SELECT last_name, first_name, hire_date FROM employees WHERE hire_date BETWEEN '01-MAR-00' AND '30-AUG-00';
Evaluate this SQL statement: SELECT e.employee_id, e.last_name, e.first_name, m.manager_id FROM employees e, employees m ORDER BY e.last_name, e.first_name WHERE e.employee_id = m.manager_id; This statement fails when executed. Which change will correct the problem? (1) Reorder the clauses in the query.
The PLAYERS table contains these columns: PLAYERS TABLE: LAST_NAME VARCHAR2 (20) FIRST_NAME VARCHAR2 (20) SALARY NUMBER(8,2) TEAM_ID NUMBER(4) MANAGER_ID NUMBER(9) POSITION_ID NUMBER(4) You want to display all players' names with position 6900 or greater. You want the players names to be displayed alphabetically by last name and then by first name. Which statement should you use to achieve the required results? (1) SELECT last_name, first_name FROM players WHERE position_id >= 6900 ORDER BY last_name, first_name;
Evaluate this SELECT statement: SELECT * FROM employees WHERE salary > 30000 AND department_id = 10 OR email IS NOT NULL; Which statement is true? (2) The AND condition will be evaluated before the OR condition.
Evaluate this SELECT statement: SELECT * FROM employees WHERE department_id = 34 OR department_id = 45 OR department_id = 67; Which operator is the equivalent of the OR conditions used in this SELECT statement? (1) IN
You need to create a report to display all employees that were hired on or after January 1, 1996. The data should display in this format: Employee Start Date and Salary 14837 - Smith 10-MAY-92 / 5000 Which SELECT statement could you use? (5) SELECT employee_id ||' - '|| last_name "Employee", hire_date ||' / '|| salary "Start Date and Salary" FROM employees WHERE hire_date <= '01-JAN-96';
You attempt to query the database with this SQL statement: SELECT product_id "Product Number", category_id "Category", price "Price" FROM products WHERE "Category" = 5570 ORDER BY "Product Number"; This statement fails when executed. Which clause contains a syntax error? (4) WHERE "Category" = 5570
Evaluate this SELECT statement: SELECT employee_id, last_name, first_name, salary 'Yearly Salary' FROM employees WHERE salary IS NOT NULL ORDER BY last_name, 3; Which clause contains an error? (1) SELECT employee_id, last_name, first_name, salary 'Yearly Salary' (*)
Evaluate this SELECT statement: SELECT last_name, first_name, department_id, manager_id FROM employees; You need to sort data by manager id values and then alphabetically by employee last name and first name values. Which ORDER BY clause could you use? (2) ORDER BY manager_id, last_name, first_name
Which statement about the logical operators is true? (4) The order of operator precedence is NOT, AND, and OR. (*)
Which comparison condition means "Less Than or Equal To?" (4) "<="
From left to right, what is the correct order of Precedence? (1) Arithmetic, Concatenation, Comparison, OR
Which statement about the ORDER BY clause is true? (1) You can use a column alias in the ORDER BY clause.
Which clause would you include in a SELECT statement to sort the rows returned by the LAST_NAME column? (1) ORDER BY
You need to change the default sort order of the ORDER BY clause so that the data is displayed in reverse alphabetical order. Which keyword should you include in the ORDER BY clause? (1) DESC
A foreign key cannot refer to a primary key in the same table. True or False? (2) False What do you create when you transform a many to many relationship from your ER diagram into a physical design? (3) Intersection table
In the default order of precedence, which operator would be evaluated first? (2) Multiplications and Division are at the same level and would be evaluated first based on left to right order
The EMPLOYEES table contains these columns: SALARY NUMBER(7,2) BONUS NUMBER(7,2) COMMISSION_PCT NUMBER(2,2) All three columns contain values greater than zero. There is one row of data in the table and the values are as follows: Salary = 500, Bonus = 50, Commission_pct = .5 Evaluate these two SQL statements: 1. SELECT salary + bonus + commission_pct * salary - bonus AS income FROM employees; 2. SELECT (salary + bonus ) + commission_pct * (salary - bonus) income FROM employees; What will be the result? (2) Statement 2 will return a higher value than statement 1.
Where in a SQL statement can you not use arithmetic operators? (2) FROM
You need to combine the FIRST_NAME and LAST_NAME columns in the EMPLOYEES table and display the columns as a combined character string. Which operator should you use? (3) ||
Evaluate this SELECT statement: SELECT last_name, first_name, salary FROM employees; How will the heading for the SALARY column appear in the display by default in Oracle Application Express? (3) The heading will display as uppercase and centered.
Which logical operator returns TRUE if either condition is true? (1) OR
Evaluate this SQL statement: SELECT product_id, product_name, price FROM products ORDER BY product_name, price; What occurs when the statement is executed? (4) The results are sorted alphabetically and then numerically.
Once you have created a table, it is not possible to alter the definition of it. If you need to add a new column you must delete the table definition and create a new, correct table. True or False? (2) False
In the analysis phase the tables are created and populated with test data. True or False? (2) False