473,700 Members | 2,631 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 1479
"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
1652
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
1700
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
3173
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
1788
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
2456
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
6921
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
2940
by: Shraddha | last post by:
What is mean by normalization of pointers...Where we use that?
1
2024
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
2450
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
8731
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
8649
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
9219
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
9081
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
8931
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7819
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...
0
5904
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4660
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2032
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.