$24.99
Lab 01
Objectives:
The purpose of the first lab of DBS211 is to familiarize yourself with the User Interface, SQL Developer, that we will be using throughout the course to communicate with the Oracle server. By the end of this lab you should be able to:
• Successfully establish a connection with and login to the Oracle database server using SQL Developer
• Run the sample database creation script
• Navigate SQL Developer to view the tables created, their structure and the data contained within them.
Preface:
If you have not already done so, you will need to download the sample database creation script from blackboard and run it. These instructions are included in the W01 - Getting Started with SQL Developer document.
SUBMISSION
Answer the following questions in the SQL Developer Worksheet area saving the file as “DBS211_Lab01_<yourlastname>.sql” where you put your actual last name in the file name.
Save the file as Submit ONLY the .sql file you saved to Blackboard.
Tasks – Explore the Database and the Development Environment
In the connections window, expand Tables.
1) How many tables have been created? List the names of the created tables.
2) Click on table customers. Click on the Data tab near the top of the worksheet. How many rows are there in the table customers?
3) What SQL statement would return the same results. Write the statement in the .sql file and execute it.
You will learn how to select rows and columns from a table by writing SQL select statements later in this course.
4) How many columns does the customers table have? List the column names.
5) What is the value of each column in the first row in table customers? Write the column name and the column data type in addition to the value.
6) Write the number of rows and columns for the rest of the tables in your schema. Format it something like the following.
Table Name Rows Columns
__________ _____ _______
__________ _____ _______
7) Right Click on the orderdetails table and choose tables/count rows. How many rows does the order details table include?
8) Write the following SQL statement in the new tab.
desc offices;
You can also write
describe offices;
What is the result of the statement execution?
9) Type the following statements in, execute them, then briefly describe what the statement is doing!
SELECT * FROM employees;
SELECT * FROM customers ORDER BY ContactLastName;
10) How many constraints does the products table have?
11) Find a way to turn on line numbers in the gutter. Where is the gutter? Describe its location in your solution file.
12) Set the font size in the worksheet editor to a size that is best for you. (Hint: Tools/Preferences)