1answer.
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
joja [24]
2 years ago
12

Why do relational databases use primary keys and foreign keys?.

Computers and Technology
1 answer:
Andrew [12]2 years ago
8 0

Answer:

Explanation:

A relational database is designed to enforce the uniqueness of primary keys by allowing only one row with a given primary key value in a table. A foreign key is a column or a set of columns in a table whose values correspond to the values of the primary key in another table.

You might be interested in
While reviewing the Quick Access toolbar, Sarah notices that the Redo button is not there. This is because the Redo button only
IRISSAK [1]
D is the best answer
I hope it’s work
8 0
3 years ago
Who do you guys ship lol bit with?
LekaFEV [45]

Answer:

nobody

Explanation:

8 0
3 years ago
Read 2 more answers
Write a recursive method named binarySearch that accepts a sorted array of integers and an integer target value and uses a recur
djyliett [7]

Answer:

10

-1

Process finished with exit code 0

Explanation: see code bellow

public class BinarySearchRecursive {

   public static int binarySearch(int[] a, int key) {

       return binarySearchRecursiveHelper(a, key, 0, a.length - 1);

   }

   public static int binarySearchRecursiveHelper(int[] arr, int target, int start, int end) {

       if (start > end) {

           return -1;

       }

       int mid = (start + end) / 2;

       if (arr[mid] == target) {

           return mid;

       } else if (target < arr[mid]) {

           return binarySearchRecursiveHelper(arr, target, start, mid - 1);

       } else {

           return binarySearchRecursiveHelper(arr, target, mid + 1, end);

       }

   }

   public static void main(String[] args) {

       int[] a = {-4, 2, 7, 10, 15, 20, 22, 25, 30, 36, 42, 50, 56, 68, 85, 92, 103};

       int index = binarySearch(a, 42);   // 10

       System.out.println(index);

       index = binarySearch(a, 66);   // -1

       System.out.println(index);

   }

}

6 0
2 years ago
Within an event-driven program a component from which an event is generated is the ____
mojhsa [17]
The answer is: <span>Source of the Event</span>
7 0
3 years ago
Create a program that contains 4 methods / functions... main(), getTestScores(), calcAverage(), and displayAverage(). The main()
jeyben [28]

Answer:

import java.util.Scanner;

public class  num6{

   static int getTestScores(){

       System.out.println("Enter the Score");

       Scanner in = new Scanner(System.in);

       int score = in.nextInt();

       return score;

   }

   static double calcAverage(int score1, int score2, int score3){

       return (score1+score2+score3)/3;

   }

   static void displayAverage(double ave){

       System.out.println("The Average is "+ave);

   }

   public static void main(String[] args) {

       int num1 = getTestScores();

       int num2 = getTestScores();

       int num3 = getTestScores();

       //Calling Calculate Average

       double average = calcAverage(num1,num2,num3);

       //Calling displayAverage

       displayAverage(average);

   }

}

Explanation:

  • Using Java programming Language
  • Create the four methods
  • getTestScores() Uses the Scanner Class to receive an in variable and return it
  • calcAverage() accepts three ints as parameter calculates their average and return it
  • displayAverage() Accepts a double and prints it out with a concatenated string as message
  • In the Main Method, getTestScores is called three times to obtain three numbers from the user
  • calAverage is called and handed the three numbers
  • printAverage is called to output the calculated average
8 0
2 years ago
Other questions:
  • The git _____ command will display the last commit and what were the changes you made.
    9·1 answer
  • What acts as a platform on which application software runs?
    8·1 answer
  • When you declare a string data type, you are actually creating an object from the?
    5·1 answer
  • Discuss advantages and disadvantages of Twisted Pair?
    6·1 answer
  • A USB zipper drive is a small data storage device that plugs into a computer's USB port.
    14·1 answer
  • Complete the following conversions. You MUST show all of your work to receive full credit.
    13·1 answer
  • Pls help will give brainlest​
    15·2 answers
  • How is modern technology developed? Explain.
    14·2 answers
  • A digital forensic analyst examines the original digital source (e.g. computer, flash drive, backup tape) suspected of being inv
    5·1 answer
  • the image on the right was prooduced by a computer. it shows a complex molecu;e consisting of many atoms. what would be an advan
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!