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
Ainat [17]
3 years ago
6

[1] Please find all the candidate keys and the primary key (or composite primary key) Candidate Key: _______________________ Pri

mary Key: ____________________________ [2] Please find all the functional dependencies ________________________________________________ _________________________________________________ __________________________________________________ _____________________________________________________ [3] Please find out the second normal form (in relational schema). [4] Please find out the third normal form.
Computers and Technology
1 answer:
AVprozaik [17]3 years ago
6 0

Answer:

Check the explanation

Explanation:

1. The atomic attributes can't be a primary key because the values in the respective attributes should be unique.

So, the size of the primary key should be more than one.

In order to find the candidate key, let the functional dependencies be obtained.

The functional dependencies are :

Emp_ID -> Name, DeptID, Marketing, Salary

Name -> Emp_ID

DeptID -> Emp_ID

Marketing ->  Emp_ID

Course_ID -> Course Name

Course_Name ->  Course_ID

Date_Completed -> Course_Name

Closure of attribute { Emp_ID, Date_Completed } is { Emp_ID, Date_Completed , Name, DeptID, Marketing, Salary, Course_Name, Course_ID}

Closure of attribute { Name , Date_Completed } is { Name, Date_Completed , Emp_ID , DeptID, Marketing, Salary, Course_Name, Course_ID}

Closure of attribute { DeptID, Date_Completed } is { DeptID, Date_Completed , Emp_ID,, Name, , Marketing, Salary, Course_Name, Course_ID}

Closure of attribute { Marketing, Date_Completed } is { Marketing, Date_Completed , Emp_ID,, Name, DeptID , Salary, Course_Name, Course_ID}.

So, the candidate keys are :

{ Emp_ID, Date_Completed }

{ Name , Date_Completed }

{ DeptID, Date_Completed }

{ Marketing, Date_Completed }

Only one candidate key can be a primary key.

So, the primary key chosen be { Emp_ID, Date_Completed }..

2.

The functional dependencies are :

Emp_ID -> Name, DeptID, Marketing, Salary

Name -> Emp_ID

DeptID -> Emp_ID

Marketing ->  Emp_ID

Course_ID -> Course Name

Course_Name ->  Course_ID

Date_Completed -> Course_Name

3.

For a relation to be in 2NF, there should be no partial dependencies in the set of functional dependencies.

The first F.D. is

Emp_ID -> Name, DeptID, Marketing, Salary

Here, Emp_ID -> Salary ( decomposition rule ). So, a prime key determining a non-prime key is a partial dependency.

So, a separate table should be made for Emp_ID -> Salary.

The tables are R1(Emp_ID, Name, DeptID, Marketing, Course_ID, Course_Name, Date_Completed)

and R2( Emp_ID , Salary)

The following dependencies violate partial dependency as a prime attribute -> prime attribute :

Name -> Emp_ID

DeptID -> Emp_ID

Marketing ->  Emp_ID

The following dependencies violate partial dependency as a non-prime attribute -> non-prime attribute :

Course_ID -> Course Name

Course_Name ->  Course_ID

So, no separate tables should be made.

The functional dependency Date_Completed -> Course_Name has a partial dependency as a prime attribute determines a non-prime attribute.

So, a separate table is made.

The final relational schemas that follows 2NF are :

R1(Emp_ID, Name, DeptID, Marketing, Course_ID, Course_Name, Date_Completed)

R2( Emp_ID , Salary)

R3 (Date_Completed, Course_Name, Course_ID)

For a relation to be in 3NF, the functional dependencies should not have any transitive dependencies.

The functional dependencies in R1(Emp_ID, Name, DeptID, Marketing, Date_Completed) is :

Emp_ID -> Name, DeptID, Marketing

This violates the transitive property. So, no table is created.

The functional dependencies in R2 (  Emp_ID , Salary) is :

Emp_ID -> Salary

The functional dependencies in R3 (Date_Completed, Course_Name, Course_ID) are :

Date_Completed -> Course_Name

Course_Name   ->  Course_ID

Here there is a transitive dependency as a non- prime attribute ( Course_Name ) is determining a non-attribute ( Course_ID ).

So, a separate table is made with the concerned attributes.

The relational schemas which support 3NF re :

R1(Emp_ID, Name, DeptID, Course_ID, Marketing, Date_Completed) with candidate key as Emp_ID.

R2 (  Emp_ID , Salary) with candidate key Emp_ID.

R3 (Date_Completed, Course_Name ) with candidate key Date_Completed.

R4 ( Course_Name, Course_ID ).  with candidate keys Course_Name and Course_ID.

You might be interested in
Write a program which:
Studentka2010 [4]

