Questions
QUERY PROCESSING JOIN 1) Let the schema of a relation r as R(A,B,C), and a relation...

QUERY PROCESSING JOIN

1) Let the schema of a relation r as R(A,B,C), and a relation s has schema S(C,D,E). Relation table r has 40K tuples, relation s has 60K tuples. The block factor of r is 25. The block factor of s is 30. Let the average seek time is t S and average block transfer time is t T . Assume you have a memory that contains M pages, but M< 40K/25 (indicating that s cannot be entirely loaded to the main memory). Assume there is no index. Estimate the worst-case costs of the following query r s using each of the following join strategies:

• Nested Loop Join

• Block Nested Loop Join

• Merge join

• Hash join

In: Computer Science

Write a Java program that reads a whole number on the keyboard and obtains and displays...

Write a Java program that reads a whole number on the keyboard and obtains and displays twice and triple that number on the screen

In: Computer Science

Describe the popular uses of the macOS (at least 2 paragraphs).

Describe the popular uses of the macOS (at least 2 paragraphs).

In: Computer Science

Write program#1 upload .java file. #1 Write a java program that prompts the user for input...

Write program#1 upload .java file.

#1 Write a java program that prompts the user for input using the Scanner class.

  • First to enter their first name.
  • Then prompts the user to enter their last name.
  • Then prompts the user to enter their city.
  • Then prompts the user to enter their state.
  • Then prompts the user to enter their zip code.  
  • Concatenate first name and last name into full_name. Using String Class is optional.
  • Use the String Class to replace zip code "0" with "N", replace "7" with "J".
  • Use the String Class to make all the values upper case.
  • Use the String Class to determine the length of full_name.  
  • Print on first line full_name and length of full_name.
  • Print all on second line mailing address, including zip_string.

<END>

In: Computer Science

Programming Language = JAVA I wanna make menu -driven using these items. 1. one 2. two...

Programming Language = JAVA

I wanna make menu -driven using these items.

1. one
2. two
3. three
4. four
5. exit

This program will read a txt data and will display them in console.

text.txt

98765432,C,John,Smith,23 Church Ave,Central,2123,8,Valid
98765431,C,Joe,Smith,55 Church Street,Genzi,2323,0,Valid
98765430,C,Bob,Smith,23 Gong Road,Warambull,2443,0,Valid
98765429,C,Mike,Smith,42 Mike Street,Waterloo,2222,0,Valid
98765428,C,Juan,Smith,522 Banana steet,Bank,2423,2,Valid
98765427,C,Mike,Jones,232 Milemium lane,Sumrise,2753,13,Suspended
98765426,C,David,Smith,551 Russian Mountain ave,Kogara,2121,0,Valid
98765425,C,Sarah,Smith,123 Straight Street,Cronulla,2232,3,Valid
98765424,C,James,Smith,23 lane,Coroloa,2345,7,Valid
98765423,C,Mike,White,4 Loman Lane,Orange,2665,14,Suspended
98765422,C,Brendon,Fei,55 bal bay,sate,2757,0,Valid
98765421,C,Jian,Zhang,62 london Street,mango,2553,0,Valid
98765420,C,Choi,Saraha,11 hamberguer Street,kefece,2753,0,Valid
98765432,C,Godam,City,32 Kent Street,Maccus,2876,0,Valid

when user press 1, this program will display a report about this txt file.

a report will include number(98765420), family name, first name, suburb, point(0,3,2,,,), status(valid).

please display well-organized format, and also please provide special option which displays this report in the decending order of point(0,3,2).

In: Computer Science

Please Work on the commented parts in the code #include <stdio.h> #include <stdlib.h> /* * */...

Please Work on the commented parts in the code

#include <stdio.h>
#include <stdlib.h>

/*
*
*/

void printArray(int *arr, int size){
int i;
for( i = 0; i < size; i++) {
// Print each element out
printf("%d ", *(arr+i));
//Print addresses of each element
printf("%p", (arr+i));
//Printing a new line
printf("\n");
}

}

