Category Archives: Research Papers

THERMO FLUID DESIGN

Given a facility’s hourly chilled water (CHW) cooling load demand shown in the following spreadsheet, a combined chiller and stratified CHW thermal storage system is proposed to meet the demand while saving the cost (due to the time-of-use rate schedule). A full storage operating strategy (load shift) is employed in which the chiller is completely turned off for the 5-hour ON-PEAK rate period from 12pm to 4 pm (why 5 hours? It starts from 12pm to 5pm, i.e., from 12-1pm, 1-2pm, 2-3pm, 3-4pm, and 4-5pm.) with the cooling load solely provided by the CHW storage system. During the NON ON-PEAK period (5pm to 11am), the chiller will meet the instantaneous cooling load demand in addition to store thermal capacity.

Construct an Excel spreadsheet based on the one in the next page which illustrates the load shifting operating strategy and answer questions 1-10 on Blackboard.

Fraud Audit Issues


Using the knowledge gained with the ACL tutorials, complete FIVE ACL tests to uncover the following
fraud, putting your screenshots and a brief (13 lines) explanation of each test and the results below the
screenshots:

Because of James Walker’s familiarity with the purchases system, he was asked by top management to
temporarily oversee the initial running of the new system to ensure a smooth transition from the old
legacy system. After several months, Walker was offered a promotion to Warehouse Manager and
given permanent responsibility for product purchasing.

This act by management placed Walker in a situation that allowed him to exploit inherent weaknesses in
the system and perpetrate a fraud. As part of the fraud, Walker established himself as a fictitious
vendor, number 11663. The fraud methodology involved Walker using his uncontrolled access to the
system to falsify purchase orders to his phony company and then using voided receiving report numbers
to simulate inventory receipts. These two events trigger the system to create a voucher payable record.
By submitting vendor invoices from his fictitious company, Walker effectively tricks the system into
writing him a check.

Hints for the five tests:

1. Because Walker wants the checks to come to him personally, what address do you think the
company he makes up would have?
2. How many of the vendor purchases are attributable to Walker’s fictitious company? (use
Classify to get cost and percentage)
3. Do the purchase order quantities for the vendor match the receiving reports? (Filter Purchase
Order for Vendor 11663, Total on Quantity)
How much was paid for the purchase orders if the quantities were different? (Join Purchase
Order to Chk Register on Vendor Number and filter for Vendor 11663. Then total the
Ext_Cost)
4. How much was paid to the fictitious vendor? (Chk_Amnt from Chk_Register for vendor
11663)
Does this match the Vouchers? (This is what was paid for purchase orders from Q3)
5. How much was received from the fictitious vendor?

international law: international terrorists


This paper is an essay assignment of three questions to test knowledge and assimilation.

  1. Describe the motivators that influence the terrorist mindset. What are common grievances or causes of modern international terrorists?
  2. Describe the fundamental differences between terrorism and insurgency. What are the key areas of divergence and convergence between them?
  3. What are the origins and drivers of violent Islamic fundamentalism that enable it as a worldwide Jihadist movement?

Technical Requirements

  • Your paper must be at a minimum 2-3 pages for each question for a total of 6-9 pages (the Title and Reference pages do not count towards the minimum limit).
  • Scholarly and credible references should be used. A good rule of thumb is at least 2 scholarly sources per page of content.
  • Type in Times New Roman, 12 point and double space.
  • follow the current APA Style as the sole citation and reference style used in written work submitted as part of coursework.
  • Points will be deducted for the use of Wikipedia or encyclopedic type sources. It is highly advised to utilize books, peer-reviewed journals, articles, archived documents, etc.

criminal justice:probable cause declaration

write the probable cause declaration (Statement of Probable Cause) of your search warrant. First you need to do a face page, Review the explanation for how to complete the face page in Search Warrant Part 1 lecture.

You will use the information provided in exercise #1 to obtain the needed details for your declaration. All is attached again. The face page template is attached as-well.

