Skip to main content

Posts

Showing posts from June, 2021

RDBMS Data Definition Language Create | Customer_info table

  Write a query to create Customer_info table with constraints mentioned.  Refer the below schema  Result Description Summary of tests +------------------------------+ | 3 tests run / 3 test passed | +------------------------------+

Programming using Java Hands On - Control Structures | Celcius to Farenheit Conversion

  Celcius to Farenheit Conversion Write a program to convert  Celsius to Farenheit.  Display the result correct to 1 decimal. Create a class "CelsiusConversion.java" and write the main method. Hint : 5 * (F – 32) = 9 * C,   F-Farenheit , C- Celsius   Sample Input  1 : 80 Sample Output  1 : 176.0 Sample Input  2 : 88 Sample Output  2 : 190.4 Result Description Summary of tests *Note: All the test cases might not have same weightage +------------------------------+ | 7 tests run/ 7 tests passed | +------------------------------+

RDBMS Data Definition Language | Create Distributor table

  Write a query to create Distributor table with constraints mentioned.  Refer the below schema  Result Description Summary of tests +------------------------------+ | 3 tests run / 3 test passed | +------------------------------+

RDBMS Data Definition Language | Test Your Understanding 2

Test Your Understanding 2 Modify the given query appropriately in order to create the department table using the schema given below, c onsidering the product table that you have already created. COLUMN NAME DATATYPE SIZE CONSTRAINT dept_id number 4 Primary key prod_id number 4 Foreign key dept_name varchar2 25 Unique dept_head varchar2 25 Not null Evaluation Result: Result Description Summary of tests +------------------------------+ | 3 tests run / 3 test passed | +------------------------------+

RDBMS Data Definition Language | Test Your Understanding 1

Refer the below schema, and modify the given query appropriately in order to create the product table. COLUMN NAME DATATYPE SIZE CONSTRAINT prod_id number 4 Primary key prod_name varchar2 25   Prod_expiry_date date   Not null Evaluation Result: Result Description Summary of tests +------------------------------+ | 3 tests run / 3 test passed | +------------------------------+

RDBMS Data Definition Language | Alter - Add CHECK constraint to Mobile_Master

RDBMS  Data Definition Language  Alter - Add CHECK constraint to Mobile_Master Refer the following schema and add a constraint CHK_WARRANTY in Mobile_Master table to ensure that the warranty in years is greater than zero. Evaluation Result: Result Description Summary of tests +------------------------------+ | 3 tests run / 3 test passed | +------------------------------+

RDBMS Data Definition Language | Alter - Establish Referential Integrity Constraint

RDBMS  Data Definition Language  Alter - Establish Referential Integrity Constraint Identify the common key between the customer_info and Sales_info tables and establish referential integrity constraint between them. Give the constraint name as FK_KEY. Evaluation Result: Result Description Summary of tests +------------------------------+ | 3 tests run / 3 test passed | +------------------------------+

RDBMS Data Definition Language | Alter-Rename the field

RDBMS  Data Definition Language  Alter-Rename the field Write a query to change the field name Distributor_name to Distributor_Full_name in Distributor table. Evaluation Result: Result Description Summary of tests +------------------------------+ | 3 tests run / 3 test passed | +------------------------------+

RDBMS Data Definition Language | Create Buses table

 efer the below schema and create the buses table. Column Name Datatype Size Constraint Constraint name Bus_no Number 11 Primary key PK_BUSES Bus_name Varchar2 20   Type Varchar2 20   Total_seats Number 11   Avail_seats Number 11     Result Description Summary of tests +------------------------------+ | 3 tests run / 3 test passed | +------------------------------+

RDBMS Data Definition Language | Change the name of the table Sales Info

  RDBMS  Data Definition Language  Change the name of the table Sales Info Write an SQL statement to rename the table Sales Info to Sales_Information. (Hint: use alter command to rename the table name) Evaluation Result: Result Description Summary of tests +------------------------------+ | 1 tests run / 1 test passed | +------------------------------+

RDBMS Data Definition Language | Alter - removing a column in Mobile Specification

RDBMS  Data Definition Language  Alter - removing a column in Mobile Specification   Write a query to remove the column weight from the mobile specification table. Evaluation Result: Result Description Summary of tests +------------------------------+ | 3 tests run / 3 test passed | +------------------------------+

RDBMS Data Definition Language | Purge Distributor table Truncate

 RDBMS  Data Definition Language  Purge Distributor table Truncate The mobile management wants to purge all the records from the “Distributor “table.  Write an SQL statement to purge all the records from the distributor table without allowing rollback activity. Evaluation Result: Result Description Summary of tests +------------------------------+ | 1 tests run / 1 test passed | +------------------------------+

RDBMS Data Definition Language | Drop Mobile Specification table (parent)

  RDBMS  Data Definition Language  Drop Mobile Specification table (parent) Refer the following schema and drop Mobile Specification table. (Hint: To drop parent table all associate tables need to be dropped or Use 'cascade constraints' command) Evaluation Result: Result Description Summary of tests +------------------------------+ | 1 tests run / 1 test passed | +------------------------------+

RDBMS Data Definition Language | Create Sales_info table

  Write a query to create Sales_info with constraints mentioned. Refer the below schema  Result Description Summary of tests +------------------------------+ | 3 tests run / 3 test passed | +------------------------------+

RDBMS Data Definition Language | Create Mobile_master table

  Write a query to create Mobile_master table with constraints mentioned.  Refer the below schema  Result Description Summary of tests +------------------------------+ | 3 tests run / 3 test passed | +------------------------------+

RDBMS Data Definition Language Create | Mobile_specification table

  Write a query to  Mobile_specification table with constraints mentioned. Refer the below schema Result Description Summary of tests +------------------------------+ | 3 tests run / 3 test passed | +------------------------------+