Which one of two SQL triggers (MYSQL,PostgreSQL) appears easy to you and why would you recommend it to your boss who depends on your technical input to makes the final software license acquisition decision? Which trigger type would you recommend to your boss?
(MYSQL)
CREATE TRIGGER trig__mileage
BEFORE INSERT ON mileage
FOR EACH ROW
SET NEW.mpg = NEW.miles / NEW.gallons;
(PostgreSQL)
CREATE TRIGGER trig__mileage
BEFORE INSERT ON mileage
FOR EACH ROW
EXECUTE PROCEDURE trig_proc_calculate_mpg();
As both PostgreSql and MySql support triggers, I would recommend PostgreSql Triggers because Mysql Trigger limits to some commands.
But PostgreSql Support triggers that can fire on most types of command, except for ones affecting the database globally e.g., roles and tablespaces.
Hence, as the PostgreSql trigger given here in this context
CREATE TRIGGER trig__mileage
BEFORE INSERT ON mileage
FOR EACH ROW
EXECUTE PROCEDURE trig_proc_calculate_mpg();
which does not contain any roles and table spaces, PostgreSql Trigger is recommended.
Which one of two SQL triggers (MYSQL,PostgreSQL) appears easy to you and why would you recommend...
1. This trigger is from Figure 16.2 of the text. Copy and run this trigger so it is created in the ap database. You can run the UPDATE below to test it. Notice two things. The error message appears as a pink screen just like a syntax error would. Also, if you then query the invoices table, the UPDATE statement did not execute. The trigger prevented the erroneous UPDATE from changing the data. DELIMITER // CREATE TRIGGER invoices_before_update BEFORE UPDATE...
You are a database consultant with Ace Software, Inc., and have been assigned to develop a database for the Mom and Pop Johnson video store in town. Mom and Pop have been keeping their records of videos and DVDs purchased from distributors and rented to customers in stacks of invoices and piles of rental forms for years. They have finally decided to automate their record keeping with a relational database. You sit down with Mom and Pop to discuss their...
Create SQL statements based on the given tables:
Code to create the tables:
CREATE DATABASE LAB4DB;
USE LAB4DB;
CREATE TABLE CUSTOMER (
CUS_CODE int primary key,
CUS_LNAME varchar(15),
CUS_FNAME varchar(15),
CUS_INITIAL varchar(1),
CUS_AREACODE varchar(3),
CUS_PHONE varchar(8),
CUS_BALANCE float(8)
);
INSERT INTO CUSTOMER
VALUES('10010','Ramas','Alfred','A','615','844-2573','0');
INSERT INTO CUSTOMER
VALUES('10011','Dunne','Leona','K','713','894-1238','0');
INSERT INTO CUSTOMER
VALUES('10012','Smith','Kathy','W','615','894-2285','345.86');
INSERT INTO CUSTOMER
VALUES('10013','Olowski','Paul','F','615','894-2180','536.75');
INSERT INTO CUSTOMER
VALUES('10014','Orlando','Myron','','615','222-1672','0');
INSERT INTO CUSTOMER
VALUES('10015','O''Brian','Amy','B','713','442-3381','0');
INSERT INTO CUSTOMER
VALUES('10016','Brown','James','G','615','297-1228','221.19');
INSERT INTO CUSTOMER
VALUES('10017','Williams','George','','615','290-2556','768.93');
INSERT INTO CUSTOMER
VALUES('10018','Farriss','Anne','G','713','382-7185','216.55');
INSERT INTO CUSTOMER
VALUES('10019','Smith','Olette','K','615','297-3809','0');
/*...
Overview This lab provides you the opportunity to insert and update data with the use of SQL commands. The lab will utilize the FLIX2YOU problem, the current schema. In order to start this lab, you must have successfully completed Lab # 6. In Lab # 6, you executed a script that was provided to you. This script created 7 of the FLIX2YOU tables as documented in the Entity Relationship Diagram in the FLIX2YOU problem document. The second part of lab...
Please try to write the code with Project 1,2 and 3 in
mind. And use java language, thank you very much.
Create an Edit Menu in your GUI
Add a second menu to the GUI called Edit which will have one
menu item called Search. Clicking on search should prompt the user
using a JOptionPane input dialog to enter a car make. The GUI
should then display only cars of that make. You will need to write
a second menu...
Read this article. Then write a 250 word response on two of the programs you like the most. Open source business intelligence software 1. BIRT BIRT is an open source BI program that CloudTweaks says is often viewed as the industry standard. BIRT boasts “over 12 million downloads and over 2.5 million developers across 157 countries.” Its users include heavyweights such as Cisco, S1, and IBM (which is also a BIRT sponsor). They also have maturity going for them, as...
Game Description: Most of you have played a very interesting game “Snake” on your old Nokia phones (Black & White). Now it is your time to create it with more interesting colors and features. When the game is started a snake is controlled by up, down, left and right keys to eat food which appears on random locations. By eating food snake’s length increases one unit and player’s score increases by 5 points. Food disappears after 15 seconds and appears...
I have this case study to solve. i want to ask which
type of case study in this like problem, evaluation or decision? if
its decision then what are the criterias and all?
Stardust Petroleum Sendirian Berhad: how to inculcate the pro-active safety culture? Farzana Quoquab, Nomahaza Mahadi, Taram Satiraksa Wan Abdullah and Jihad Mohammad Coming together is a beginning; keeping together is progress; working together is success. - Henry Ford The beginning Stardust was established in 2013 as a...
Risk management in Information Security today Everyday information security professionals are bombarded with marketing messages around risk and threat management, fostering an environment in which objectives seem clear: manage risk, manage threat, stop attacks, identify attackers. These objectives aren't wrong, but they are fundamentally misleading.In this session we'll examine the state of the information security industry in order to understand how the current climate fails to address the true needs of the business. We'll use those lessons as a foundation...