If the information is not provided then you need to use your imagination and be creative to provide missing information. Your search warrant declaration should have the following information:

  • Search warrant affidavit (Declaration sworn by YOU that the information is true and correct).
  • Location to be searched and items to be seized.
  • Probable Cause Declaration (Statement of Probable Cause)
    • “Hero sheet”
    • Facts that establish probable cause
    • Explanation as to why the items search for will be found
    • Crimes committed by the defendant
    • -1. The search warrant should be in narrative form The face page of the warrant should be descriptive and have all the proper information.
    • 2. The probable cause declarations should be describing in detail what occurred and what you did in a clear, concise, and chronological order.
    • 3. The length of the probable cause declaration should be a is minimum 1 full page (single spaced) (There is freedom in this assignment to be creative and fill in gaps that may have not been covered but that you think should be done as an Investigator/Detective. Think like an Investigator/Detective. You are asking a judge to allow you to enter a person’s home and search it for evidence of a crime. Take your time and proofread your work!

BOND ANALYSIS and ANALYTICS WORKSHOP


Financial Services and Information Technology Lab

Homework Assignment (100 points)

Use the Bloomberg terminal to answer the following questions and submit a
hardcopy on the date posted in Blackboard.

Problem 1: Convert a semiannual yield of 4.123% with a day count of
ACT/ACT to an annual yield with a day count of 30/360 and show the 2
screenshots of the Bloomberg functions used: (5p)

Start date: February 4, 2020

Final date: November 10, 2024

Initial Amount: $1,000,000

Problem 2: Attach a screenshot of most recent US Treasury bills, notes and
bonds using Bloomberg (and Refinitiv Thomson Reuters)? What is the CUSIP
number and the ticker of the most recent US 10year US Treasury? How about
for the most recent 30 yr US Treasury? (5p)

Answer:

Problem 3: Answer the following questions related to the following German
bond.(10p)

3.1. What would you pay for the following bond on the settlement date:
November 14, 2023 for 1,000,000 Euro of DBR 1 1/4 08/15/48 to obtain an
yield of 2.50%? Draw the Cash Flows timeline and show the Bloomberg
functions used.

Answer:

3
Financial Services and Information Technology Lab

3.2. Using Bloomberg, derive the clean bond price, dirty price and accrued
interest and attach screenshots of the cash flows and price calculation?

Answer:

Clean price:

Dirty price:

Accrued Interest:

Problem 4: Using Bloomberg, find the bond of Centex Corp. which matured on

May 1, 2016 and answer the following questions (20p)

4.1. What was the ticker?

Answer:

4.2.What was the CUSIP Number ?

Answer:

4.3.What was the Issue Price?

Answer:

4
Financial Services and Information Technology Lab

4.4.What type of bond was it?

Answer:

4.5. What Bloomberg function do we use to find out if investors were protected
in case of a LBO or event of default? Were there any negative or positive
pledges? How about any restrictive covenants? Can you please describe what
these covenants mean?

Answer:

5
Financial Services and Information Technology Lab

Problem 5. Using Bloomberg, calculate and explain Macaulay Duration,
Modified Duration, Bloomberg Risk, Convexity and DV 01 for 1,000,000 Euro
of the DBR 2 1/2 08/15/46 on settlement date: February 27, 2023 given an
yield of 2.60%. (20p)

5.1. Macaulay Duration

Answer:

5.2. Modified Duration

Answer:

5.3. Benchmark Risk

Answer:

5.4. Convexity

Answer:

6
Financial Services and Information Technology Lab

5.5. How much money you can make/lose per 1bpv on your 1,000,000 Euro
position on settlement date:?

Answer:

Problem 6. Use the RRRA and other relevant functions in Bloomberg to
answer the following questions assuming that you would use the US
government bond listed below as collateral (20p)

BOND INFORMATION

CUSIP
912810QZ4
ISIN
US912810QZ49
MATURITY
02/15/43
FACE AMOUNT
10 MILLION
COUPON RATE
3 1/8
REPO INFORMATION

TRADE DATE
FEB 23, 2023 11:00AM
SETTLEMENT DATE
FEB 24, 2023
TERMINATION DATE
MARCH 3, 2023
REPO TYPE
FIXED RATE
REPO RATE
4.5600%
DAY COUNT TYPE
ACT/360
COLLATERAL
PERCENTAGE

103.0000%

6.1. Describe how you can find US Treasury bond’s historical price chart for
the above mentioned Treasury bond. Attach a screenshot of all historical prices
starting on 11/01/2022 through the present.

Answer:

7
Financial Services and Information Technology Lab

6.2. What were the (quoted) bond prices on trade date and settlement date?
Which one would you use to calculate the REPO and why?

Answer:

6.3. What is the accrued interest in dollar amount on settlement date?

Answer:

6.4. What is the duration of the REPO?

Answer:

6.5. How much money would the REPO buyer expect to receive on settlement
date?

Answer:

6.6. How much interest would the REPO seller expect to receive on
termination the date?

Answer:

8
Financial Services and Information Technology Lab

Problem 7 (20 p)

On the day you get to the Bloomberg terminal, use the SWPM function and
start analyzing the fixedfloat SWAP given the following: Notional = 100 Million,
Currency: USD, Tenor: 5 years, Leg 1: Pay fixed, Pay Frequency: SemiAnnual,
Leg 2: Receive Float, Reset Frequency : Quarterly, Pay Frequency: Quarterly, use
the interest rates posted on that day.

Attach all the screenshots and answer the following questions:

7.1. What is the swap rate?

Answer:

7.2. What is the market Value of the SWAP on the date you create the SWAP?

Answer:

7.3. Attach a screenshot of the Cash Flows for the Leg: Receive Float

Answer:

7.4. What is the DV01 for the fixed payer? What does it mean?

Answer:

7.5. If the interest rates go up by 1 basis point what is the impact on the swap
market value?

Answer

psychology:therapeutic process

Write 5-page Essay on How communications skills can be related to the success of a therapeutic process? And How confidentiality and the use of self-disclosure complement a therapeutic process?. I need an introduction, body, conclusion and reference. It is important citations during the writing. Everything is in a psychology perspective

Week 4 Modern Day Policing, Society,And The Future

Over the years, modern police has changed dramatically as a result of adjustments to changes in technology, societal values, and the political environment. These elements, along with the following tendencies, will continue to influence policing in the future:

1. Increasing reliance on technology: To expand their capabilities and increase accountability, police departments are increasingly turning to cutting-edge technologies like facial recognition, predictive policing, and body cameras.

2. Emphasis on community policing: In recent years, there has been an increase in awareness of the significance of community policing, which places an emphasis on proactive engagement in communities to foster trust and positive relationships.

3. Put a focus on diversity and inclusion: As society becomes more diverse, police departments are realising how crucial it is to incorporate diversity and inclusion into their hiring and training procedures in order to create more inclusive workplaces.

Parallax Measuring Device



Name:
Lab Instructor: Lab Section:
Parallax Measurement
Student Worksheet
1. [40 pts] Taking Your Parallax Measurements Refer to Figure 3 and Section 3 of the lab
PDF For instructions on how to take your parallax measurements using the UTK Parallax
Measuring Device (PMD). On the PMD, the two posts are separated by 20 inches, which
serves as the baseline for the parallax measurement. Use the leftpost to align a distant
object and a background reference. Then using the rightpost measure the angle of the
apparent displacement due to parallax.
As you move your object to the three distance positions, directly measure the distances
using the provided measuring tape. When you move the object to a new position, extend
the tape measure from the point directly below your PMD under the table to the point
directly below the distant object. You are aiming for roughly Position 1 = 10 ft, Position 2
= 20 ft, and Position 3 = 30 ft. Record your direct measurements in Table 1.
Table 1. Direct Measurements of Distance
Measure distances in inches, to the nearest halfinch.
Position 1 (in) Position 2 (in) Position 3 (in)
As you measure the angles you will use to determine the observed parallax, record in
Table 2 found on the next page.

Table 2. Your Parallax Measurements & Calculated Distances
Record angles to the nearest tenthdegree,
distances to the nearest halfinch.
Angle 1 ( ) Angle 2
( ) 2???? ( ) ???? ( ) D (in)
Position 1 (Approximately 10 ft)
Trial 1
Trial 2
Trial 3
Position 2 (Approximately 20 ft)
Trial 1
Trial 2
Trial 3
Position 3 (Approximately 30 ft)
Trial 1
Trial 2
Trial 3

2. [4 pts] In our experiment, we used a baseline of 20 inches. What would happen if the
vantage points were farther apart? For example, how would our measured parallaxes
change if we used a baseline of 100 inches instead?
(Note that there is no wrong answer to this question. The point is to take a guess, and then
to verify or to disprove it.)
3. [5 pts] Repeat the experiment with the object at Position 3, but this time use a baseline
distance of 40 inches by shifting your PMD 20 inches to the right after selecting your
landmark on the left upright post. Record the data for the increased baseline below
Angle 1 ( ) Angle 2 ( ) 2???? ( ) ???? ( )
Baseline of 40 in. at
Position 3
4. [3 pts] For an object at a fixed distance, how does observed parallax change as the
baseline increases?
5. [3 pts] Calculate the distance of the object at Position 3 using the equation below.
???? = 20 in
tan (????)
How does the distance compare to the distance you calculated for your three trials at
position 3?

6. [2 pts] Which remote distance calculations do you trust more the ones made with the
smaller or larger baseline distance? Why?
7. [10 pts total] In this question, you are going to analyze your distance and measured
parallax data to confirm the relationship between distance and parallax.
a. [1 pts] Calculate the average parallax your group measured for each of the three
object positions (~10 ft, 20 ft, and 30 ft)
Position 1 Average:
Position 2 Average:
Position 3 Average:
b. [4 pts] In a Google Spreadsheet, make a plot of Parallax vs. Distance using your
direct measurements of distance (Table 1) for the xaxis (the independent variable)
and your average measured parallax for the three positions on the yaxis.
Share this spreadsheet with your instructor.
c. [1 pt] Fit a powerseries to your data and display the equation. Since you put your
average parallax values on the uaxis, use p for your variable name instead of y.
Since you put the directly measured distances on the xaxis, use D instead of x.
Write your equation here
d. [4 pts] In your own works, describe the relationship between distance and parallax.
That is, how does the parallax change as the distance changes.

8. [3 pts] Estimate the uncertainty in your measurement of the object’s apparent shift (your
measured values for 2????). For example, do you think your recorded measurements could be
off by ten degrees? One degree? One tenth of a degree?
What is your reasoning for your uncertainty estimate?
9. [3 pts] Based on your estimate of the uncertainty in the angular measurements of 2????,
estimate the uncertainty in your measurements of the object distances. For example, do
you think the distances are different from the directly measured distances by 1 inch, 1 foot,
several feet, etc.?
What is your reasoning for your distance uncertainty measurement? Your answer should
reference your answer to Question 8.
(Note that there is no wrong answer to this question. The point is to take a guess, and then
to verify or to disprove it.)
10. [3 pts] Calculate the average distances determined using parallax using your three trials
for Position 1, Position 2, and Position 3
Position 1 Average:
Position 2 Average:
Position 3 Average:

11. [5 pts] Calculate the absolute error of your distances determined using parallax compared
to the directly measured distance. Use your average distances from your parallax
measurements for the “Parallax Distance.” The vertical bars in the equation indicate
absolute value. That means ignore the negative sign if you get a negative number.
???????????????????????????????? ???????????????????? (%) = 100 :???????????????????????????????? ???????????????????????????????? ???????????????????????????????? ????????????????????????????????
???????????????????????????????? ???????????????????????????????? :
Absolute Error for Position 1:
Absolute Error for Position 2:
Absolute Error for Position 3:
12. [3 pts] For which measurement was your error the greatest? Do you think there is a reason
why this measurement had the greatest error?
13. [6 pts] Compare the distances that you calculated for each position using the parallax
method to the distances that you measured directly at the beginning of the experiment.
How well did the parallax technique work? Justify your answer using your absolute errors
calculated in Question 11.

14. [5 pts] Now that we have some understanding of the accuracy and precision of
determining distances using parallax, let’s see how this works for real parallax data for a
star.
Here you will use Equation 3, ???? = !
, where the distance D is in parsec and parallax p is in
arcsec.
The star Canopus has a measured parallax of ???? = 0.01055 ± 0.00056 arcsec. The
0.01055 arcsec is the best estimate for the parallax measurement. The ± 0.00056 arcsec
(plus and minus 0.00056 arcsec) is the 1sigma (1 standard deviation) uncertainty in the
parallax measurement. Recall that in science, we can never measure something exactly.
We always list our best estimate and the wiggle room.
a. [2 pts] What is our best estimate for the distance, in parsec, to Canopus?
b. [1 pt] Using the minus part of the uncertainty (i.e., 0.01055 0.00056 arcsec),
what is the distance to Canopus?
c. [1 pt] Using the plus part of the uncertainty (i.e., 0.01055 + 0.00056 arcsec),
what is the distance to Canopus?
d. [ 1 pt] Estimate the uncertainty in the distance to Canopus.
15. [5 pts] Relate the parallax experiment you did in today’s lab to the way that parallax is
used by astronomers to measure the distances to nearby stars. Your answer should include
what your two vantage points represented and how you measured the parallax angle
corresponds to what astronomers observe to determine the parallax of a star.

healthcare:epidemiology

After watching the movie in the attached link, write a reflection on the movie. Font size 12, Double space, at least 500 words.Movie Link

Mention the following Epidemiological applications in your paper:

1. Uses of epidemiology for health services and disease etiology

2. Relate epidemiologic methods to specific clinical applications

3. Explain how descriptive epidemiology contribution to the public health issue in the movie

4. Relate to the specifics in data collection methods, comment on sample size

5. Develop a rationale for data access, limitations in investigation, given issues related to privacy and confidentiality

public policy

Question Part (50 points)
1. (30 points) Consider the following relations, where the primary keys are underlined.
Student (sid, sname, age, mentor_sid)
Enroll (sid, cid)
Course (cid, cname, semseter)
Let S be Student, let E be Enroll, and let C be Course. Enroll.sid refers to Student.sid, Enroll.cid
refers to Course.cid, and Student.mentor_sid refers to Student.sid.
Write the relational algebra for the following queries.
1) (2 points) Retrieve the names of students who have enrolled in the ‘Database’ course.
2) (4 points) Retrieve the names of sutdents who is older than her/his mentor.
3) (4 points) Retrieve the names of student who enrolled in both ‘Database’ and ‘DataMining’
courses.
4) (4 points) Retrieve the names of student who never enrolled in the ‘Database’ course.
5) (4 points) Retrieve the names of student who enrolled the ‘Database’ more than once.
6) (4 points) Retrieve the names of courses enrolled by all students whose age is gretater than 30.
7) (4 points) (Do not use the aggregation function) Retrieve the names of the oldest students.
8) (4 points) (Do not use the aggregation function) Retrieve the names of the oldest students who
enrolled in ‘Database’ course.

