It is currently Thu Oct 31, 2024 7:10 pm



Reply to topic  [ 5 posts ] 
database design: input mask 
Author Message
Minor Diety
User avatar

Joined: Fri Apr 11, 2003 2:17 pm
Posts: 7721
Location: Centre of the sun
Reply with quote
Post database design: input mask
Hello.

How do i CREATE an input mask in MS Access so that the field must have 3 integers followed by either MB, GB?

Basically i need a field that cointains the size/capacity of a computer component like a HD or a stick-o-RAM.

Any ideas?

Thanks.

p.s. so fare all i can design is "999LL" which means 3 numbers and 2 letters.


Thu Feb 05, 2004 3:39 am
Profile
Duke
User avatar

Joined: Mon Mar 31, 2003 8:59 am
Posts: 1358
Location: right behind you
Reply with quote
Post 
I would pick one size, and stick to it. You are asking for trouble if you allow different unit sizes in the same column. That would also removed the need to have a unit on the end at all.


Thu Feb 05, 2004 7:05 am
Profile YIM WWW
Minor Diety
User avatar

Joined: Fri Apr 11, 2003 2:17 pm
Posts: 7721
Location: Centre of the sun
Reply with quote
Post 
one size as in "999XX"?


Thu Feb 05, 2004 10:21 am
Profile
Duke
User avatar

Joined: Mon Mar 31, 2003 8:59 am
Posts: 1358
Location: right behind you
Reply with quote
Post 
I would store just the number. Then you can either remember that it is GB, or put that in the col name. Such as: table_memory_gb or table_memory_mb. It's kind of hard to say without seeing your entire scheme. It could be that your data is not properly normalized.

Regardless, you should never have mixed units in the same field. You should store the data in a fixed format, and the alter how it is displayed (not how it is stored). Hope that makes sense.

This kind of stuff is a pain in the ass with access. :( In PHP, you could easily take the number, do a test to see whether it's size would be better displayed in GB or MB, and then display it appropriately. You can still do that with access, but you have to dig into the VB of the report.


Thu Feb 05, 2004 11:35 am
Profile YIM WWW
Minor Diety
User avatar

Joined: Fri Apr 11, 2003 2:17 pm
Posts: 7721
Location: Centre of the sun
Reply with quote
Post 
Pig wrote:
It could be that your data is not properly normalized.


How dare you! My DB is fully normalised to 3rd Normal Form.

If i create a new field ("mb_or_gb") then this would cause the renound problem of "repeating fields" which is bad database design practice.

In any case i seem to be developing a solution with VB coding.


Fri Feb 06, 2004 12:48 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.