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 | +------------------------------+
1. You are given a number n, which represents the length of a road. The road has n plots on it's each side. 2. The road is to be so planned that there should not be consecutive buildings on either side of the road. 3. You are required to find and print the number of ways in which the buildings can be built on both side of roads. Input Format A number n Output Format A number representing the number of ways in which the buildings can be built on both side of roads. Constraints 0 < n <= 45 Sample Input 6 Sample Output 441 Solution: import java.io.*; import java.util.*; public class Main{ public static void main(String[] args) throws Exception { // write your code here Scanner scn = new Scanner(System.in); long n = scn.nextInt(); long ob = 1; long os = 1; for (int i = 2; i <= n; i++) { long nb = os; long ns = os + ob; ob = nb; ...
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 | +------------------------------+
1. You are given a number n, representing the count of items. 2. You are given n numbers, representing the values of n items. 3. You are given n numbers, representing the weights of n items. 3. You are given a number "cap", which is the capacity of a bag you've. 4. You are required to calculate and print the maximum value that can be created in the bag without overflowing it's capacity. Note: Each item can be taken any number of times. You are allowed to put the same item again and again. Input Format A number n v1 v2 .. n number of elements w1 w2 .. n number of elements A number cap Output Format A number representing the maximum value that can be created in the bag without overflowing it's capacity Constraints 1 <= n <= 20 0 <= v1, v2, .. n elements <= 50 0 < w1, w2, .. n elements <= 10 0 < cap <= 10 Sample Input 5 15 14 10 45 30 2 5 1 3 4 7 Sample Output 100 Solution: im...
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 | +------------------------------+
Comments
Post a Comment