int main() {


// Allows user to specify the original array size, stored in variable n1.
printf("Enter original array size: ");
int n1 = 0;
scanf("%d", &n1);
//a- Create a new array *a1 of n1 ints using malloc
int *a1 = malloc(n1 * sizeof(int));
//b- Remove comments for if statment below
//b- Set each element in a1 to 100 + indexValue ??
// if(a1 == NULL)
// {
// printf("Error! memory not allocated.");
// exit(0);
// }
  
  

printf("Printing the first array allocated using malloc\n");
//c- Print each element and addresses out (to make sure things look right)
  
  
// User specifies the new array size, stored in variable n2.
printf("\nEnter new array size: ");
int n2 = 0;
scanf("%d", &n2);
//d- Dynamically change the array a1 to size n2

//e- Remove comments for if statment below
//e- If the new array is a larger size, set all new members to 200 + indexValue.
// if(a1 == NULL)
// {
// printf("Error! memory not allocated.");
// exit(0);
// }
  
printf("Printing the reallocated array: \n");
//f- Print each element and addresses out (to make sure things look right)


//g-Free the allocated memory for a1


printf("\nEnter new array size to be initialized with 0: ");
int n3 = 0;
scanf("%d", &n3);
//h- Remove comments for if statement
//h- Using calloc create a new array and assign it to a2
//with new array size, stored in variable n3.

// if(a2 == NULL)
// {
// printf("Error! memory not allocated.");
// exit(0);
// }

printf("Printing the array created using calloc: \n");
//i- Print array a2 with size n3


//j- Print array a1 again, How you can fix this problem
printf("Printing deallocated array a1: \n");


// Done with arrays now, free the allocated memory and assign NULL

//free(a2);
//a1 = NULL;
//a2 = NULL;

printf("Program Successfully Completed!");
return 0;


}

In: Computer Science

Write program#2 upload .java file. 2A) Write a java program that uses the Random class to...

Write program#2 upload .java file.

2A) Write a java program that uses the Random class to generate a number in the range 21 to 64.  Print the generated number.

2B) Using the Random class and nextInt(6), rolls two die generating two random numbers each in the range 1 through 6. Total by adding the two values together. Print the value of each die, and the total value.

2C) Using the Math class and sqrt(num), calculate the square root of integer twenty-two divided by integer seven, print the result formated to ten decimal places. Hint: the result of the division needs data conversion to support a double.

<END>

In: Computer Science

Digital Forensics 1. Many anti-forensic techniques also have purposes which are not for anti-forensics. For each...

Digital Forensics


1. Many anti-forensic techniques also have purposes which are not for anti-forensics. For each of the following, describe the technique and what would be required to show there was intent to destroy or hide evidence.

a. Encryption
b. Defragmentation
c. Drive Wiping

In: Computer Science

Using MYSQL Workbench: ** Cannot use intersect only allowed to use inner join or in** Suppliers(sid:...

Using MYSQL Workbench:

** Cannot use intersect only allowed to use inner join or in**

Suppliers(sid: int, sname: VARCHAR(30), address: VARCHAR(50))

Parts(pid: int, pname: VARCHAR(30), color:VARCHAR(10))

Catalog(sid: int, pid:int, cost: double)

(Bolded names are primary keys)

1. Find distinct sids and snames of suppliers who supply a red part and a green part.

In: Computer Science

Proof of the smoothness rule by providing details of the proof that t (n) ∈ Ω(f(n))...

Proof of the smoothness rule by providing details of the proof that t (n) ∈ Ω(f(n)) whenever (n) is a smooth function and t(n) is an eventually nondecreasing function such that

t(n) ∈ Θ(f(n) | n is a power of b).

In: Computer Science

Write program#2 upload .java file. 2A) Write a java program that uses the Random class to...

Write program#2 upload .java file.

2A) Write a java program that uses the Random class to generate a number in the range 21 to 64.  Print the generated number.

2B) Using the Random class and nextInt(6), rolls two die generating two random numbers each in the range 1 through 6. Total by adding the two values together. Print the value of each die, and the total value.

2C) Using the Math class and sqrt(num), calculate the square root of integer twenty-two divided by integer seven, print the result formated to ten decimal places. Hint: the result of the division needs data conversion to support a double.

In: Computer Science

Josie needs a data structure that can handle the following operations: push, pop, contains, remove, where...

Josie needs a data structure that can handle the following operations: push, pop, contains, remove, where contains(Item x) answers whether a given item is in the data structure and remove(Item x) removes the given item from the data structure. How can this be implemented efficiently? (Java)

In: Computer Science

Digital Forensics In detail, explain the Window’s registry. Describe its structure, its purpose, and how forensic...

Digital Forensics

In detail, explain the Window’s registry. Describe its structure, its purpose, and how forensic examiners can use it in a case. In addition, describe what metadata is and how it relates to digital forensics.

In: Computer Science

PLEASE USE PYTHON CODE 2. Find the smallest positive (real) root of x^3-3.23x^2-5.54x+9.84 = 0 by...

PLEASE USE PYTHON CODE

2. Find the smallest positive (real) root of x^3-3.23x^2-5.54x+9.84 = 0 by the method of bisection

In: Computer Science

Consider two languages A and B where A is a context free language and B is...

Consider two languages A and B where A is a context free language and B is a regular language. Show that the set difference, A-B, must also be context free.

Also show that B-A may not be context free

In: Computer Science