2. (10 points) Consider the following B+ index (Use 2-3 split rule).
a) (5 points) Show the B+ tree that would result from inserting a data entry with key 85.
b) (5 points) Given the result of (a), show the B+ tree that would result from deleting a data
entry with key 1.
3. (10 points) Consider the following extendable hashing index.
a) (3 points) Show the index that would result from inserting a data entry with key 17.
b) (3 points) Given the result of (a), show the index that would result from inserting a data entry
with key 21.
4. (5 points) Consider the following schedules.
S: W1(X);R3(Y);R2(Y);W2(X);R2(X);R1(Y);R1(Z);R2(X);R2(X);W3(Z);W2(Z);C3;C2;C1
Draw the precedence graph for the schedule. Is the schedule conflict-serializable?
Is the schedule recoverable?
5. (5 points) Consider the following schedule.
S1: R2(X);W3(Y);R1(X);W2(Z);R2(Y);W2(Y);W1(Y);R1(Z);W3(Z);C1;C2;C3
Assume that Strict 2PL is applied to the schedules. Draw both timetables (including shared and
exclusive locks and unlock actions) and wait-for-graph. Does the schedule has a deadlock?

Lab Part 01 (35 points)
Preliminary
Login into Linux machine (oraclelinux.eng.fau.edu)
Connect to the database (e.g., sqlplus username/password)
ALTER SESSION SET CURRENT_SCHEMA = COP6731;
Please note that the schema name is defined as upper case characters.
Execute the following SQL and identify all required tables.
o SELECT table_name from all_tables where owner = ‘COP6731’;
Please note that the owner’s name is defined as upper case characters.
Change line size and page size:
o SET LINESIZE 400
o SET PAGESIZE 0
Use the “spool” command to create a log file for the output of SQL (e.g., SPOOL filename and SPOOL OFF)
Note: Submit both answers and SPOOL files (i.e., an explanation and a SPOOL file).
Consider the following relational schema.
Execute the following SQL and review the primary keys
SELECT cols.table_name || ‘, ‘ || cols.column_name || ‘, ‘ || cons.owner
FROM all_constraints cons, all_cons_columns cols
WHERE cons.constraint_type = ‘P’ AND cons.constraint_name = cols.constraint_name
AND cons.owner = ‘COP6731’
ORDER BY cols.table_name, cols.position;
Execute the following SQL and review the indexed keys.
SELECT table_name||’, ‘||index_name||’, ‘||column_name||’, ‘||column_position
FROM all_ind_columns
WHERE table_owner =’COP6731′
ORDER BY index_name, column_position;
Execute the following SQL and review the index structure.
SELECT index_name || ‘, ‘ || index_type || ‘, ‘ || blevel || ‘, ‘ || leaf_blocks || ‘, ‘ || table_name || ‘, ‘ ||
avg_leaf_blocks_per_key || ‘, ‘ || avg_data_blocks_per_key || ‘, ‘ || clustering_factor || ‘, ‘ || distinct_keys
FROM all_indexes
WHERE table_owner=’COP6731′
ORDER BY index_name;

