Question

In: Computer Science

SQL Assignment: Provide a made-up scenario about when a database trigger could be used. There is...

SQL Assignment:

Provide a made-up scenario about when a database trigger could be used. There is no need to provide the syntax to create the trigger, as this would differ depending upon the actual design of the database. Only provide the scenario of when a trigger could be used.

Solutions

Expert Solution

A database trigger is a code that is automatically executed when any DML operation performed on any Table of View in the Database. The trigger is commonly used for maintaining integrity information on the database.

Several DML (Data manipulation languages) operations for adding (inserting), deleting, and modifying (updating) data in a database in such scenarios, we need to track the Log's in our system for such operations and triggers is the key option to use and peruse our need.

Suppose you wanted to save the Logs of user transactions in the banking system i.e. Account number, amount, when Amount Credited, Debited, who Credited, who debited, Date of time for Credit/Debit, IP Address from where such operation did so such essential Log is needed later.

Take Example for Any user debited amount but due to some network amount debited from users' accounts but not credited on other hand so here Logs will be the key solution and those log entries are available because of the use of the Trigger.

Here if we used Triggers, then respected data will be available and easily we can track the issue and will resolve it.

Another way there is an annual survey where these logs are very important so in such scenarios Triggers is useful.

Thanks.


Related Solutions

SQL Assignment Discuss why and when cursors could be used.
SQL Assignment Discuss why and when cursors could be used.
Provide sql query to calculate average time between when an order is made and when it...
Provide sql query to calculate average time between when an order is made and when it is shipped. Use Avg() function to calculate average time.
Provide an example of a project, assignment, or in-class activity that could be used as a...
Provide an example of a project, assignment, or in-class activity that could be used as a means of employing multiple assessments of ELLs. Why are multiple assessments important?
SQL This assignment aligns with the following objectives: Create a relational database containing at least three...
SQL This assignment aligns with the following objectives: Create a relational database containing at least three tables Populate the database using the INSERT command Create integrity constraints on the tables created Deli has hired you as a consultant to design a database for the deli. They have provided you with the following information: Every employee has a social security number, name, salary, and date of hire. The deli is organized into several departments. Each department has a unique name. Each...
Need SQL commands for these questions based on the bowling league database; When was the first...
Need SQL commands for these questions based on the bowling league database; When was the first tournament date and where was it played? What are the number of tournaments per location?
Answer the following two questions in paragraph form: 1. A database system is made up of...
Answer the following two questions in paragraph form: 1. A database system is made up of five major parts. Identify these parts. Provide specifics of what make up these components. 2. A DBMS provides at least nine functions. Identify these functions and provide a brief explanation of each.
Describe the functions provided by a relational database that could be used to record courses taken...
Describe the functions provided by a relational database that could be used to record courses taken by university students in order to manage scheduling and preparing transcripts. Please respond with 200-250 words. Thanks
could you please provide me with 2-3 pages about (Uric Acide) with a reference from Up...
could you please provide me with 2-3 pages about (Uric Acide) with a reference from Up To Date website?
This assignment is about correlations and test of hypothesis. For each test of hypothesis scenario, (a)...
This assignment is about correlations and test of hypothesis. For each test of hypothesis scenario, (a) formulate the null and alternative hypotheses, (b) indicate the test used, (c) state the p-value from the test results, and (d) provide your conclusion. In your conclusion, give a reason for rejecting or not rejecting the null and clearly state what it means in the context of the problem. Are there significant differences in current salary for men and women? Female Male $21,900.00 $57,000.00...
Identify a possible change that could be made to a process or aid used in your...
Identify a possible change that could be made to a process or aid used in your workplace. Suggest three ways in which you could identify this particular need.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT