If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > functional dependency question between phonenum and address

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-06-11, 16:23
kkrueck kkrueck is offline
Registered User
 
Join Date: Jul 2009
Posts: 16
functional dependency question between phonenum and address

In a lot of web applications, like a storefront, the user's name, email, address and phone are typically persisted. A firs draft of an accounts relation would therefore have (these are attribute not SQL types)

{userid, email, name, address, phone}

{userid} and {email} are obvisous candidate keys, and address seems functionally dependent on phone, so {phone} -> {address}. I'm assuming we persist just one phone number.

So to get accounts into BCNF (and 5NF), I would decompose it into 'accounts' and 'address_info', where accounts is {userid, email, name, phone} and address_info is {phone, address}.

But is address really functionally dependenct on phone number in the 'real world' of both cell phones and landlines? A storefront application would probably have a billing address and multiple shipping address. But I'm ignoring that for now.

A storefront isn't a phone company. It doesn't care if a phone is shared by users living at the same address. It doesn't care, if the phone is shared, whether it is a shared cell (however unlikely that might be) or a shared landline. The application simply wants to avoid an update anomaly when a member's address changes.

So I'm sort of confused as to whether the FD {phone} -> {address} is really worth worrying about. It seems like it is.

thanks,
kurt
Reply With Quote
  #2 (permalink)  
Old 05-06-11, 18:02
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,605
Emphatically no, there is no real-world functional dependancy of phone -> address. Mobile phones break that paradigm, and mobile professionals break it spectacularly.

I have several dozen phone numbers, most of which are virtual (no physical location at all). I have four mailing addresses in the United States, and several more abroad. I use many of those phone numbers with multiple physical addresses, and I use many of them with a single address.

I might be a rarity today, but I'd be willing to bet heavily that the trend will move more and more toward virtualization.

-PatP
__________________
In theory, theory and practice are identical. In practice, theory and practice are unrelated.
Reply With Quote
  #3 (permalink)  
Old 05-06-11, 19:58
kkrueck kkrueck is offline
Registered User
 
Join Date: Jul 2009
Posts: 16
PatP, thanks for the prompt reply. I appreciate it!
Reply With Quote
  #4 (permalink)  
Old 05-06-11, 20:18
kkrueck kkrueck is offline
Registered User
 
Join Date: Jul 2009
Posts: 16
I guess, when thinking of functional dependencies, it really depends (excuse the pun) on who the application is for. If your Verizon, you would need to know where a landline is located. But if you Amazon you probably don't need to worry the relationship between phone number and address.
Reply With Quote
Reply

Tags
address, functional dependency, phone, real world

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On