Query Evaluation
Use the Spool command to log the output of SQL (e.g., SPOOL filename and SPOOL OFF)
There are two files you should submit: 1) explanation for query execution plans and 2) recorded spool file.
1. (5 points) Execute the following two SQLs and explain which access method is used in each query. Explain
why one outperforms another.
SELECT /*+ GATHER_PLAN_STATISTICS */ P.cid, P.eid
FROM Purchase P
WHERE P.cid = 100;
SELECT * FROM TABLE (DBMS_XPLAN.display_cursor (format=>’ALLSTATS LAST’));
SELECT /*+ GATHER_PLAN_STATISTICS */ P.cid, P.eid
FROM Purchase P
WHERE P.eid = 100;
SELECT * FROM TABLE (DBMS_XPLAN.display_cursor (format=>’ALLSTATS LAST’));
2. (5 points) Execute the following two SQLs and explain which access method is used in each query. Explain
why one outperforms another.
SELECT /*+ GATHER_PLAN_STATISTICS */ I.no
FROM Item I
WHERE I.pid = 100;
SELECT * FROM TABLE (DBMS_XPLAN.display_cursor (format=>’ALLSTATS LAST’));
SELECT /*+ GATHER_PLAN_STATISTICS */ I.sid
FROM Item I
WHERE I.pid = 100;
SELECT * FROM TABLE (DBMS_XPLAN.display_cursor (format=>’ALLSTATS LAST’));
3. (5 points) Execute the following two SQLs and explain which access method is used in each query. Explain
why one outperforms another.
SELECT /*+ GATHER_PLAN_STATISTICS */ C.fname
FROM Customer C
WHERE C.fname like ‘Rom%’;
SELECT * FROM TABLE (DBMS_XPLAN.display_cursor (format=>’ALLSTATS LAST’));
SELECT /*+ GATHER_PLAN_STATISTICS */ C.fname
FROM Customer C
WHERE C.fname like ‘%ana’;
SELECT * FROM TABLE (DBMS_XPLAN.display_cursor (format=>’ALLSTATS LAST’));
4. (10 points) Execute the following SQL and draw the query tree for the SQL. Describe what kinds of access
methods are used for each table. Explain which join method is used in each join operation.
SELECT /*+ GATHER_PLAN_STATISTICS */ C.lname, S.address, Pr.name
FROM Customer C, Purchase Pu, Item I, Store S, Product Pr
WHERE C.id = Pu.cid AND Pu.pid = I.pid AND Pu.ino = I.no AND I.sid = S.id AND I.pid = Pr.id
AND C.fname = ‘Tesla’;
SELECT * FROM TABLE (DBMS_XPLAN.display_cursor (format=>’ALLSTATS LAST’));
5. (10 points) Execute the following SQL and draw the query tree for the SQL. Describe what kinds of access
methods are used for each table. Explain which join method is used in each join operation.

