answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Fed [463]
2 years ago
3

You may use the CAP database handout. Write the relational algebra statement to answer the following question. Then write the SQ

L statement to answer the same question.
Get cities of agents booking an order from customer c002.
Computers and Technology
1 answer:
matrenka [14]2 years ago
5 0

Answer and Explanation:

I'm assuming that you have two databases (since no CAP database is provided in the question) Agent, Customer.

Agent having the attributes agent_id, city, customerid etc..

Customer having customerid, customer_name etc.

Relational Algebra statement:

π   customerid(Agent)(customerid =c002(Customer))

city

Query:

select city from Agent where customerid in(select customerid from Customer where customer_name="c002);

You might be interested in
Write a program that reads the lengths of the sides of a triangle from the user. Compute the area of the triangle using Heron's
slamgirl [31]

Answer:

The java program is as follows.

import java.util.Scanner;

import java.lang.*;

public class Area

{

   //variables to hold the values

   static double a, b, c;

   static double s;

   static double area;

public static void main(String[] args) {

    //scanner class object created

    Scanner sc = new Scanner(System.in);

 System.out.print("Enter the first side: ");

 a=sc.nextInt();

 System.out.print("Enter the second side: ");

 b=sc.nextInt();

 System.out.print("Enter the third side: ");

 c=sc.nextInt();

 s=(a+b+c)/2;

 //function of Math class used

 area = Math.sqrt( s*(s-a)*(s-b)*(s-c) );

 //result displayed with 3 decimal places

 System.out.printf("The area of the triangle is %.3f", area);  

}

}

OUTPUT

Enter the first side: 1

Enter the second side: 1

Enter the third side: 1

The area of the triangle is 0.433

Explanation:

1. The variables to declare the three sides of the triangle, the semi-perimeter and the area of the triangle are declared with double datatype. All the variables are declared at class level and hence, declared with keyword, static.  

2. Inside main(), an object of the Scanner class is created.

Scanner sc = new Scanner(System.in);

3. Using the Scanner class object, user input is taken for all the three sides of the triangle.

4. Following this, the semi-perimeter is computed as shown.

s=(a+b+c)/2;

5. The area of the triangle is computed using the given formula which is implemented as shown.

area = Math.sqrt( s*(s-a)*(s-b)*(s-c) );

6. The sqrt() method of the Math class is used while computing the area of the triangle.

7. The area is displayed with three decimals. This is done using the printf() method as shown.

System.out.printf("The area of the triangle is %.3f", area);

8. The program is saved with the same name as the name of the class having the main() method.

9. The class having the main() method is always public.

3 0
2 years ago
Need 2.5 Code Practice Answers
konstantin123 [22]

Answer:

import random

random.seed(1,10)

a = random.randint (1,10)

b = random.randint (1,10)

print ("What is: " + str(a) + " X " + str(b) + "?")  

ans = int(input("Your answer: "))  

if (a * b == ans):  

   print ("Correct!")  

else:  

   print ("Incorrect!")

Explanation:

4 1
2 years ago
Read 2 more answers
Look at the following array definition:
Juli2301 [7.4K]

Answer:

The answer is void process Array (int arr {}, int n)

Explanation:

Solution

From the given question, the right choice answer i not listed  here.

However this is the right answer choice stated as follows: void process Array (int arr {}, int n)

The size of this array is not fixed. we need to pass or move the array as the second  argument to the function.

The option a and b is wrong.

4 0
2 years ago
Darcy is creating an instructional manual for her employees. She entered the text in a word processing program and wants to impo
NeX [460]
When Darcy finish creating the instructional manual for her employees, she can copy paste her content from the word processing program to DTP by :
a) Press Ctrl a to select all the content from the word processing program;
b) Press Ctrl c to copy everything from the word processing program;
c) open DTP
d) Press Ctrl v to paste everything, word by word, page by page from the word processing program to DTP.
5 0
2 years ago
Prompt
Verizon [17]
Prompt is a game code technically a tiko machine that turns into machines that fraud into the new line that put in a friends house.
7 0
1 year ago
Read 2 more answers
Other questions:
  • Ismael would like to insert a question mark symbol in his document. What steps will he need to follow to do that?
    5·2 answers
  • Adrian has decided to create a website to catalog all the books he has in his personal library. He wants to store this informati
    11·2 answers
  • Suppose a retailer who has no technology expertise wishes to set up an online presence for his business. He ________. a. ​can us
    6·1 answer
  • You are on vacation and want to see where all the restaurants and trendy shops are in relation to your hotel. You remember there
    15·1 answer
  • Using the RAID controller on the motherboard, you configure three hard disks in a RAID 5 array. You leave the array unpartitione
    14·1 answer
  • Collaboration online increases students' motivation by
    5·2 answers
  • Write a program that removes all spaces from the given input.
    6·1 answer
  • (a) Show how to use (the Boolean formula satisfiability program) satisfiable num (and substitute) to find a satisfying assignmen
    9·1 answer
  • When you add a zero to the right of a decimal number, it multiplies its value by 10 (For example, "15" becomes "150"). What simi
    10·1 answer
  • What are the primary IP addresses for DNS servers hosted on the x128bit, iskytap and cloudparadox domains
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!