100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

INF3707 Assignment 3 (ANSWERS) 2024 - DISTINCTION GUARANTEED

Rating
4.0
(1)
Sold
1
Pages
7
Grade
A+
Uploaded on
01-08-2024
Written in
2024/2025

Well-structured INF3707 Assignment 3 (ANSWERS) 2024 - DISTINCTION GUARANTEED. (DETAILED ANSWERS - DISTINCTION GUARANTEED!)..... 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). 2.2 As a salesperson, John has full responsibility for the CUSTOMERS table of the JUSTLee Books and need to have object privileges to perform any activity on the customers table. John needs to have the right to grand the privileges to other users. (2 marks) Question 3 Chapter 8 To do the following questions, refer to tables created in the JLDB_B script at the beginning of the chapter. Give SQL statements for the following requests. 3.1 Which customers live in Georgia or New Jersey? Put the results in ascending order by last name. List each customer’s customer number, last name and state. (3 marks) 3.2 List authors whose last name contains the letter pattern “IN”. Put the results in order of last name, then first name. List each author’s last name and first name. (2 marks) Question 4 Chapter 9 (10 marks) Refer to tables in the JustLeee Books database. 4.1 Produce a list of all customers who live in the state of Florida and have ordered books about computers. (5 marks) 4.2 Determine which books customer Jake Lucas purchased. Perform the search using the customer name, not the customer number. If he has purchased multiple copies of the same book, duplicate the results. Generate the report using the (JOIN…USING) keywords. (5 marks) Question 5: Chapter 10 5.1 Determine the total profit generated by the book purchased on order 1002. Display the book title and profit. The profit should be formatted to display a dollar sign and two decimal places. Consider that the customer might not pay the full retail price and each item ordered can involve multiple copies. (3 marks) 5.2 Display a list of all book titles and percentage of mark-up for each book. The percentage of mark-up should be displayed as a whole number (that is, multiplied by 100) with no decimal position, followed by a percent sign (for example, 0.2793 = 28%). The percentage of mark-up should reflect the difference between the retail and cost amounts as a percent of the cost. (2 marks) Question 6 Chapter 11: Group functions List the customers living in Georgia or Florida who have recently placed an order totaling more than $80. (5 marks) Question 7: Chapter 12 Subqueries 7.1 Determine which customers placed orders for the least expensive book (in retails of regular retail price) carried by the JustLee Books. (5 marks) 7.2 Determine the number of different customers who have placed an order for books written or co-authored by James Austin. (5 marks) Question 8: Chapter 13 8.1 Create a view that lists the name and phone number of the contact person at each publisher. Do not include the publisher’s ID in the view. Name the view Contact. (2 marks) 8.2 Change the Contact view so that no user can accidentally perform DML operations on the view. (3 marks) Question 9 - Apply all what you know to answer the questions This question refers to Annexure A, the JustLee Books database. Learning form the E.R diagram and the contents of the BOOKS table, the contents of the Category column are the actual names for each category of books. This structure presents a problem if one user enters COMPUTER for the Computer category and another user enters COMPUTERS. To avoid this and other problems that might occur, the database designers have decided to create a CATEGORY table containing a code (CATCODE) and description (CATDESC) for each category. The structure for CATEGORY table should be as follows: Table name: CATEGORY Column Name Datatype Width CATCODE VARCHAR2 3 CATDESC VARCHAR2 11 Here are some data entries for the CATEGORY table: CATCODE CATDESC BUS BUSINESS CHN CHILDREN COK COOKING COM COMPUTER 9.1 Create the CATEGORY table. (3 marks). 9.2 The table that you have created does not have a primary key, make the column CATCODE the primary key of the table. (3 marks) 9.3 The CATDESC column can accept null values, add a constraint to ensure that it does not allow null values. (2 marks) 9.4 Modify the CATDESC column from the current width of 11 characters to 20 characters. (2 marks) 9.5 Populate the Category table with the given data. Save the changes permanently. (8 marks) 9.6 Add a column to the BOOKS table called Catcode. Add a FOREIGN KEY constraint that requires all category codes entered in the BOOKS table to already exist in the CATEGORY table. (5 marks) 9.7 Delete the Category column from the BOOKS table. (2 marks)

Show more Read less
Institution
Course








Whoops! We can’t load your doc right now. Try again or contact support.

Connected book

Written for

Institution
Course

Document information

Uploaded on
August 1, 2024
Number of pages
7
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

INF3707
Assignment 3 2024
Unique Number:
Due Date: 2 August 2024

QUESTION 1

1.1.

CREATE SEQUENCE Customers_seq
INCREMENT BY 1
START WITH 1021
NOMAXVALUE
NOMINVALUE
NOCYCLE
NOCACHE;


DISCLAIMER & TERMS OF USE
1. Educational Aid: These study notes are designed to serve as educational aids and should not be considered as a
substitute for individual research, critical thinking, or professional guidance. Students are encouraged to
conduct their own extensive research and consult with their instructors or academic advisors for specific
assignment requirements.
2. Personal Responsibility: While every effort has been made to ensure the accuracy and reliability of the
information provided in these study notes, the seller cannot guarantee the completeness or correctness of all
the content. It is the responsibility of the buyer to verify the accuracy of the information and use their own
judgment when applying it to their assignments.
3. Academic Integrity: It is crucial for students to uphold academic integrity and adhere to their institution's
policies and guidelines regarding plagiarism, citation, and referencing. These study notes should be used as a
tool for learning and inspiration, but any direct reproduction of the content without proper acknowledgment and
citation may constitute academic misconduct.
4. Limited Liability: The seller of these study notes shall not be held liable for any direct or indirect damages,
losses, or consequences arising from the use of the notes. This includes, but is not limited to, poor grades,
academic penalties, or any other negative outcomes resulting from the application or misuse of the information
provided. ]

Reviews from verified buyers

Showing all reviews
1 year ago

4.0

1 reviews

5
0
4
1
3
0
2
0
1
0
Trustworthy reviews on Stuvia

All reviews are made by real Stuvia users after verified purchases.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Edge
Follow You need to be logged in order to follow users or courses
Sold
9680
Member since
2 year
Number of followers
4252
Documents
2671
Last sold
7 hours ago

4.2

1176 reviews

5
663
4
236
3
177
2
27
1
73

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions