subject

* Ocelot exercise database presented in SQL basics 1 will be used in this exercise * Return exercise in .txt format and use formatting presented below (question always followed be the query)
-- Select all employees from table
SELECT * FROM EMPS;
* In this exercise you will add a new table to Ocelot training database, which will be used to describe the history of employee salary.
Create tables
1. Create a new table called salarydata with the following columns:
* salarydataID (primary key)
* salary (the amount of salary described with two decimals)
2. Create a connection between salarydata and emps tables (Tip: First think what column you should bring from emps table and then create a new column for it). Use the following options in foreign key definition:
* UPDATE CASCADE
* DELETE NO ACTION
Editing table properties
* Important: Do not include the following tasks with the CREATE TABLE statement used in the first exercise but rather add them using a separate query!
3. Add a new column called last_update. The current date should be added automatically for this column when new data is inserted.
4. Add automatic counter for salarydataID column so that this field value will be automatically generated each time a new data is inserted.
Input validation
5. Create input validation check with TRIGGER. The following checks has to be made:
* Salary cannot be under 1000 and cannot exceed 12000 euros.
* Salary value must be even (salary % 2 = 0). For example, only salary values 1000, 1002, 1004 etc. are accepted.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:30
Which of these options are the correct sequence of actions for content to be copied and pasted? select content, click the copy button, click the paste button, and move the insertion point to where the content needs to be inserted. click the copy button, select the content, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, click the copy button, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, move the insertion point to where the content needs to be inserted, click the copy button, and click the paste button.
Answers: 3
question
Computers and Technology, 22.06.2019 19:00
The fourth generation of computers emerged between 1970s and 1980s. which technological advancement brought about this generation of computers? which computer architecture was used most in this generation?
Answers: 3
question
Computers and Technology, 22.06.2019 23:30
Select all that apply. which of the following are proofreading options included in microsoft word? spell check find replace grammar check formatting check
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
1. which of the following is not an example of an objective question? a. multiple choice. b. essay. c. true/false. d. matching 2. why is it important to recognize the key word in the essay question? a. it will provide the answer to the essay. b. it will show you a friend's answer. c. it will provide you time to look for the answer. d. it will guide you on which kind of answer is required.
Answers: 1
You know the right answer?
* Ocelot exercise database presented in SQL basics 1 will be used in this exercise * Return exerci...
Questions
question
Computers and Technology, 29.04.2021 20:40
question
Mathematics, 29.04.2021 20:40
question
Mathematics, 29.04.2021 20:40