473,597 Members | 2,420 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

2qs on normalization: The 1st

Hi all,

I strived understanding the concepts of all normal forms up to the
domain-key normal form but there are some issues I still am unsure of, and I
will describe the first one in this post.
(it looks so simple that there has to be an answer)

Suppose a relation that holds information about Phone Numbers:
PhoneNumber (PhoneID, ActualNumber, PhoneType, Comments)

We have 4 fields.
1. PhoneID ==> a system-generated identifier
2. ActualNumber ==> the actual phone number
3. PhoneType ==> determines the type of phone and can have values only 3
values which are {Home, Work, Cellular}
and
4. Comments ==> comments for a specific phone number.

I believe this first relation is in Boyce/Codd Normal Form.

Obviously, however, there is some redundancy in having the three values of
the PhoneType attribute repeating for thousands of records containing phone
numbers. So I create another table
PhoneType (PhoneTypeID, PhoneType).

Now I have the two tables
Phone (PhoneID, ActualNumber, PhoneTypeID(for eignkey) Comments)
PhoneType (PhoneTypeID, PhoneType)

This allows me to get rid of the redundancy of the first design because I
only need to store the 3 phone types once in the second table.
My qs is, in doing this what normal form am I enforcing? Is this type of
decomposition an example of enforcing the elusive 5th normal form?

Many thanks to anyone who can clue me in,

Kostas

Nov 13 '05 #1
2 1475
"Kostas" <no*****@noemai l.net> wrote in message news:<10******* ******@corp.sup ernews.com>...
Hi all,

I strived understanding the concepts of all normal forms up to the
domain-key normal form but there are some issues I still am unsure of, and I
will describe the first one in this post.
(it looks so simple that there has to be an answer)

Suppose a relation that holds information about Phone Numbers:
PhoneNumber (PhoneID, ActualNumber, PhoneType, Comments)

We have 4 fields.
1. PhoneID ==> a system-generated identifier
2. ActualNumber ==> the actual phone number
3. PhoneType ==> determines the type of phone and can have values only 3
values which are {Home, Work, Cellular}
and
4. Comments ==> comments for a specific phone number.


Kostas,
I once asked someone about this and he said that normalization is
good, but don't go crazy. If it works and you can get the answers you
want, go with it. More normalization is not always better. And you
have to learn where to stop. How much is enough/warranted? Disk
space is cheap, and if you index, it will be pretty fast. How much
hassle are you saving? The more tables you have, the more joins you
need, the longer your queries will take. So you have to decide on
size vs performance, among other things. If it were up to me, I'd do
something like:

CREATE TABLE Person(
PersonID Autonumber PRIMARY KEY,
FirstName TEXT(25) NOT NULL,
....)

CREATE TABLE TelNumbers(
PhoneNo TEXT(10) NOT NULL,
PersonID INTEGER NOT NULL,
NumberType TEXT(25),
PRIMARY KEY (PhoneNo, PersonID),
FOREIGN KEY (PersonID) REFERENCES Person(PersonID ));

Then one person can have a zillion phone numbers (or none), multiple
cell numbers,etc. And I can query the two tables for whatever I want
with a simple join.

SELECT P.FirstName, P.LastName, T.PhoneNo, T.NumberType
FROM Person P, TelNumbers T
WHERE P.PersonID=T.Pe rsonID
AND...

(yeah, I know, it's Oracle-flavor SQL, but it's easier to understand
sometimes than all that INNER JOIN stuff.)
Nov 13 '05 #2
It is perfectly understood thank you.
So I see that this trend of creating lookup-lists is not really thought of
as a good idea. I post the same question on comp.databases. theory and got
the same response from other guys.
Thanks Pieter,

Konstantinos

"Pieter Linden" <pi********@hot mail.com> wrote in message
news:bf******** *************** ***@posting.goo gle.com...
"Kostas" <no*****@noemai l.net> wrote in message
news:<10******* ******@corp.sup ernews.com>...
Hi all,

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
1647
by: Steve Jorgensen | last post by:
I've come up with this issue in several apps now. There are things that, from one perspective, are all handled the same, so it would be desirable that they all be handled in the same table with some field as a type specification. From other perspective of foreign key relationships, however, they are different things and can't be stored in the same table. For example, I have a scheme for indicating mappings between dimension records at...
7
1694
by: Adrian | last post by:
Normalization Question - Please bear with me, hopefully things will be clear at the end of the question. Given a treaty table containg treaties; Treaty1, Treaty2 etc and a benefit table; Benefit1, Benefit2 etc. A treaty can only have certain benefits:- For example Treaty 1 can process Benefit1 and Benefit2. To maintain this relationship a new table TreatyBenefit has been
3
3165
by: JoeB | last post by:
I found an interesting thread on this from Nov., 2000, but it didn't fully answer my question. I understand normalization, but am trying to find the line between good database design and personal preference. I'm wondering if I've created too many tables. Normalization as I understand it would be to create tables if a field can have more than one occurrance (for example, book titles by an author). But if a field will only have one value,...
4
1785
by: Catherine Jo Morgan | last post by:
I'm wondering if I'm trying to normalize data way beyond what will prove practical. For example, if I put People, Addreses, and Comms in 3 different tables, with junction tables for People/Addresses and People/Comms, then will the data entry form for new contacts have to be in form, subform, subsub form and possibly more subs? If my table structure is split so much that a common data entry form has fields bound to 8 or 10 different...
7
2448
by: John Welch | last post by:
I have three tables and the way they are currently set up violates good normalization, but I'm having trouble figuring out a better way. Can someone suggest a more elegant solution? My tables are: tblCompanies: CompanyID - PK other fields like address, type of business, etc
20
6903
by: hippomedon | last post by:
Hello everyone, I'm looking for some advice on whether I should break the normalization rule. Normally, I would not consider it, but this seems to be a special case. I have created an "Outcomes Database" used to store response data from measures/ questionnaires for a longitudinal health study. It is essentially derived from Duane Hookom's Survey Database (thanks Duane!!!), with many modifications added to fit the needs of my lab.
36
2910
by: Shraddha | last post by:
What is mean by normalization of pointers...Where we use that?
1
2017
by: weird0 | last post by:
I know that is not the appropriate group for asking this question, but I do not know of any better forum. Can anyone plz explain clearly what normalization is? The first three normal forms upto 3NF and BCNF. I know the first one but the remaining ones are really confusing. The language changes dramatically into functional dependencies x---y, all that, and normalization, the real topic is lost in between. Decent explanation or good...
22
2445
by: sophia | last post by:
Dear all, can any one explain what is meant by pointer normalization given here:- http://c-faq.com/ansi/norml.html
0
7959
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7883
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8263
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
6677
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5842
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3876
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2393
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1492
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.