Answer:

Ill do this in C# and Java

Explanation:

C#:

public static void Main(string[] args)

       {

           string input = Console.ReadLine();

               switch (input)

               {

                   case "A1":

                       Console.WriteLine("Footwear:");

                       Console.WriteLine("Shoes");

                       break;

                   case "B1":

                       Console.WriteLine("Tops:");

                       Console.WriteLine("Jackets");

                       break;

                   case "C1":

                       Console.WriteLine("Pants:");

                       Console.WriteLine("Trousers");

                       break;

                   case "A2":

                       Console.WriteLine("Footwear:");

                       Console.WriteLine("Trainers");

                       break;

                   case "B2":

                       Console.WriteLine("Tops:");

                       Console.WriteLine("TShirts");

                       break;

                   case "C2":

                       Console.WriteLine("Pants:");

                       Console.WriteLine("Shorts");

                       break;

                   default:

                       Console.WriteLine("Incorrect Input");

                       break;

               }

       }

Java:

public static void main(String[] args)

   {

       Scanner myObj = new Scanner(System.in);  // Create a Scanner object

       String input = myObj.nextLine();

       {

           switch (input)

               {

                   case "A1":

                       System.out.println("Footwear:");

                       System.out.println("Shoes");

                       break;

                   case "B1":

                       System.out.println("Tops:");

                       System.out.println("Jackets");

                       break;

                   case "C1":

                       System.out.println("Pants:");

                       System.out.println("Trousers");

                       break;

                   case "A2":

                       System.out.println("Footwear:");

                       System.out.println("Trainers");

                       break;

                   case "B2":

                       System.out.println("Tops:");

                       System.out.println("TShirts");

                       break;

                   case "C2":

                       System.out.println("Pants:");

                       System.out.println("Shorts");

                       break;

                   default:

                       System.out.println("Incorrect Input");

                       break;

               }

       }

3 0
3 years ago
Create an absolute value component abs() with an 8-bit input A that is a signed binary number, and an 8-bit output Q that is uns
Stolb23 [73]

Answer:

Explanation:

Find attached the solution

5 0
3 years ago
What is the system that consists of nonproprietary hardware and software based on publicly known standards that allow third part
il63 [147K]

Answer:

Open systems

Explanation:

Open systems are very different from Open Source applications or software, it should not be confused.

Open systems work with the blend of open software standards, portability, and interoperability. Computer systems that interoperate among multiple standards and vendors to ensure that computer resources (hardware and software) are not allotted to a particular vendor. Such computer systems are considered as open systems.

For instance, computer systems that run a Microsoft Windows OS can be considered as an Open system. This is because of their capability to run different versions of the Microsoft Windows OS on that particular computer system. More clearly, A computer with Windows 10 OS, can be used to install Windows 8 OS without any issue. That same computer system can run the Windows 7 OS. This makes the computer system and open system.

5 0
2 years ago
Which statement draws an accurate comparison between social media marketing and conventional marketing? Social media marketing i
wlad13 [49]
I think the best answer would be the last option.  Social media allow customers to express their views while conventional media do not. In social media, the viewers can freely right their comments and testimonials about a product. However, in conventional marketing like advertisements in televisions, the viewers cannot make direct comments to the company.
4 0
3 years ago
What is a circuit breaker and how is it different from a fuse? Why do we need these two different devices?
Liula [17]

Answer:

Circuit breakers and fuses both have the same purpose, but a fuse will melt when stopping electricity where as circuit breakers can just be reset. You need both devices in order to stop a overload of power that could fry your electronics or worse, start fires.

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • the task is to ask the user for three numbers and find the average which pseudocode gives you the comment outline for task​
    10·1 answer
  • Ask the user to enter a number n >= 1. There after the user will enter n-1 distinct integers between 1 and n. Thus, the enter
    9·1 answer
  • In one sentences describe how to change your home page
    10·1 answer
  • As an improvement of the ATX form factor over AT, shorter wires made it easier to shield them and made them capable of handling
    6·1 answer
  • Write a method for the Customer class that that will return a string representing a bill notice when passed a double value repre
    14·1 answer
  • Which of the following code is correct? I: print("Programming is fun") print("Python") print("Computer Science") II: print("Prog
    11·1 answer
  • What of the following is not a benefit of active listening
    8·2 answers
  • During a test, it is generally best to: A. answer all questions in order B answer the essay questions first C. answer the least
    7·2 answers
  • Which of the following is input devices? (a)Scanner (b) Keyboard (c) Both a and b (d) Plotter​
    5·1 answer
  • if we intend to include a servo motor as an actuator, what feature should we include when selecting a microcontroller?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!