Starting from:

$30

DBS211- Lab 01 Solved

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.

LAB 01 - SUBMISSION
Explore the Database
Answer the following questions in the SQL Developer Worksheet area.  Use comment blocks for answers that are not running code.

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 customer ORDER BY ContactLastName;

10)  How many constraints does the products table have?



11)  Find a way to turn on line numbers in the gutter.



12)  Set the font size in the worksheet editor to a size that is best for you.  (Hint: Tools/Preferences)

 

 

More products