You are on page 1of 7

Assignment -1 1. 2. 3. 4. 5. What is DBMS? What is RDBMS? State the disadvantages of file processing system over DBMS.

List the different types of database product available in market. What is query? What is its need?

Assignment-2 Definitions 1. Attribute 2. Tuple 3. Relation 4. Degree 5. Cardinality 6. Candidate Key 7. Primary Key 8. Alternate Key 9. Foreign Key 10.Referential Cycle 11.Referential Path 12.Referential Diagram Define Referential Integrity Rule. Explain with reference to foreign key. Explain foreign key rules.

Assignment-3 Show the Syntax for following commands and write one or two line explanation. Create table Stud (roll varchar2 (10), name varchar2 (15), addr varchar2 (15), bdate date, Phno number (10)); Insert into stud values (It001,Ramesh,kalawad,12-jun- 1985, 99997876); Insert into stud values (&r, &n, &a, &b, &p); Retrieve all the contents of stud table Retrieve all tables created in your login Clear the screen Describe command Assignment-4 Demonstrating SELECT (with all options) & UPDATE commands Give the SQL solutions for following queries 1. 2. 3. 4. 5. Select branch names from the loan relation List all the tuples & rows from the loan relation Select branchnm& loan no. from the loan relation. Select all the loan numbers & amount from the loan relation. Find all loan no. & amount of the Perry ridge branch where the amount is Greater than 1300 6. Find out the names of all the clients. 7. Retrieve the enter content of client master table. 8. Retrieve the list of names city & state of all the clients. 9. Retrieve name, city & State of all the clients located on Mumbai. 10.List the various products available from the product master table. 11.List all the clients located in Chennai. 12.Found the names of salesman who have a salary greater than or equal to 3000. 13.Change the city of client no. C0005 to Bangalore 14.Change the salary of salesman number S0005 to 5000. 15.Change the price of trousers to 900 rupees. 16.Change the city of salesman S0001 to Pune.

Assignment-5 Understanding ORDER BY clause, DELETE, RENAME commands, Performing Arithmetic operations on column data. Give the SQL solutions for following queries 1. 2. 3. 4. 5. 6. Display list of clients in ascending order. Display all salesmen with the salary in descending order based on salary. Display all the products in ascending order. Display all the products in ascending order whose price is greater than 500. Delete all the records of client_master table Delete all Salesman data from the Salesman master whose Salaries are less than or equal to 2000. 7. Delete all products from product master where quantity is less than or equal to 50 8. Delete all clients located in Tamilnadu. 9. Delete the record of the client whose name is Evan. 10.Change the name of Salesman master to Salesman. 11.Retrieve the product number, description & compute 5% of the values given in the column price from the product master 12.Retrieve the product no,description,5% of price rename if increase & increase price by 105% call it as new price Assignment-6 Understanding BETWEEN, IN, NOT, LIKE OPERATORS, ALTER TABLE, DROP TABLE commands. 1. Retrieve product no, description price from the table product master where the profit is between 10 & 20, both inclusive. 2. Retrieve all clients with client no, city & pin code where pin code has the value 400054 or 400057. 3. Retrieve all clients who are not in Bombay or in Delhi. 4. Retrieve product no, description, profit & price from product master where profit is between 10 & 20. 5. Retrieve product no, description, profit & price from product master where profit not between 10 & 20. 6. Add new column phone no. into the client master table. 7. List the names of all clients having a as the second letter in their names. 8. List the clients who stay in a city whose First letter is a. 9. List all clients who stay in Bombay or Delhi. 10.List all clients whose baldue is greater than value 10000. 11.List the order information for clientno C0001 to C0002.

