A Microsoft Office (Excel, Word) forum. OfficeFrustration

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   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Work Breakdown structure and normalization



 
 
Thread Tools Display Modes
  #1  
Old July 26th, 2006, 01:43 AM posted to microsoft.public.access.tablesdbdesign
Paolo
external usenet poster
 
Posts: 24
Default Work Breakdown structure and normalization

Hi,

I'm working with work breakdown structure codes: 1.0.1.123 or 1.23.32,
etc that seem to be very difficult to sort as text. So I broke them
down and converted them to integers into an array so that 1.0.1.123 as
text became

Array(0) = 1
Array(1) = 0
Array(2)= 1
Array(3)=123

as integer

Then I took the integer array and appended a table with its values and
sorted that way.

So on one table I have

Field 1 Field2 Field3 Field4 Field5
1.0.1.123 1 0 1 123

And Another table I have

Field 1 Field 2 Field3 Field4
1.0.0.123 More pertinent stuff etc.......

Obviously these two tables have a 1 to 1 relationship. Am I violating
any major laws of database design by going this way? Is there a better
way?

Thanks
Paolo



  #2  
Old July 26th, 2006, 11:48 AM posted to microsoft.public.access.tablesdbdesign
Jamie Collins
external usenet poster
 
Posts: 1,705
Default Work Breakdown structure and normalization


Paolo wrote:
I'm working with work breakdown structure codes: 1.0.1.123 or 1.23.32,
etc that seem to be very difficult to sort as text. So I broke them
down and converted them to integers

So on one table I have

Field 1 Field2 Field3 Field4 Field5
1.0.1.123 1 0 1 123

And Another table I have

Field 1 Field 2 Field3 Field4
1.0.0.123 More pertinent stuff etc.......

Obviously these two tables have a 1 to 1 relationship. Am I violating
any major laws of database design by going this way?


You are breaking a theoretical rule that says you shouldn't store the
results of a 'calculation' (being a concatenation in this case) but in
practice if it makes your SQL code easier write then it's worth
considering. I can see that it would be easier to verify that 1.0.1.123
and 1.0.01.123 are duplicate values with each element parsed out.

However, you must still ensure you have data integrity so make sure you
are not missing the validation rule (CHECK constraint) that ensures
Field 1 is indeed a concatenation of Fields 2 to 5 or the constraint
that ensures each concatenations is unique.

Oh, and in case it isn't obvious, you may want to review your use of
field names, especially where the data element name 'Field 2' changes
its meaning/pertinence depending on the table in which is appears.

Jamie.

--

  #3  
Old July 26th, 2006, 12:31 PM posted to microsoft.public.access.tablesdbdesign
Paolo
external usenet poster
 
Posts: 24
Default Work Breakdown structure and normalization

Thanks Jamie,


Appreciate the response.


Paolo


Jamie Collins wrote:
Paolo wrote:
I'm working with work breakdown structure codes: 1.0.1.123 or 1.23.32,
etc that seem to be very difficult to sort as text. So I broke them
down and converted them to integers

So on one table I have

Field 1 Field2 Field3 Field4 Field5
1.0.1.123 1 0 1 123

And Another table I have

Field 1 Field 2 Field3 Field4
1.0.0.123 More pertinent stuff etc.......

Obviously these two tables have a 1 to 1 relationship. Am I violating
any major laws of database design by going this way?


You are breaking a theoretical rule that says you shouldn't store the
results of a 'calculation' (being a concatenation in this case) but in
practice if it makes your SQL code easier write then it's worth
considering. I can see that it would be easier to verify that 1.0.1.123
and 1.0.01.123 are duplicate values with each element parsed out.

However, you must still ensure you have data integrity so make sure you
are not missing the validation rule (CHECK constraint) that ensures
Field 1 is indeed a concatenation of Fields 2 to 5 or the constraint
that ensures each concatenations is unique.

Oh, and in case it isn't obvious, you may want to review your use of
field names, especially where the data element name 'Field 2' changes
its meaning/pertinence depending on the table in which is appears.

Jamie.

--


 




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Do I need help with normalization? smitj2 Database Design 5 June 4th, 2006 11:35 PM
Parameter query with multiple check boxes Aviator Running & Setting Up Queries 28 May 1st, 2006 06:19 PM
normalization question Ian Database Design 7 December 14th, 2005 06:21 PM
Can't figure out table structure and normalization Jonathan Brown Database Design 3 June 7th, 2005 07:05 PM
Table fields, normalization LReber New Users 1 December 30th, 2004 01:03 AM


All times are GMT +1. The time now is 02:09 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.