Save
Upgrade to remove ads
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

Info Man F4

QuestionAnswer
Which among the following will set an attribute of the table to a unique key of another table? foreign key
the insert statement inserts only one row at a time. False
Using figure 7.1, the SQL code: insert into salesman values(161, ‘Garry’, ‘Paris’, 0.8, 10200); , will insert the new record successfully. True
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
The SQL statement: insert into sample_table (sample_id) values (&sample_id)); , will update a new record in the table. False
Using figure 7.1, which among the following commands will you use to change the commission of the salesman? update
Using figure 7.1, this statement is going to delete all the contents of the table: delete from salesman; True
Using the syntax to insert a row below:INSERT INTO table [(column [, column...])] VALUES (value [, value...]); What is the value part it is the corresponding value of the column
You can add multiple rows to a table using a single insert statement. False
Using figure 7.1, what is the SQL will change the city Paris to paris? update salesman set city = ‘paris’ where city = ‘Paris’;
Using figure 7.4 and given the statement: 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 True(pt1)
where commission_pct is null; will show the email of all employees with employee ids 101,102,114,122,200 and 201. True(pt2)
Read consistency ensures that, on the same data, Writers do not wait for readers. True
The select statement is used for queries on single or multiple tables. True
Transactions give you more flexibility and control when changing data, and they ensure data consistency in the event of user process failure or system failure. True
All readers, except the one who issued the change, see the database as it existed before the changes started; they view the undo segment’s “snapshot” of the data. True
Transactions consist of DML statements that constitute one consistent change to the data. True
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
Read consistency is an automatic implementation. It keeps a partial copy of the database in the undo segments. True
To create a marker in the current transaction, use savepoint statement. True
The left outer join returns all records from the outer table and the matching records returned from the joined table. True
INNER JOIN clause is an alternative to WHERE clause, and is used to match primary and foreign keys. True
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
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
If data is to be used many times, make a separate query and store it as a view for query efficiency. True
Keep optimizer statistics up-to-date to have a better query design. True
Use the tables above for this question. 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 where count(job_id) > 5 group by job_id having count(job_id) >5;
Using figure 8.3, the SQL statement: select d.department_name,e.employee_id from departments d, cemployees e where d.department_id = e.department_id and e.commission_pct is not null order by e.EMPLOYEE_ID; False(pt1)
will show the department name and the employee ids of the employees that has a null commission percentage. False (pt2)
What SQL statement will show the last name and the department name of Payan Kaufling? SELECT C.Last_name, D.Department_name FROM DEPARTMENTS D INNER JOIN CEMPLOYEES C WHERE D.DEPARTMENT_ID = C.DEPARTMENT_ID AND C.LAST_NAME = 'Kaufling' AND C.FIRST_NAME = 'Payan';
Fine tuning with group by and having clauses is needed in queries. True
If there is a role name Chefs, which among the code will let the role able to make tables? GRANT CREATE TABLE TO CHEFS;
An example of a data security is the use of username and password. False
Data security covers access and use of database objects and the actions that the users can perform on the objects. True
Which code will allow user A and B to make virtual tables? GRANT CREATE VIEW TO A,B;
What is a type of privilege that can perform a particular action within the database? system privilege
Data security covers the system operations that the users can perform. False
The DBA must create a role then the DBA can assign privileges to the role and assign the role to users. True
System security covers access and use of database objects and the actions that the users can perform on the objects. False
Users require object privileges to gain access to the database. False
An owner of a table can grant access to all users by using the PUBLIC keyword True
To remove a row from a table use the drop table statement. False
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
Using figure 7.1, which among the SQL statement is going to change the salary to 19000 and commission to 0.15 of the salesman named Cambrault? update salesman set salary = 19000, commission = 0.15 where sname = ‘Cambrault’;
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);
To remove a row from a table you can use the delete statement True
In SQL, which of the following is not a data Manipulation Language Commands? Truncate
Using figure 7.1, the SQL code: update salesman set commission = 0.25 where city = 5700; , will change all the commission of the city that is empty or null. False
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
What does these SQL statements do? Delete from table1; rollback; Deletes the table and then discards all pending changes of the transaction.
Read consistency ensures that, on the same data, readers do not wait for writers. True
In read consistency, changes made by one user do not conflict with the changes made by another user. True
Using figure 7.4 and given the statement: create view certain_employees as select * from employees where employee_id in (101,102,114,122,176,200,201); False(pt1)
,the SQL statement: select email from certain_employees where commission_pct is null; will show the email of all of the employee with an employee_id 176. False(pt2)
What is the clause of the select statement that sorts the result according to specified criteria? order by
The check option command in creating a view works only for updateable views. 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%';
select sname, city from salesman where city like '%i%';
select sname from salesman where city like '%i%' or city like '%I%';
Use SELECT * instead of identify the specific attributes in the SELECT clause for query efficiency. False
What is an equi-join in which one of the duplicate columns is eliminated in the result table? natural join
An __________ is a join in which the joining condition is based on equality between values in the common columns. EQUI-JOIN
Which among the following is false for a non-correlated subquery? it executes once for each row of the outer query
Which among the following is true for a non-correlated subquery? it does not depend on the data from the outer query
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
If data is to be used many times, create a synonym for query efficiency. False
Roles are not typically created for a database application False
A system privilege is the right to perform a particular action, or to perform an action on any schema objects of a particular type. True
A user can have access to several roles, and several users can be assigned the same role. True
The DBA can then grant privileges to that user which determines what the user can do at the database level. 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.
A privilege that is granted with the WITH GRANT OPTION clause can be passed on to other users and roles by the grantee True
Oracle server database security is unable give access to specific objects in the database. False
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
Using the salesman table and given the SQL code: update salesman set city = ‘Manila’ where salesman_id = 152; , what does the statement do? it changes the value of the city column assigned to Hall.
A DML statement is executed when adding rows, modifying existing rows, and removing existing rows from a table True
Using figure 7.1, what is the SQL code to change the salesman name of the salesman to Kingster who has a name of King with an id of 156, regardless of the case of the name. update sname set salesmanname = 'Kingster' where salesman_id = 156 and sname in ('King','king');
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; False
Which among the following commands will add a new record to the database? INSERT INTO
Which among the following codes will add one row in a table insert into SampleTable (sampleid, samplename) values (12345,’The name’);
Read consistency ensures that, on the same data, readers wait for writers. False
What command to use when saving changes to the database that is irreversible? COMMIT
Read consistency ensures that, on the same data, Writers wait for readers. \ False
A view is based on a SELECT statement True
Using figure 7.4, what SQL statement will show the first name, the last name, the email and the salary of the employee who has a salary between 7000 to 11000? It will also change the column name salary to AdvancedSalary. select first_name, last_name, email,salary AdvancedSalary from employees where salary between 7000 and 11000;
A database transaction consists of DML statements that constitute one consistent change to the data. True
What is the clause of the select statement where in it indicates the tables or views from which data will be obtained? from
Reviewing the ERD of the schema first is important in analyzing queries. True
Instead of SELECT *, identify the specific attributes in the SELECT clause for query efficiency. 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.
Understanding how indexes are used in query processing makes a better query design. True
What is a join in which rows that do not have matching values in common columns are nonetheless included in the result table outer join
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;
Oracle server database security can control database access. True
Oracle server database security can confirm given and received privileges with Oracle data dictionary. True
A schema is owned by a database user and has the same name as that user. True
Which among the following codes will create a user name Michelle_Admin with a password of MA_123 Create user Michelle_Admin identified by MA_123;
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
Data security covers access and use of the database at the system level. False
If user A gave an administrative privilege to user B and user B gave also administrative privilege to user C, What will happen if user A revokes the privilege from user B? User C’s privilege will also be revoked.
System security covers access and use of the database at the system level. 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. None on the choices
Which command displays the structure of the table? describe
In figure 7.1, which among the columns of the table will accepts a string with more than 15 characters? sname
Which symbol should be used to prompt for values? &
A transaction consists of collection of data manipulation language statements that form a logical unit of work 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 does not do anything on the table because the condition is not found on the table.
What is the clause of the select statement that list the columns and expressions to be returned from the query? select
Rollback to savepoint returns the transaction back to the marker. True
Which among the SQL command that when executed all data changes are undone? ROLLBACK
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
To create a marker in the current transaction, rollback is used. False
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’;
Which among the following is true for a correlated subquery it can use the EXISTS operator
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);
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
Multiple subqueries in a select statement is better for query efficiency. False
Users can also be given the privilege to grant additional privileges to other users or to roles, which are named groups of related privileges. True
It is a type of database security that covers access and use of the database at the system level. system security
Data security allocates disk space to users. 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
Which among the following is not considered a database transaction? One data definition statement
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
Using the syntax to insert a row below:INSERT INTO table [(column [, column...])] VALUES (value [, value...]); What is the table part? it is the name of the table
When updating values inside the table you can update the row one at the time. True
The update statement modifies existing values in a table True
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;
A database transaction consists of one DCL statement. True
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
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
In the commit statement, the previous state of data is restored. False
The union join returns all the records of the union. False
An example of a system security is the use of username and password. True
Oracle server database security cannot confirm given and received privileges with Oracle data dictionary. False
What are collection of objects such as tables, views and sequences? schemas
The database administrator (DBA) is a high-level user with the ability to create users and grant users access to the database and its objects. True
Oracle server database security is unable control database access. False
The SQL statement: CREATE USER user IDENTIFIED BY password; , is statement that will create a user and assigns a password. True
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
These are SQL commands that maintain and query a database. DML
Which among the following will delete one row in a table? delete from SampleTable where columnId
1000;
If the transaction is rolled back, the changes are undone, all users see the database as it existed before the transaction began. True
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 Executive Executive Employee_id 101 102
Limit the number of subqueries and try to make everything done in a single query if possible for query efficiency. True
What is a join that includes all columns from each table in the join, and an instance for each row of each table. Outer join
What is a type of privilege that can manipulate the contents of the database objects? object privilege
Users require object privileges to manipulate the contents of the objects in the database. 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
Which among the following will set an attribute of the table to a unique key? primary key
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
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
In the savepoint statement, all the locks of the affected rows are released. False
In the savepoint statement, all data changes are undone False
The Oracle server ensures data consistency based on transactions. True
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
Don’t combine a query with itself like avoiding self-joins to have a better query design. 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? OUTER JOIN(?)
Users require system privileges to gain access to the database. True
Created by: xd-xdd
 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards