Knowee
Questions
Features
Study Tools

The command used to create a virtual relation is CREATE .................. Flag question: Question 3Question 3Tips12 ptsIDNameEmailDepartmentSalary1Stephane [email protected] Science800002Ayeyi [email protected] Engineering500003Nanna [email protected] Systems600004John [email protected] Engineering500005Mary [email protected] Science80000From the table above, write MySQL queries to do the following:Add a new tuple to the employee tableChange John Doe's department from Software engineering to Information SystemsReturn all the salaries that are being paid without any duplicateRemove the email column from the employee tableDisplay all the records that have the second character of the department as an 'O'Find the person who earns the most money

Question

The command used to create a virtual relation is CREATE .................. Flag question: Question 3Question 3Tips12 ptsIDNameEmailDepartmentSalary1Stephane [email protected] Science800002Ayeyi [email protected] Engineering500003Nanna [email protected] Systems600004John [email protected] Engineering500005Mary [email protected] Science80000From the table above, write MySQL queries to do the following:Add a new tuple to the employee tableChange John Doe's department from Software engineering to Information SystemsReturn all the salaries that are being paid without any duplicateRemove the email column from the employee tableDisplay all the records that have the second character of the department as an 'O'Find the person who earns the most money

...expand
🧐 Not the exact question you are looking for?Go ask a question

Solution

  1. To add a new tuple to the employee table, you can use the INSERT INTO command. Here's an example:
INSERT INTO employee (ID, Name, Email, Department, Salary)
VALUES (6, 'New Employee', '[email protected]', 'New Department', 70000);
  1. To change John Doe's department from Software Engineering to Information Systems, you can use the UPDATE command:
UPDATE employee
SET Department = 'Information Systems'
WHERE Name = 'John Doe';
  1. To return all the salaries that are being paid without any duplicates, you can use the SELECT DISTINCT command:
SELECT DISTINCT Salary
FROM employee;
  1. To remove the email column from the employee table, you can use the ALTER TABLE command:
ALTER TABLE employee
DROP COLUMN Email;
  1. To display all the records that have the second character of the department as an 'O', you can use the LIKE command:
SELECT *
FROM employee
WHERE Department LIKE '_O%';
  1. To find the person who earns the most money, you can use the MAX function:
SELECT Name, MAX(Salary)
FROM employee;

This problem has been solved

Similar Questions

The command used to create a virtual relation is CREATE ..................

The Schema::createRel() function is used to create a relation. Creating a relation involves adding the relevant records to the relation catalog and the attribute catalog (using BlockAccess::insert()). Before this can be done, the user input will need to be verified to ensure that there are no existing relations with the same name. Additionally, it will also need to be verified that the new relation does not contain duplicate attribute names.

ApplicationUse the space below to write an alternative way of ending that relationship. It can be a letter, email or even a script. You do not need to send this message, but it is useful to practice this skill in order to prepare you for future professional relationships that may end. Make sure to use correct spelling, punctuation and grammar.

Logical Design (20 Marks) • The conceptual design to be implemented following the rules of mapping. Details of all the mapping rules to be explained in a tabular format along with the primary key, foreign key identified after the relationship is mapped. • The logical schema designed to be shown with all the files and the relationship. • For the logical schema designed, all the files required data type, size and other details to be given in a tabular format. • Logical schema designed to be shown with all the arrows to show the relationship between the parent and the child relations

Mapping of conceptual schema using the entity-relationship model into a relation schema, is achieved at the stagea.Physical-design phaseb.Logical-design phasec.Contextual-design phased.Virtual-design phase

1/1

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.