12.List products whose selling price is greater than 2000 and less than or equal to 5000. 13.List products whose selling price is more than 1500. Calculate a new selling price as, Original selling price * 15. Rename the new column in the out put of the above query as new_price. 14.List the names, city and state of clients who are not in the state of Maharashtra 15. Display the non-null values of Clients. 16. List out the products whose profit is between 2 to 4. 17.Display product no, name and quantity on hand of those products whose cost price lies in (200,500). 18.Display product no, name and quantity on hand of those products whose cost price not lies in (200,500) 19.Retrieve all information about salesman whose names begin with the letter ja from salesman_master 20.Retrieve all information about salesman where the second character of names are either r or h 21.Retrieve all information about salesman where salesman name is exactly 5 characters long. 22. Retrieve all information of clients where clients city is either Bombay or madras or Delhi or Calcutta Assignment-7 Understanding Data Constraints & its syntax Primary key Foreign key Not null Unique Check Create following tables with Constraints, Write SQL statements for the same Client_master Salesman_master Product_master Sales_order Sales_order_details

Assignment-8 Understanding Aggregate functions Min, Max, Avg, Sum, Count ( ), Group By and Having 1. Count the total number of orders 2. Calculate average price of all the products 3. Determine the maximum and minimum product price. Rename the output as max_price and min_price respectively 4. Count the number of products having price less than or equal to 1500 5. Find all products whose qty_on_hand is less than reorder level SQL queries on Group by And Having Clause 6. Print the description and total qty sold for each product. 7. Find the value of each product sold. 8. Calculate the average qty sold for each client that has a maximum order value of 15000.00 9. Find Number Of Employees Working In Each Department 10. Find All Department Where Number Of Employees Working Are More Than 4 11. Find Total Salary For Each Department 12.Find All Department Where Sum Of Salary Is Greater Than 9000 13.Find Number Of Employees With Deptno Who Are Working As Salesman. 14. Find Total Number Of Employees Job Wise 15. Find All Jobs Where More Than 3 Employees Are Working 16. Find Total Number Of Employees Working As Analysts Assignment-9 Practical on sub queries and correlated sub queries 1. 2. 3. 4. 5. Find the product no and description of products which are not being sold. List the names of clients who have placed orders worth Rs. 10000 or more. List the client names that have placed orders before the month of May02. Find out the products which have been sold to Ivan Byross. Find out the products and their quantities that will have to be delivered in the current month. 6. List the product no and description of constantly sold products. 7. Find the products and their quantities for the orders placed by Client no C00001 and C00002. 8. Find the names of clients who have purchased Trousers.

Assignment-10 STUDY various functions in Oracle Numeric Functions: ABS, POWER, ROUND, SQRT, EXP, EXRACT, GREATEST, LEAST, MOD, TRUNC, FLOOR, CEIL. String Functions: LOWER, INITCAP, UPPER, SUBSTR, ASCII, COMPOSE, DECOMPOSE, INSTR, TRANSLATE, LENGTH, LTRIM, RTRIM, TRIM, LPAD, RPAD, VSIZE. Conversion Functions: To_CHAR, TO_DATE, TO_NUMBER Date Functions: ADD_MONTHS, LAST_DAY, MONTHS_BETWEEN, NEXT_DAY, ROUND, NEW_TIME Assignment-11 1. Create view on OrderNo, OrderDate, OrderStatus of the Sales_Order table and ProductNo, ProductRate and QtyOrdered of Sales_Order_Details 2. Jkdkdkkdkkddfksdffsdffsfsdfsdfsdf 3. Explain Types on Joins with Practical Examples. Assignment-12 Practical on Security and Privileges. 1. Give the user IVAN permission only to view records in the tables Sales_Order along with an option to further grant permission on these tables to other users. 2 Give the user IVAN all the data manipulation privileges on the table Client_Master without an option to further grant permission on the Client_Master table to other users. 3. Take back all the privileges given to the user IVAN on the table Client_Master.

Assignment-13 Create simple PL/SQL blocks. 1. Write a PL-SQL block to Display square of no from 1 to 10 using for and while loop 2. Write a PL-SQL block for finding the factorial of a given number. 3. Write a PL-SQL block for checking weather a given number is Prime or not. 4. Write a PL-SQL block to find total no of odd and even numbers in the range of 1 to 20. 5. Write a PL-SQL block for reserve the string. 6. Write a PL-SQL block to reserve the number. Assignment-14 1. Write a PL/SQL block to update the salary of employee specified by emp_code. Write a Procedure for updating salary. 2. Using function, write a PL/SQL block to update the salary of employee specified by emp_code. If record exist then update the salary otherwise display appropriate message.

You might also like