logo

Crowdly

Browser

Додати до Chrome

Questions Bank (1557147 total)

Digitaro adalah perusahaan fintech yang menerapkan sistem insentif otomatis berbasis jam kerja dan performa. Sistem mereka sangat tergantung pada trigger dan stored procedure yang kompleks, dengan skenario sebagai berikut:

  • Tabel employee memiliki kolom: ssn, name, salary, bonus, total_hours_project, dan performance_grade.
  • Tabel works_on memiliki kolom: essn, project_id, hours.
  • Setiap kali jam kerja dimasukkan, total_hours_project diperbarui otomatis.
  • Jika total_hours_project > 200, maka bonus otomatis diberikan sebesar 20% dari gaji pokok.
  • Jika performance_grade diubah menjadi "A", maka stored procedure akan memanggil prosedur pemberian bonus tambahan.
  • Terdapat trigger untuk menolak semua insert/update yang menyebabkan salary + bonus > 1.5 * (salary supervisor).

Jika terdapat trigger pada employee yang akan:

  • Setelah update salary ➝ memanggil stored procedure recalculate_bonus()
  • Namun, ternyata recalculate_bonus() juga melakukan UPDATE employee SET salary = salary + 500 jika jam kerja > 250.

Apa yang mungkin terjadi?

0%
0%
0%
0%
Переглянути це питання
After surviving a particularly violent tornado, Dean experiences a selective memory loss for specific traumatic events that occurred just before and during the disaster. Other than these specific memory losses, Dean's personality and subjective sense of identity are essentially unchanged. Dean would most likely be diagnosed with:
0%
0%
0%
100%
Переглянути це питання
According to data from epidemiological studies, the mean age of onset for schizophrenia is closest to
0%
100%
0%
0%
Переглянути це питання
A woman wandered away from her hometown and was discovered five years later in a distant city under a different name and identity. She is probably suffering from
0%
0%
0%
0%
Переглянути це питання
A war veteran who survived 5 tours of duty is functionally blind, even though there does not appear to be anything wrong with his eyes. He may be experiencing
0%
0%
100%
0%
Переглянути це питання

Perhatikan trigger dan store procedure dibawah ini

Pilihlah pernyataan yang paling tepat untuk kode di atas!

I. Penggunaan OLD.Fname tidak tepat.

II. Jika ingin tetap mempertahankan penggunaan OLD.Fname, perlu dibuat kondisi baru, yaitu

IF (TG_OP = 'INSERT') THEN RAISE EXCEPTION '% salary cannot greater than his/her supervisor salary', NEW.Fname;

III. Jika ingin tetap mempertahankan penggunaan OLD.Fname, perlu dibuat kondisi baru, yaitu

IF (TG_OP = 'UPDATE') THEN RAISE EXCEPTION '% salary cannot greater than his/her supervisor salary', NEW.Fname;

IV. Penggunaan OLD.Fname sudah tepat.

100%
0%
0%
0%
Переглянути це питання

Perhatikan definisi tabel berikut

CREATE TABLE EMPLOYEE (

Ssn VARCHAR PRIMARY KEY,

Fname VARCHAR,

Salary NUMERIC,

Super_ssn VARCHAR REFERENCES EMPLOYEE(Ssn),

Dno INT

);

Pilihlah trigger dan stored procedure yang paling tepat untuk memastikan bahwa tidak ada supervisor (Super_ssn) yang berbeda departemen dari pegawai yang dia supervisi.

0%
0%
0%
0%
Переглянути це питання

Яку функцію виконує інструмент зображений на рисунку?

0%
0%
0%
0%
100%
Переглянути це питання

Яку функцію виконує інструмент зображений на рисунку?

0%
0%
0%
100%
0%
Переглянути це питання
A behaviour therapist spent months working with an autistic child who finally managed to say a few words. What is one reason that so much time and effort is needed to make such small changes in the behaviour of autistic children?
0%
100%
0%
0%
Переглянути це питання