Hi Newsgroup
Does anyone here care to share their thoughts/experiences with using
masking? I am storing categories of books which libraries stock, so that I
might have codes:
015-000-000 = Languages
015-001-000 = European languages
015-001-001 = English
015-001-002 = German
015-001-003 = French
....
etc
This lets me use criteria such as LIKE "015-001-???" when I want to find
libraries which have books on any European language.
Typically, I use non-meaningful autonumber ID columns for a primary key so I
might have:
tblLibraries: LibID, LibName, LibAddress, etc
tblSubjects: SubID, SubName, SubMask
tblLibrarySubje cts: LibID, SubID (the junction table)
However, if I simply store the SubID in the junction table, I will always
need to have a query using a join from the subjects table if I need LIKE
"015-001-???". I could use this mask as the primary key in the subjects
table and save myself a join. Another benefit might be that by enforcing
cascade updates, re-classifying a subject would be easier - eg I could
change its place in the hierarchy. What do you think? Also, should the
junction table have its own PK if the 2 primary keys from the other tables
already form a unique index?
Thanks for any thoughts 6 2005
For the lookup table of languages, there is no need to use an AutoNumber,
because this key field uniquely describes the record. A Text primary key is
fine.
I would suggest that you omit the dashes from the key and store only the
numbers, because:
- the dashes are not part of the data, and
- Access 2000 and later handle the dashes inconsistently.
You can use an Input mask to display the field with dashes.
Alternatively, use 3 separte Number fields so the data is atomic and may be
more efficient. A multi-field key works fine, though this might get
cumbersome if you then needed to use it also into further generations of
grandchild relations.
BTW, it's a matter of style, but I often use a 24-char text field as the
primary key for lookup fields such as categories. Not only is the natural
key simpler, but you can leave the bound key visible, which circumvents the
problems associated with filtering the RowSource of combos in continuous
forms.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Stefan Kowalski" <a@b.com> wrote in message
news:ct******** **@hercules.bti nternet.com... Hi Newsgroup Does anyone here care to share their thoughts/experiences with using masking? I am storing categories of books which libraries stock, so that I might have codes:
015-000-000 = Languages 015-001-000 = European languages 015-001-001 = English 015-001-002 = German 015-001-003 = French ... etc This lets me use criteria such as LIKE "015-001-???" when I want to find libraries which have books on any European language.
Typically, I use non-meaningful autonumber ID columns for a primary key so I might have:
tblLibraries: LibID, LibName, LibAddress, etc tblSubjects: SubID, SubName, SubMask tblLibrarySubje cts: LibID, SubID (the junction table)
However, if I simply store the SubID in the junction table, I will always need to have a query using a join from the subjects table if I need LIKE "015-001-???". I could use this mask as the primary key in the subjects table and save myself a join. Another benefit might be that by enforcing cascade updates, re-classifying a subject would be easier - eg I could change its place in the hierarchy. What do you think? Also, should the junction table have its own PK if the 2 primary keys from the other tables already form a unique index?
Thanks for any thoughts
Allen Browne wrote: - Access 2000 and later handle the dashes inconsistently.
Hi Allen...could you elaborate on this? I usually don't care when using
dashes in SocialSecurity number, maybe phone numbers since I am not
worried about diskspace. Besides, both are text fields. But if there
is a problem, I wouldn't want to make my life work harder.
See:
ACC2000: Query Returns no Records with an Indexed Field That Contains
Dashes
at: http://support.microsoft.com/default...b;en-us;271661
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Salad" <oi*@vinegar.co m> wrote in message
news:3D******** ********@newsre ad3.news.pas.ea rthlink.net... Allen Browne wrote:
- Access 2000 and later handle the dashes inconsistently.
Hi Allen...could you elaborate on this? I usually don't care when using dashes in SocialSecurity number, maybe phone numbers since I am not worried about diskspace. Besides, both are text fields. But if there is a problem, I wouldn't want to make my life work harder.
"Allen Browne" <Al*********@Se eSig.Invalid> wrote in message
news:41******** *************** @per-qv1-newsreader-01.iinet.net.au ... See: ACC2000: Query Returns no Records with an Indexed Field That Contains Dashes at: http://support.microsoft.com/default...b;en-us;271661
-- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org.
"Salad" <oi*@vinegar.co m> wrote in message news:3D******** ********@newsre ad3.news.pas.ea rthlink.net... Allen Browne wrote:
- Access 2000 and later handle the dashes inconsistently.
Hi Allen...could you elaborate on this? I usually don't care when using dashes in SocialSecurity number, maybe phone numbers since I am not worried about diskspace. Besides, both are text fields. But if there is a problem, I wouldn't want to make my life work harder.
Hi Allen
I'm replying under this post because your original answer is not showing via
this newsreader, although I did read it via Google. Just to say thanks and
that I will implement your recommendations .
[posted and mailed]
"Allen Browne" <Al*********@Se eSig.Invalid> wrote in
news:41******** *************** @per-qv1-newsreader-01.iinet.net.au
: See: ACC2000: Query Returns no Records with an Indexed Field That Contains Dashes at: http://support.microsoft.com/default...d=kb;en-us;271 661
--
Bob Quintal
PA is y I've altered my email address. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Piotr |
last post by:
Please help me, I can't solve this problem:
I have domain:
www.main_domain.com/index.php?userid=23¶metr1=2¶metr2=3
(and other site files like
www.main_domain.com/page1.php?userid=23&otherparameter=32
www.main_domain.com/page2.php?userid=23&otherparameter=11 etc.)
At this address there is an template site for many users. Personal site
is identified by userid.
|
by: Ginchy |
last post by:
I have uploaded a small 3 page web using MS Publisher 2003 and after
uploading I switched on url masking to cloak the url.
I am certain that it worked fine.
I simply changed the colour scheme in Publisher and reuploaded the page. The
links no longer work?
When I switch off url masking it works as it should?
|
by: john sutor |
last post by:
Is there a way in C# to add masking (for a date format) to a textbox?
|
by: Dana Epp |
last post by:
I have a ToolBarButton that when I set it to disabled (button.Enabled =
false;) causes a really ugly gray masking effect to take place. This is
normal and the intended way of the button, but I would like to clean it up.
Instead of using the gray mask, I want to use my own grayscaled high quality
image. I thought by simply setting button.ImageIndex = new_num; (where
new_num is the index of the grayscale image) I could do this. But alas, that...
|
by: Brian Keating EI9FXB |
last post by:
Hello there,
Does anyone know how to to Bitmap masking in .NET,
In c++ i used,
CreateCompatibleDC
GetBitmap
Then on the bitmap and the bitmap mask i called.
{SelectBitmap
StretchBlt}
| |
by: NBB |
last post by:
I can't figure this one out. Here's the situation, should be pretty
for the pros in here.
I have a ListBox that is populated with the DataTextField and
DataValueField flags of the DataSet. Everything populates just fine
and works great.
The DataTextField displays text from a database column called Path,
which is the absolute URL of a file. What I would like it to display
is just the filename, essentially trimming off everything...
|
by: Hai Nguyen |
last post by:
Hi All
I have a textbox want to mask as phone box. How can I do it?
Thanks
|
by: Daniel Smedegaard Buus |
last post by:
Hey all :)
I was wondering about the $error_types (I particularly notice the 's' suffix
when reading the manual) parameter for 'set_error_handler()':
Can be used to mask the triggering of the error_handler function just like
the error_reporting ini setting controls which errors are shown. Without
this mask set the error_handler will be called for every error regardless
to the setting of the error_reporting setting.
|
by: meghla |
last post by:
I can not understand how to implement bit masking on a c code?? while working with array it is taking too much time.................. so i need help.
i need some suggestion and sample code of C dealing with bit masking..............; its argent............. plz help me.
|
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
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...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
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...
| |