Question

In: Computer Science

answer the following question for oracle developer: 1- ____ is the category of SQL commands to...

answer the following question for oracle developer:

1- ____ is the category of SQL commands to create, alter or drop SQL objects (create a table, drop a view)

2-____ handles access to objects. The DBA might grant select on Customers to Bob. This will allow user Bob to read the Customers table.

3- Run this query in SQL Developer:

Select sysdate
from dual
What is sysdate? What is dual?

4-What is a surrogate key? How are surrogate keys implemented in Oracle?

5-Which are DML commands?

6- Rules for a table: choose what is best

a- Name should not contain spaces

b- Name must start with an alpha character

c-Must be unique in the schema

d-Must contain a Primary Key

e-Must be unique in the database

f-Must contain at least one column

g-Primary Key must be first column in the database

7- What is First Normal Form (1NF)? What condition would violate 1NF?

8- ____ are SQL commands used to handle data in tables. Typical commands are Select, Update, Insert, Delete and Merge

9-Which are valid DDL commands?

10-A table has two (or more) columns that make up the Primary Key. This is called a(n) ____ key.

11-A column that's nchar(5) takes up ____ bytes of data.

12- Maximum number of columns for an Oracle table is ____ columns

13-Define: null. What is null? What does it mean? How are nulls treated?

14-

Run the following query in SQL Developer:

select to_char(sysdate + 2,'mm/dd hh24:mm')
from dual

What is returned?

Change the query to return the last day of the month (if sysdate is 2/14/2017, return 2/28/2017).

15- One-to-one relationships between two tables in a database are rare. Why? Give me a scenario where 1:1 relationship would be implemented?

Solutions

Expert Solution

Answer of the above questions are as follows -

Que 1)   ____ is the category of SQL commands to create, alter or drop SQL objects (create a table, drop a view)

Answer : Data Definition Language (DDL)

Que 2) ____ handles access to objects. The DBA might grant select on Customers to Bob. This will allow user Bob to read the Customers table.

Answer : SQL GRANT

Que 3)  Run this query in SQL Developer:
Select sysdate
from dual
What is sysdate? What is dual?

Answer : sysdate returns the current date and time set for the operating system on which the database is present. and when you want to use a SQL function and you have no table, you have to use dual which is a special one-row and one-column named dummy table.

Que 4) What is a surrogate key? How are surrogate keys implemented in Oracle?

Answer : surrogate key is used to apply uniform rules to all records of table. This key is any column or set of columns that can be declared as the primary key . This key don't have business meaning, Surrogate keys can also include the current system date/time stamp, or a random alphanumeric string.

Que 5) Which are DML commands?

Answer : DML means Data Manipulation Language . DML is used to  manipulate data itself.  most common DML SQL statements such SELECT, INSERT, UPDATE, DELETE etc, and it is used to store, modify, retrieve, delete and update data in database.


Related Solutions

Q1)Write the syntax SQL DCL “GRANT” and and REVOKE Commands? Q2 ) Write SQL DCL Commands?...
Q1)Write the syntax SQL DCL “GRANT” and and REVOKE Commands? Q2 ) Write SQL DCL Commands? i. To give the user Ahmad permission to view and modify records in the table Employee. ii. To revoke the permission to view and modify the records in the table Employee.
Using SQL Developer Question 1 Create a block to retrieve and display pledge and payment information...
Using SQL Developer Question 1 Create a block to retrieve and display pledge and payment information for a specific donor. For each pledge payment from the donor, display the pledge ID, pledge amount, number of monthly payments, payment date, and payment amount. The list should be sorted by pledge ID and then by payment date. For the first payment made for each pledge, display “first payment” on that output row. Question 2 Redo question 1, but use a different cursor...
Please implement this in Oracle sql 2.) Write a SELECT statement that answers this question: What...
Please implement this in Oracle sql 2.) Write a SELECT statement that answers this question: What is the total amount ordered for each product? Return these columns: The product name from the Products table The total amount for each product in the Order_Items (Hint: You can calculate the total amount by subtracting the discount amount from the item price and then multiplying it by the quantity) Use the ROLLUP operator to include a row that gives the grand total.
Which of the following is a database client software? Microsoft SQL Server 2017 Developer Microsoft SQL...
Which of the following is a database client software? Microsoft SQL Server 2017 Developer Microsoft SQL Server Management Studio Microsoft SQL Server Configuration Manager SQL Server Analysis Service Compared to Data Warehousing approach, the following are disadvantages of query-driven data integration approach, EXCEPT: __________. competition with local processing at source delay in query processing waste of storage space inefficient and potentially expensive for frequent queries What does OLAP stand for? Olympic Linear Algebra Problem On-Line Amazon Platform On-Line Analytical Processing...
Question 1: Group by and Aggregates: Write SQL statements to answer the following questions using Assignment...
Question 1: Group by and Aggregates: Write SQL statements to answer the following questions using Assignment 4’s schema (Customer-Invoice-Line-Product-Vendor). Make sure that your SQL script runs without any errors. Submit your answers in a .SQL file. 1 (2 Points) - Find the count of distinctvendors thatsupplied products that are priced lowerthan 185? 2 (2 Points) - For each vendor, find their product that has the lowest product quantity. Your output should include vendor code, vendor name, product description and product...
Use the following information to create SQL commands to retrieve data from Henry Books database :...
Use the following information to create SQL commands to retrieve data from Henry Books database : For each book, list the book code, book title, publisher code, and publisher name. Order the results by publisher name. For each book published by Plume, list the book code, book title, and price. List the book title, book code, and price of each book published by Plume that has a book price of at least $14. List the book code, book title, and...
Developer User Account Create a user account using T-SQL for developers named DEVELOPER with the password...
Developer User Account Create a user account using T-SQL for developers named DEVELOPER with the password TESTACCOUNT that grants the user the ability to: Select and modify any table. Connect to and have access to all resources. In SSMS
(Please answer this question accuratelly THANKS) The following commands in R computes 5000 simulations of sample...
(Please answer this question accuratelly THANKS) The following commands in R computes 5000 simulations of sample means of size 12 from a normal distribution with mean µ = 100 and standard deviation σ = 14. require (fastR2) nsamplesum <- do(5000) * c(sample.mean=mean(rnorm(12,100,14))) The following commands compute the approximate mean and standard deviation of the sample mean and plot the histogram giving the approximate distribution of the sample mean. mean(∼ sample.mean, data=nsamplesum) sd(∼ sample.mean, data=nsamplesum) gf dhistogram(∼ sample.mean, data= nsamplesum, bins=20)...
Write the SQL DDL to create the following 5 tables for an App store: Publisher, Category,...
Write the SQL DDL to create the following 5 tables for an App store: Publisher, Category, App, AppVersion, AppVersionReview: A Publisher table where each publisher is identified by an integer id and has a name (up to 40 characters). (1 mark) A Category table where each category has an id (integer), a name (up to 50 characters), and a parentId to identify its parent category. The parentId should be a foreign key to the Category table. (1.5 marks) An App...
USE ORACLE - SQL List the name and salary of employees who work for division 3....
USE ORACLE - SQL List the name and salary of employees who work for division 3. List the name of project whose budget is between 5000-7000 List the total number of employee whose initial of name is 's'. (hint, using LIKE operator and wildcard character) List the total number of employee whose initial of name is NOT 's' for each division, including division ID List the total project budget for each division, including division ID. List the ID of the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT