click below
click below
Normal Size Small Size show me how
Inf0m4n forma 4
M7 M8
| Question | Answer |
|---|---|
| To remove a row from a table use the drop table statement. | False |
| Using figure 7.1, what SQL statement to increase the salary of Tucker and Olsen to 10% of their salary? | |
| Using the syntax to insert a row below: INSERT INTO table [(column [, column...])] VALUES (value [, value...]); What is the column part? | |
| A DML statement is executed when adding rows, modifying existing rows, and removing existing rows from a table | True |
| In SQL, which of the following is not a data Manipulation Language Commands? | Truncate |
| Using figure 7.1, what is the SQL code to show the name of the salesman that has a salary greater than 10000 or less than 5000. | select sname from salesman where salary > 10000 or salary < 5000; |
| Which command displays the structure of the table? | describe |
| Using the syntax to insert a row below: INSERT INTO table [(column [, column...])] VALUES (value [, value...]); The statement values clause adds only one row at the time to a table. | True? |
| Using figure 7.1, what is the SQL code to insert a new record in the salesman table? | insert into salesman (salesman_id) values (6000); |
| the insert statement inserts only one row at a time. | True |
| What is the clause of the select statement where in it indicates the conditions under which a row will be included in the result? | Where |
| Using figure 7.2, what SQL statement will show the city and the highest salary of the salesman when they are grouped based on their city. | select city, max(salary) from salesman group by city; |
| In the rollback statement, it releases all locks of all affected rows. | True |
| What is the clause of the select statement that sorts the result according to specified criteria? | order by |
| To create a marker in the current transaction, rollback is used. | False, savepoint |
| create view certain_employees as select * from employees where employee_id in (101,102,114,122,176,200,201); ,the SQL statement: select email from certain_employees where commission_pct is null; will show the email employee ids 101 (101 - 201) | False |
| What command to use when saving changes to the database that is irreversible? | Commit |
| What is the clause of the select statement that list the columns and expressions to be returned from the query? | Select |
| In the savepoint statement, all the locks of the affected rows are released. | False, rollback |
| The read-consistent image is constructed from the committed data in the table and the old data that is being changed and is not yet committed from the undo segment. | True |
| Use SELECT * instead of identify the specific attributes in the SELECT clause for query efficiency. | False |
| If data is to be used many times, make a separate query and store it as a view for query efficiency. | True |
| What would be the output of the following code? select dept.department_name, e.employee_id from departments dept inner join cemployees e on dept.department_id = e.department_id and e.employee_id in (101,102);. | Department_name Employee_id Executive 101 Executive 102 |
| When we place a query inside another query, what is this called? | Subquery |
| Which among the following is true for a correlated subquery | it can use the EXISTS operator |
| What is a relational operation that causes two or more tables with a common domain to be combined into a single table or view. | Join |
| Multiple subqueries in a select statement is better for query efficiency. | False |
| Keep optimizer statistics up-to-date to have a better query design. | True |
| The left outer join returns all records from the outer table and the matching records returned from the joined table. | True? |
| What is a kind of join that includes all columns from each table in the join, and an instance for each row of each table? | UNION JOIN |
| The SQL statement: CREATE USER user IDENTIFIED BY password; , is statement that will create a user and assigns a password after the user has been created. | False, befoRe |
| Users require system privileges to manipulate the contents of the objects in the database. | False |
| A privilege that is granted with the WITH GRANT OPTION clause can be passed on to other users and roles by the grantee | True? |
| A schema is owned by a database user and has the same name as that user. | True |
| If users have multiple roles granted to them, they receive all the privileges associated with all the roles. | True? |
| Given the SQL command: GRANT UPDATE (DEPTID, DEPTNAME) ON DEPARTMENTS TO CHEFS, COOKS; What will this SQL command do? | Grants privileges to update specific columns on table departments to roles. |
| Database security can be classified into two categories. They are object security and data security. | False, system and data security |
| A user can have access to several roles, and several users can be assigned the same role. | True |
| The SQL statement: CREATE USER user IDENTIFIED BY password; , is statement that will create a user and assigns a password. | True |
| An example of a system security is the use of username and password. | True? |
| Using figure 7.1 and given the statement: Delete from salesman where salesman_id = 152 and salesman_id = 153; , what does SQL statement do? | it deletes the row with the salesman_id 152 and 153. |
| Which among the following codes will edit one value in a column of the table? Which among the following codes will edit one value in a column of the table? update SampleTable set columnA 1; update SampleTable set columnA | update SampleTable set columnA?? |
| The SQL statement: insert into sample_table (sample_id) values (&sample_id)); , will insert a new record wherein the value of sample_id is &sample_id. | False |
| When updating values inside the table you can update the row one at the time. | True |
| These are SQL commands that maintain and query a database. | DML |
| To remove a row from a table you can use the delete statement | True |
| Which symbol should be used to prompt for values? | & |
| When an insert, update, or delete operation is made on the database, the Oracle server takes a copy of the data before it is changed and writes it to an undo segment. | True |
| If the transaction is rolled back, the changes are undone, all users see the database as it existed before the transaction began. | True |
| what SQL statement will show the unique region id of the countries table? | select region_id from countries group by region_id;? |
| If the transaction is rolled back, the changes are undone, the original, older version of the data in the undo segment is written back to the table. | True |
| In read consistency, changes made by one user do not conflict with the changes made by another user. | True |
| What does these SQL statements do? Delete from table1; rollback; | Reverses the structure of the table before deleting |
| A database transaction consists of DML statements that constitute one consistent change to the data. | True |
| To create a marker in the current transaction, use savepoint statement. | True |
| Read consistency guarantees a consistent view of the data at all times. | True |
| The common columns in joined tables are usually the primary key of the dominant table and the foreign key of the dependent table in 1:M relationships. | True |
| select d.department_name,e.employee_id from departments d, cemployees e where d.department_id = e.department_id and e.commission_pct is null order by e.EMPLOYEE_ID; What does the statement do? Use the tables above for reference. | It will show the department name and the employee ids of the employees that has a null commission percentage. |
| Don’t combine a query with itself like avoiding self-joins to have a better query design. | True |
| Fine tuning with group by and having clauses is needed in queries. | True? |
| What is an equi-join in which one of the duplicate columns is eliminated in the result table? | Natural Join |
| Understanding how indexes are used in query processing makes a better query design. | True |
| Using figure 8.2, what SQL statement will show the complete name of the employee and the date when the employee named Neena Kochhar resigned from the company? | select e.first_name, e.last_name, j.end_date from employees e, job_history j where e.first_name = ‘Neena’ and e.last_name=’Kochhar’; |
| The DBA creates the user by executing the CREATE USER statement. | True |
| Oracle server database security is unable give access to specific objects in the database. | False |
| Users require object privileges to gain access to the database. | False? |
| A role is a named group of related privileges that can be granted to the user. This method makes it easier to revoke and maintain privileges. | True |
| Oracle server database security can give access to specific objects in the database. | True |
| Database administrators has a high-level system privileges for tasks such as creating a new user, removing users, removing tables and backing up tables. | True |
| Oracle server database security can control database access. | True |
| Which among the following will delete one row in a table? | delete from SampleTable where columnId? 0.33 lang Maybe dagdag ng 1000;? |
| adding new rows to a table is added one at a time. | False? |
| what is the SQL will change the city Paris to paris? Group of answer choices update salesman set city = ‘paris’ where city = ‘Paris’; update sales set city = ‘paris’ where city = ‘Paris’; update salesman set city = paris where city = Paris; | update salesman set city = ‘paris’ where city = ‘Paris’; |
| Which among the following code deletes all the contents of a table? Group of answer choices drop table sample_table dropping sample_table delete from sample_table; | delete from sample_table; |
| A transaction consists of collection of data manipulation language statements that form a logical unit of work | True? |
| The SQL statement: insert into sample_table (sample_id) values (&sample_id)); , will update a new record in the table. | False |
| what SQL statement will change all the null values of the City column to Paris? | update salesman set city = 'Paris' where city is null; |
| What is the clause of the select statement where in it indicate categorization of result? | Group by |
| Before the changes are committed to the database, only the user who is modifying the data sees the database with the alterations. | True |
| The select statement is used for queries on single or multiple tables. | True |
| What is the clause of the select statement where in it indicates the conditions under which category will be included? | having |
| Rollback to savepoint returns the transaction back to the marker. | True |
| Using figure 7.2, what is the SQL code to show the salesman name, their city and salary that has a city name Manila. | select sname, city, salary from salesman where city = 'Manila';??????? |
| The check option command in creating a view works only for updateable views. | True |
| If data is to be used many times, create a synonym for query efficiency. | False? |
| Instead of SELECT *, identify the specific attributes in the SELECT clause for query efficiency. | True |
| Which among the following is true for a non-correlated subquery? | it does not depend on the data from the outer query |
| Using figure 8.1, what SQL statement will show the biggest salary of the salesman if grouped based on their salary. Show only the biggest salary that are more than 6500. Arrange the salary from biggest to smallest. | select max(salary) from salesman group by salary having max(salary)>6500 order by salary desc; |
| Limit the number of subqueries and try to make everything done in a single query if possible for query efficiency. | True |
| Data security covers the system operations that the users can perform. | True? |
| Data security covers access and use of the database at the system level. | False |
| A privilege is the right to execute particular SQL statements. | True |
| What is a type of privilege that can perform a particular action within the database? Group of answer choices schemas object privilege objects system privilege | object privilege? |
| What is a type of privilege that can manipulate the contents of the database objects? Group of answer choices objects object privilege system privilege schemas | object privilege |
| Users require object privileges to manipulate the contents of the objects in the database. | True |
| Using figure 7.1, this statement is going to change the commission of Tucker to 0.4: update salesman set commission = 0.4 where sname = ‘Tucker’; | True |
| Using figure 7.1, you are tasked to edit the name of the salesman Sully to Sally. The SQL statement to use is: UPDATE SALESMAN SET SNAME = ‘Sally’ WHERE SNAME = ‘Sully’;. | True |
| Using figure 7.1, the SQL code: insert into salesman values(150, ‘Garry’, ‘Paris’, 0.8, 10200); , will insert the new record successfully. | True? |
| Using figure 7.1, what is the SQL code to add a new salesman with an id of 5230, a name of Thomas Michael with a salary of 15600. His city is Manila. | insert into salesman (SALESMAN_ID, SALESMANNAME, city, salary) values (5230, 'Thomas Michael', 'Manila', 15600); CAN BE NONE CAUSE WALANG SALESMANNAME |
| The SQL statement: insert into sample_table (sample_id) values (&sample_id)); , will insert a new record wherein the value comes from the input of the user. | True |
| Read consistency ensures that, on the same data, Writers wait for writers. | True |
| Using figure 7.2, what SQL statement will show the name of the salesman and city whose city has an ‘I’ letter in between, capital letter or not. | select sname, city from salesman where city like '%i%' or city like '%I%'; |
| Read consistency ensures that, on the same data, readers wait for writers. | False. writers wait for writers |
| What SQL statement are you going to write to show the number of people in a job_id that has 5 or more employees? | select count(job_id), job_id from cemployees group by job_id having count(job_id) >5; |
| Reviewing the ERD of the schema first is important in analyzing queries. | False? Developing queries |
| What is a join in which the joining condition is based on equality between values in the common columns; common columns appear redundantly in the result table? | Equi Join |
| INNER JOIN clause is an alternative to WHERE clause, and is used to match primary and foreign keys. | True |
| It is a type of database security that covers access and use of the database at the system level. Group of answer choices object security entity security data security system security | System security |
| Roles are not typically created for a database application | False |
| System security allocates disk space to users. | True |
| Data security allocates disk space to users. | False |
| The DBA must create a role then the DBA can assign privileges to the role and assign the role to users. | True |
| Using figure 7.1, this statement is going to change the commission of Tucker to 0.4: edit salesman set commission = 0.4 where sname = Tucker; | False? since walang '' yung Tucker |
| The update statement modifies existing values in a table | True? |
| Using figure 7.1, you are tasked to edit the name of the salesman Sully to Sally. The SQL statement to use is: UPDATE SALESMAN SET SALESMAN_ID = ‘Sally’ WHERE SNAME = ‘Sully’;. | False? SalesmanID??? |
| Read consistency is an automatic implementation. It keeps a partial copy of the database in the undo segments. | True? |
| In the commit statement, the previous state of data is restored. | False, Rollback |
| create view certain_employees as select * from employees where employee_id in (101,102,114,122,176,200,201); ,the SQL statement: select email from certain_employees where commission_pct is null; will show the email of all employee_id 176. | False? |
| Using figure 7.3, what SQL statement will show all the county names that starts with either A or E? | select country_name from country where country_name like ‘E%’ or country_name like ‘A%’; NO TABLE???????? |
| Read consistency ensures that, on the same data, readers do not wait for writers. | True |
| Which among the SQL command that when executed all data changes are undone? | ROLLBACK? |
| Which among the following is false for a non-correlated subquery? Pero ung choices 3 correct for correlated and 1 for non-correlated | it does not depend on the data from the outer query |
| select e.employee_id, m.last_name as ManagerName from cemployees e, cemployees m where e.manager_id = m.employee_id; | The SQL statement will show the name of the manager of the employees. |
| Using figure 8.3, what SQL statement will show the department name and employee id of employee ids 101 and 102? | select dept.department_name, e.employee_id from departments dept inner join cemployees e on dept.department_id = e.department_id and e.employee_id in (101,102); |
| What is a join that includes all columns from each table in the join, and an instance for each row of each table. | Union Join |
| An ___________ join is a join that shows the rows that do not have matching values in common columns are nonetheless included in the result table. | OUTER JOIN |
| If there is a role name Chefs, which among the code will let the role able to make tables? | GRANT CREATE TABLE TO CHEFS; |
| What are collection of objects such as tables, views and sequences? | Schemas |
| Oracle server database security cannot confirm given and received privileges with Oracle data dictionary. | False |
| System security covers access and use of the database at the system level. | True |