INF3707 Assignment 3 (COMPLETE ANSWERS) 2024 (620712) - DUE 2 August 2024 ; 100% TRUSTED Complete, trusted solutions and explanations. Ensure your success with us...
INF3707 Assignment 3 (COMPLETE ANSWERS) 2024 (620712) - DUE 2 August 2024 ; 100% TRUSTED Complete, trusted solutions and explanations. Ensure your success with us...
INF3707 Assignment 3 (COMPLETE ANSWERS) 2024 (620712) - DUE 2 August 2024
All for this textbook (9)
Written for
University of South Africa
INF3707
All documents for this subject (6)
Seller
Follow
THEBLAZE1
Reviews received
Content preview
I
,NF3707 Assignment 3 (COMPLETE ANSWERS) 20
24 (620712) - DUE 2 August 2024 ; 100% T
RUSTED Comple
Question 1: Chapter 6 To perform the following assignments,
refer to the tables in the JustLee books database. 1.1 Create a
sequence for populating the Custeomer# column of the
CUSTOMERS table. When setting the start and the increment
values, beer in mind that data already exist in the table. Hence,
you need to know the last customer number stored in the
database. The options should be set not to cycle the values and
not to cache any values. No minimum or maximum values
should be declared. (2 marks) 1.2 Add a new customer row by
using the sequence created in Question 1.1. the only data
currently available for the customer is as follows: last name =
Shoulders, first_name = Frank, and zip = 23567. (3 marks)
Question 2 Chapter 7 JustLee Books has recently hired a
temporary salesman. The name of the new employee is John.
The login credential for John should expire at the end of his
contract. As a salesperson, John should be granted some object
privileges on the JustLee Books database. 2.1 create the user
John with a password that expire with the role of sales_person
(3 marks).
Question 1
1.1 Create a sequence for populating the Customer# column of
the CUSTOMERS table.
, To create a sequence for the Customer# column in the
CUSTOMERS table:
sql
Copy code
CREATE SEQUENCE customer_seq
START WITH (SELECT MAX(Customer#) + 1 FROM CUSTOMERS)
INCREMENT BY 1
NOCYCLE
NOCACHE;
Explanation:
START WITH (SELECT MAX(Customer#) + 1 FROM
CUSTOMERS): Sets the starting value of the sequence to
the next number after the highest existing Customer#.
INCREMENT BY 1: Specifies that the sequence should
increment by 1.
NOCYCLE: Ensures that the sequence does not cycle when
reaching its maximum or minimum value.
NOCACHE: Specifies that no pre-allocated sequence
numbers are cached in memory.
1.2 Add a new customer row using the sequence created in
Question 1.1.
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller THEBLAZE1. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $2.57. You're not tied to anything after your purchase.