Skip to main content

Difficulty grasping Functional Dependency concepts with MySQL

I can write queries fairly well, but basic Database Design concepts continue to frustrate me :/ I'm working through an old book to try and brush up on the material, but functional dependencies are really making my head spin. For instance, the following question:

Assume that Marcia keeps a table of data about her customers. Consider just the following part of that table: CUSTOMER(Phone, FirstName, LastName) Explain the conditions under which each of the following are true:

  1. Phone --> (FirstName, LastName)
  2. (Phone, FirstName) --> LastName
  3. (Phone, LastName) --> First Name
  4. (LastName, FirstName) --> Phone
  5. Phone --> --> LastName
  6. Phone --> --> FirstName
  7. Phone --> --> (FirstName, LastName)

I don't even understand how to go about answering the question!..

Solved

I'm not an expert on Db design, but from what I understand:

And assuming that Phone is unique.

  1. True. Because a Client's's FirstName and Last Name can be uniquely determined from their Phone

  2. True.

  3. True

  4. False

The double narrow I dont know what it is mean


Comments

Popular posts from this blog

Can't find variable Page_ClientValidate in Safari

I have a ASP.NET 2.0 webpage with 3 server controls: RequiredFieldValidator , textbox , and button .` Button uses OnClientClick to call a JavaScript function for validation using Page_ClientValidate() . This page works fine with Chrome, IE, Firefox, Safari (5.1.7 on Windows). It has stopped working with modern Safari versions - 8.0 in Yosemite and Mobile Safari on iOS 8. I see this exception in the Inspect Element area: "ReferenceError: Can't find variable: Page_ClientValidate" How can this be fixed? Solved This sounds like a duplicate of this problem: iOS 8 / Safari 8 not working with ASP.NET AJAX-Extensions Another solution that modifies the web.config instead of the mozill: ReferenceError: Can't find variable: ValidatorEnable in Safari

Why does C++ allow a function and a class have a same name?

#include using namespace std; struct A { A() { cout The output is: void A() Why does C++ allow a function and a class have a same name? Solved I believe this comes down to backwards compatibility with C. In C, when you declare a struct like you did, you then have to refer to it as struct A , not just A . For example: void A() {} struct A {}; void f() { A(); struct A x; // works fine A y; // does not compile } In this context, it makes sense to allow A to mean two different things, because it's always clear which one you mean, depending on whether you used struct or not. In C++, struct s (and class es) can be referenced directly, without the need to use the struct keyword. This introduces the ambiguity you're concerned about, but the alternative is that valid C code like the one above would not be valid C++ code, which is even worse. Why? Because that's the way the language is! The A::A()...