Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

INF3707 EXAM PACK 2022

Rating
-
Sold
-
Pages
159
Grade
A+
Uploaded on
07-11-2022
Written in
2022/2023

INF3707 EXAM PACK 2022.INF3707 - Database Design And Implementation Which Oracle Database management system is prescribed for this module? (2 marks) 1.2 How do you login as the system administrator on the Oracle SQL*plus interface? Provide the code. (2 marks) 1.3 After you have successfully installed Oracle database, how do you open the pluggable databases so that they can automatically open? (4 marks) 1.4 By default, Oracle pluggable databases remain closed and must be opened manually or set to automatically open. Which Oracle 18c XE service must you configure to do that? (2 marks) Question 2 40 marks Assume that a table named MyTable exist in your database. MyTable has five columns Col#, Col1, Col2, Col3 and Col4. NAME NULL TYPE -------- ------ --------- Col# NOT NULL Number Primary key Col1 NOT NULL VARCHAR2(2) Col2 NOT NULL VARCHAR2(10) Col3 NOT NULL VARCHAR2(10) Col4 NOT NULL VARCHAR2(10) 2.1 Write an SQL statement that enables you to view the structure of MyTable. (2 marks) 2.2 Write an SQL statement that allows you to see the data contained in all the columns of MyTable. (3 marks) 2.3 MyTable contains some columns that are marked as unused. Write an SQL code that drops all the columns marked as unused. (4 marks) 2.4 All the data entered into MyTable is not correct. Write an SQL code that deletes the data from the table but leaving it intact. (3 marks) 2.5 You realised that Col1 and Col4 are too small to accommodate large variables, write an SQL code that increases the size of Col1 from 2 to 17 and Col4 from 10 to 25. (5 marks) 2.6 Insert data into three columns of MyTable, by populating Col1, Col2 and Col4 with values A, B and D in that order. Do not insert any data into Col3, store a null value. (5 marks) 2.7 If the primary key of this table was created with the following statement: Col# Number GENERATED AS IDENTITY PRIMARY KEY; What output do you expect after inserting the following data into MyTable? Explain your answer. Downloaded by: sihlengubane | Distribution of this document is illegal S - The study-notes marketplace 3 INF3720 OCT/NOV [Turn over] Insert into MyTable (Col#, Col1, Col2, Col3, Col4) value (001, ‘A’, ‘B’, ‘C’,’D’); (2 marks) 2.8 You created a sequence that generated some numbers for Col3 of MyTable. The sequence is as follows: Create sequence seq1 Increment by 10 Maxvalue 200 Cycle Nocache; After generating some numbers from the sequence a few times, you want to reinitialize the sequence so that it can reuse the numbers already generated.? Write an SQL code to achieve that. (5 marks) 2.9 Create a bitmap index on MyTable to speed up queries for searching information based on Col2. Verify that the index exists. Delete the index (11 marks) Question 3 19 marks 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. 3.1 Create the user John with a password that expire, with the role of Sales_person. (5 marks) 3.2 As a salesperson, John has full responsibility for the CUSTOMERS table of the JustLee Books. Grant John object privileges to perform any activity on the customers table and rights to grant the privileges to other users. (4 marks) 3.3 John approached you on a Monday morning and reported that he does not remember his password. Reset John’s password. (3 marks) 3.4 Write a query to view all privileges that are assigned to the Sales_person role. (4 marks) 3.5 The contract for John has expired, revoke the Sales_person privilege granted to John and remove his user account. (3 marks) Question 4 31 marks This question refers to the JustLee Books, see Annexure A for the structure of the tables 4.1 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. (10 marks) 4.2 Determine, which orders had a higher total amount due more than order 1008. Use subqueries to answer the question. (10 marks) S - The study-notes marketplace Downloaded by: sihlengubane | Distribution of this document is illegal S - The study-notes marketplace 4 INF3720 OCT/NOV 4.3 Determine the average retail price of books by publisher name and category. Include only the categories Children and Computer, and the groups with an average retail price greater than $50. Use the BOOKS and CATEGORY tables to create the query. (6 marks) 4.4 What is the retail price of the most expensive book written by Lisa White? Use the BOOKS, BOOKAUTHOR and AUTHOR tables to create the query. (5 marks) The end © UNISA S - The study-notes marketplace Downloaded by: sihlengubane | Distribution of this document is illegal S - The study-notes marketplace Question 1 1.1 Which Oracle Database management system is prescribed for this module? (2 marks) Oracle 18c XE 1.2 How do you login as the system administrator on the Oracle SQL*plus interface? Provide the code. (2 marks) Enter user-name: sys as sysdba Enter password: oraclepassword1234 1.3 After you have successfully installed Oracle database, how do you open the pluggable databases so that they can automatically open? (4 marks) SQL ALTER PLUGGABLE DATABASE ALL OPEN; SQL ALTER PLUGGABLE DATABASE ALL SAVE STATE; 1.4 By default, Oracle pluggable databases remain closed and must be opened manually or set to automatically open. Which Oracle 18c XE service must you configure to do that? (2 marks) You can start or stop the database using Windows Services: 1. From the Start menu, enter in the search field and press Enter. 2. Locate the OracleServiceXE service in the Services window. 3. Right-click the service name, and from the menu, select Start or Stop. 4. To set its startup properties, right-click and select Properties, and in the dialog box, select either Automatic, Manual, or Disabled from the Startup type list. Question 2 Assume that a table named MyTable exist in your database. MyTable has five columns Col#, Col1, Col2, Col3 and Col4. NAME NULL TYPE -------- ------ --------- Col# NOT NULL Number Primary key Col1 NOT NULL VARCHAR2(2) Col2 NOT NULL VARCHAR2(10) Col3 NOT NULL VARCHAR2(10) Col4 NOT NULL VARCHAR2(10) 2.1 Write an SQL statement that enables you to view the structure of MyTable. (2 marks) DESCRIBE MyTable; 2.2 Write an SQL statement that allows you to see the data contained in all the columns of MyTable. (3 marks) SELECT * FROM MyTable;

Show more Read less
Institution
Course








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

Written for

Institution
Course

Document information

Uploaded on
November 7, 2022
Number of pages
159
Written in
2022/2023
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$3.00
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

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.
SOLUTIONS2024 Chamberlain College Of Nursing
Follow You need to be logged in order to follow users or courses
Sold
923
Member since
3 year
Number of followers
696
Documents
5439
Last sold
2 days ago
ALPHA STUDY CENTRE.

Alpha Academy is a dedicated study centre where you will find QUALITY & RELIABLE study resources that will help you prepare, revise and pass your examinations for all majors and modules in real TIME.. Good Luck from ALPHA ACADEMY.

3.7

184 reviews

5
95
4
26
3
19
2
7
1
37

Trending documents

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