1) Because of budget issues, the HR department needs a report that displays the last
name and salary of employees who earn more than $12,000.
2) Open a new SQL Worksheet. Create a report that displays the last name and
department number for employee numbe
Find out least 5 earners of the company.
Find out emps whose salaries greater than salaries of their managers.
List the managers who are not working under the president.
List the records from emp whose deptno isnot in dept.
List the N
A. Weekly Lecture
1. Review: Create/Alter Tables
2. Review: Add/Remove Constraints
3. Practice: Views
B. Drill Practice:
Create your own EMP and DEPT by using CREATE TABLE EMP AS syntax.
Add PK on both tables and FK as
If you already have a table and if you want to get some rows from that table, you can
just copy those rows from there. It includes where clause.
You should not use VALUES clause.
Total numbers of columns should be same as the columns you wan
CHARACTER OR TEXT FUNCTIONS:
Character or text functions are used to manipulate text strings. They accept strings or
characters as input and can return both character and number values as output.
Few of the character or text functions are as
Launch and Use Oracle Tools
1. Connect to your Oracle database.
2. Simple SQL Commands.
1.Download and install putty.exe.
2.Connect to npusl8.npu.edu
Note: Enter Host Name: npusl8.npu.edu
Click on open button.
Login with your userI
Constraints help maintain data integrity, prevent invalid data
entry into tables.
Constraints are enforced at the table/column level. Whenever
a row is inserted/updated/deleted, it has to satisfy the
constraints of the table in or
Sequences - Lab 14
1. Create table DEPARTMENT12 that includes columns dept_id and dept_name.
2. Create a table EMPLOYEE12 that includes the columns employee_id, firstName
,middleName, lastName, and social security number .
Modify the EMPLOYEE12 table t
CS457(Z)_HW11_17946_Ranjith Reddy Venna
An SQL JOIN clause is used to combine rows from two or more tables, based on a common field between
The most common type of join is: SQL INNER JOIN (simple join). An SQL INNER JOIN return all
Design a class named Rectangle to represent a rectangle. The class contains:
Two double data fields named width and height that specify the width and height
rectangle. The default values are 1 for both width and height.
1. Design a class named Person and its two subclasses named Student and Employee.
a. A Person has a Name, Address and phone Number.
b. A Student has an id and major.
c. An Employee has a Salary
Introduction to Databases and RDBMS.
1. A Brief History of Databases
2. Discuss the theoretical and physical aspects of a relational database.
1. A little set theory
2. Relational Algebra
3. Describe how SQL is used in RDBMS
Chapter 11 Inheritance and
Suppose you will define classes to model circles,
rectangles, and triangles. These classes have
many common features. What is the best way to
design these classes so to avoid redundancy? The
CS457 Lab Session #4
1. CHARACTER OR TEXT FUNCTIONS:
Character or text functions are used to manipulate text strings. They accept
strings or characters as input and can return both character and number values
Few of the character or text functi