Computers and Technology

* 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.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 02:30, chaaaa
People with high self-esteem: accept their strengths and weaknesses. believe that failed experiences are failures of their whole self. feel good about who they are only when they reach total success. need positive external experiences to counteract negative feelings that constantly plague them.
Answers: 1
image
Computers and Technology, 23.06.2019 07:00, sugaree95
What are three software programs for mobile computing?
Answers: 1
image
Computers and Technology, 24.06.2019 02:00, arubright177
Write an expression that will cause the following code to print "equal" if the value of sensorreading is "close enough" to targetvalue. otherwise, print "not equal". ex: if targetvalue is 0.3333 and sensorreading is (1.0/3.0), output is:
Answers: 1
image
Computers and Technology, 24.06.2019 09:10, daedae11142
  to change the number of rows and columns displayed by the excel object a. select the object and drag a size handle on the active object. b. deselect the object and drag a size handle of the object. c. deselect the object and drag a row or column divider of the object. d. select the object and drag a row or column divider on the active object.
Answers: 2
Do you know the correct answer?
* Ocelot exercise database presented in SQL basics 1 will be used in this exercise * Return exerci...

Questions in other subjects:

Konu
Mathematics, 03.09.2020 01:01