SELECT /*+ GATHER_PLAN_STATISTICS */ C.fname, S.address, Pr.name
FROM Customer C, Purchase Pu, Item I, Store S, Product Pr
WHERE C.id = Pu.cid AND Pu.pid = I.pid AND Pu.ino = I.no AND I.sid = S.id AND I.pid = Pr.id
AND Pr.name LIKE ‘Blueberries%’;
SELECT * FROM TABLE (DBMS_XPLAN.display_cursor (format=>’ALLSTATS LAST’));
Lab Part 02 (15 points)
Preliminary
Open two terminals (e.g., putty or XShell) and login Oracle database
Assume that each terminal represents each user (i.e., User1 and User2).
Create the student table using the following query.
CREATE TABLE student ( zno integer, name varchar2(20), grade integer, primary key (zno) );
Execute SET AUTOCOMMIT OFF. This command suppresses automatic committing so that you
must manually commit changes (Note that # represents the order of the SQL execution).
# User 1 User 2
1 SET AUTOCOMMIT OFF
2 SET AUTOCOMMIT OFF
TURN ON the spool.
# User 1 User 2
1 SPOOL user1.log
2 SPOOL user2.log
Execute the SQLs in each question and answer the question.
Save the spool files and submit both answers and spool files.
# User 1 User 2
1 SPOOL OFF
2 SPOOL OFF

Transaction Processing and Recovery
1. (5 points) What are the results at STEPs 3,5,6, and 9? Explain why this result makes sense or why it does not make
sense?
# User 1 User 2
1 DELETE FROM student;
2 COMMIT;
3 SELECT count (*)
FROM student;
4 INSERT INTO student (zno, name, grade)
VALUES (1, ‘James’, 20);
5 SELECT count (*)
FROM student;
6 SELECT count (*)
FROM student;
7 COMMIT;
8 COMMIT;
9 SELECT count (*)
FROM student;
2. (5 points) What are the results of STEPs 7 and 10? Explain why this result makes sense or why it does not make sense?
# User 1 User 2
1 DELETE FROM student;
2 INSERT INTO student (zno, name, grade)
VALUES (1, ‘James’, 20);
3 INSERT INTO student (zno, name, grade)
VALUES (2, ‘Susan’, 30);
4 COMMIT;
5 UPDATE student
SET grade = (SELECT max(grade) + 1 FROM student);
6 UPDATE student
SET grade = (SELECT min(grade) + 1 FROM student);
7 SELECT zno, grade
FROM student;
8 COMMIT;
9 COMMIT;
10 SELECT zno, grade
FROM student;
3. (5 points) What is the effect of Step 8? What is the result of STEP 11? Explain why this result makes sense or why it
does not make sense?
# User 1 User 2
1 DELETE FROM student;
2 INSERT INTO student (zno, name, grade)
VALUES (1, ‘James’, 20);
3 INSERT INTO student (zno, name, grade)
VALUES (2, ‘Susan’, 30);
4 COMMIT;
5
UPDATE student
SET grade = (SELECT max(grade) + 1 FROM student)
WHERE zno = 1;
6
UPDATE student
SET grade = (SELECT min(grade) -1 FROM student)
WHERE zno = 2;
UPDATE student
SET grade = (SELECT max(grade) + 1 FROM student)
WHERE zno = 2;
8
UPDATE student
SET grade = (SELECT min(grade) -1 FROM student)
WHERE zno = 1;
9 COMMIT;
10 COMMIT;
11 SELECT zno, grade
FROM student;

Powered by WordPress