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
kolezko [41]
2 years ago
12

Consider the following relation:CAR_SALE(Car#, Date_sold, Salesperson#, Commission%, Discount_amt)Assume that a car may be sold

by multiple salespeople, and hence{Car#, Salesperson#}is the primary key. Additional dependencies areDate_sold ? Discount_amtSalesperson# ? Commission%Based on the given primary key, is this relation in 1NF, 2NF, or 3NF? Why or whynot? How would you successively normalize it completely?
Computers and Technology
1 answer:
GalinKa [24]2 years ago
5 0

Answer:

The answer to this question can be given as:

Normalization:

Normalization usually includes the division of a table into two or more tables as well as defining a relation between the table. It is also used to check the quality of the database design. In the normalization, we use three-level that are 1NF, 2NF, 3NF.

First Normal Form (1NF):

In the 1NF each table contains unique data. for example employee id.  

Second Normal Form (2NF):

In the 2NF form, every field in a table that is not a determiner of another field's contents must itself be a component of the table's other fields.

Third Normal Form (3NF):

In the 3NF form, no duplication of information is allowed.

Explanation:

The explanation of the question can be given as:

  • Since all attribute values are single atomic, the given relation CAR_SALE is in 1NF.  
  • Salesperson# → commission% …Given  Thus, it is not completely dependent on the primary key {Car#, Salesperson#}. Hence, it is not in 2 NF.                                                                                                        

The 2 NF decomposition:

        CAR_SALE_1(Car#, Salesperson#, Date_sold, Discount_amt)

         CAR_SALE_2(Salesperson#, Commission%)

  • The relationship in question is not in 3NF because the nature of a transitive dependence occurs
  • Discount_amt → Date_sold → (Car#, Salesperson#) . Thus, Date_sold is neither the key itself nor the Discount amt sub-set is a prime attribute.  

The 3 NF decomposition :

        CAR_SALES_1A(Car#, Salesperson#, Date_sold)

        CAR_SALES_1B(Date_sold, Discount_amt)

        CAR_SALE_3(Salesperson#, Commission%)

You might be interested in
2.27 LAB: Driving costs Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both doubles) as
leonid [27]

Answer:

<em>Java</em>

//////////////////////////////////////////////////////////////////////////

import java.util.Scanner;

public class MyClass {

   public static void main(String args[]) {

     double miles_gallon, gas_gallon;

     ////////////////////////////////////////////////

     System.out.print("Enter miles per gallon: ");

     Scanner myObj = new Scanner(System.in);

     miles_gallon = myObj.nextDouble();

     

     System.out.print("Enter gas dollars per gallon: ");

     gas_gallon = myObj.nextDouble();

     

     System.out.println();

     ////////////////////////////////////////////////

     double twenty_miles = 20/miles_gallon*gas_gallon;

     System.out.printf("Gas cost for 20 miles: $%.2f%n%n", twenty_miles);

     

     double seventy_five_miles = 75/miles_gallon*gas_gallon;

     System.out.printf("Gas cost for 75 miles: $%.2f%n%n", seventy_five_miles);

     

     double five_hundered_miles = 500/miles_gallon*gas_gallon;

     System.out.printf("Gas cost for 500 miles: $%.2f", five_hundered_miles);

   }

}

3 0
2 years ago
Read 2 more answers
The Open dialog box lets you _____.
galina1969 [7]
To an honest and healthy relationship
4 0
2 years ago
During a traceroute, which action does a router perform to the value in the Time To Live (TTL) field?
Sladkaya [172]

Answer:

<em>During a traceroute, the router decreases the Time To Live values of the packet sent from the traceroute by one during routing, discards the packets whose Time To Live values have reached zero, returning the ICMP error message ICMP time exceeded.</em>

Explanation:

Traceroute performs a route tracing function in a network. It is a network diagnostic commands that shows the path followed, and measures the transit delays of packets across an Internet Protocol (IP) network, from the source to the destination, and also reports the IP address of all the routers it pinged along its path. During this process, the traceroute sends packets with Time To Live values that increases steadily from packet to packet; the process is started with Time To Live value of one. <em>At the routers, the Time To Live values of the packets is gradually decreased by one during routing, and the packets whose Time To Live values have reached zero are discarded, returning the ICMP error message ICMP Time Exceeded</em>

7 0
2 years ago
The chart describes the roles of four employees in the STEM career cluster. Which best describes the careers of the four employe
Lynna [10]

The best answer would be (C) Linus is a Photonics Engineer, Paco is a Conservation Scientist, Robin is a Museum Technician, and Lucretia is a Materials Engineer.

This is because all the occupations on option A are STEM (science, technology, engineering, and mathematics) related careers, while the other options contained occupations that aren’t STEM-related, such as Historian in option A, Museum Conservator in option B, and Activist and Anthropologist in option D.

3 0
2 years ago
Read 2 more answers
consonantCount (s2) Write the function consonantCountthat counts how many times a consonant (either lowercase or uppercase) occu
Sidana [21]

Answer:

public static int consonantCount(String str){

       int numOfConsonants =0;

       int numOfVowels =0;

       String word = str.toLowerCase();

       for(int i=0; i< word.length(); i++){

           if(word.charAt(i)=='a'||word.charAt(i)=='i'||word.charAt(i)=='o'

                   ||word.charAt(i)=='e'||word.charAt(i)=='u'||word.charAt(i)=='y'){

              numOfVowels++;

           }

       }

       numOfConsonants = (word.length()-numOfVowels);

       return numOfConsonants;

   }

Explanation:

Using Java programming Language

  • Create two variables int numOfConsonants and int numOfVowels To hold the number of consonants and vowels repectively
  • The english vowels for this question includes y or Y
  • Convert the string entered into all lower case letters using java's toLowerCase method
  • Using a for loop count the total number of vowels in the string
  • Subtract the number of vowels in the string from the length of the string to get the number of consonants
  • return the number of consonants
  • Consider a complete program below where a user is prompted to enter a string, the string is stored in a variable, the string is cleaned (Removing all special characters and whitespaces)
  • The method cosonantCount is then called

<em>import java.util.Scanner;</em>

<em>public class num2 {</em>

<em>    public static void main(String[] args) {</em>

<em>        Scanner in = new Scanner(System.in);</em>

<em>        System.out.println("Enter a String");</em>

<em>        String a = in.nextLine();</em>

<em>        String cleanText = a.replaceAll("[^a-zA-Z0-9]", "");</em>

<em>        System.out.println("The number of consonants in the word are "+consonantCount(cleanText));</em>

<em>    }</em>

<em>    public static int consonantCount(String str){</em>

<em>        int numOfConsonants =0;</em>

<em>        int numOfVowels =0;</em>

<em>        String word = str.toLowerCase();</em>

<em>        for(int i=0; i< word.length(); i++){</em>

<em>            if(word.charAt(i)=='a'||word.charAt(i)=='i'||word.charAt(i)=='o'</em>

<em>                    ||word.charAt(i)=='e'||word.charAt(i)=='u'||word.charAt(i)=='y'){</em>

<em>               numOfVowels++;</em>

<em>            }</em>

<em>        }</em>

<em>        numOfConsonants = (word.length()-numOfVowels);</em>

<em>        return numOfConsonants;</em>

<em>    }</em>

<em>}</em>

3 0
2 years ago
Other questions:
  • Write a single statement that will print the message "first is " followed by the value of first, and then a space, followed by "
    6·1 answer
  • Accepted identifier for a variable in PHP except:
    11·1 answer
  • Assume that a kernel is launched with 1000 thread blocks each of which has 512 threads. If a variable is declared as a shared me
    6·1 answer
  • Given a sorted array of integer, A, with possible duplicate elements. Implement an efficient (sublinear running time complexity)
    12·1 answer
  • Which of the following statements is true? Using existing exceptions makes the program less robust. Always create your own excep
    15·1 answer
  • 63:47 One side in a Transmission Control Protocol (TCP) connection has not been able to properly recover from a series of malfor
    15·1 answer
  • Create a class Student and another called StudentClub. StudentClub should have the fields President, Vice-President, Secretary,
    11·1 answer
  • ) A byte is used to represent a single character in the computer ______<br> true or false?
    14·2 answers
  • As a twist on the Hello World exercise, you are going to be the end user of the Hello class. This class is designed to greet the
    9·1 answer
  • Select all the activities Samil could so through his banking app.
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!