I have 3 tables: Message, Workgroup, and Hyperlink. Message has 1xM link
with Hyperlink and Workgroup has 1xM link with Hyperlink. Hyperlink has the
following fields:
IDhyperlink*
IDmessage
IDworkgroup
Name_Hyperlink
In most cases either IDmessage or IDworkgroup will have no value.
Is this a good approach or should I make 2 Hyperlink tables or...?
thanks,
john 18 2106
"john" <jo**@test.coms chreef in bericht news:zP******** ************@ca sema.nl...
>I have 3 tables: Message, Workgroup, and Hyperlink. Message has 1xM link
with Hyperlink and Workgroup has 1xM link with Hyperlink. Hyperlink has the
following fields:
IDhyperlink*
IDmessage
IDworkgroup
Name_Hyperlink
In most cases either IDmessage or IDworkgroup will have no value.
Is this a good approach or should I make 2 Hyperlink tables or...?
thanks,
john
In most cases the way you have linked the tables is a model of a many to many relationship between Message and Workgroup.
You would need a value for both message and workgroup in table Hyperlink.
In your case I think you might as well skip the table Hyperlink.
Just store the Name_Hyperlink in the tables (or maybe make 2 hyperlink tables indeed)
Just guessing because I don't know your specs...
Arno R
"Arno R" <ar***********@ tiscali.nlschre ef in bericht
news:45******** **************@ text.nova.plane t.nl...
>In your case I think you might as well skip the table Hyperlink. Just store the Name_Hyperlink in the tables (or maybe make 2 hyperlink tables indeed) Just guessing because I don't know your specs...
Thanks.
Just storing the Name_Hyperlink in the tables is not an option because one
Message can have more than one hyperlink. The same accounts for Workgroup. I
think I need to have 2 hyperlink tables, but I'd rather keep them in one
table. That's why I came up with the earlier mentioned solution.
john
"john" <jo**@test.coms chreef in bericht news:F5******** ************@ca sema.nl...
Thanks.
Just storing the Name_Hyperlink in the tables is not an option because one
Message can have more than one hyperlink. The same accounts for Workgroup. I
think I need to have 2 hyperlink tables, but I'd rather keep them in one
table. That's why I came up with the earlier mentioned solution.
john
After having 'consumed' this info IMO the best model is to use two hyperlink tables.
In general I think that allowing null in foreign keys is not a good idea. At least I try to avoid that.
So I do have problems with the 'no value' FK fields in your original solution...
Do a Google search on "allow null in FK" and you will find some interesting discussions and opinions about this issue.
Why the need to stick to one table ??
If needed you can use Union-query's to 'show' one 'table'.
Arno R
In article <zP************ ********@casema .nl>, jo**@test.com says...
I have 3 tables: Message, Workgroup, and Hyperlink. Message has 1xM link
with Hyperlink and Workgroup has 1xM link with Hyperlink. Hyperlink has the
following fields:
IDhyperlink*
IDmessage
IDworkgroup
Name_Hyperlink
In most cases either IDmessage or IDworkgroup will have no value.
Is this a good approach or should I make 2 Hyperlink tables or...?
thanks,
john
Perhaps this is a three-way relationship,
Workgroups is related to Hyperlinks 1 to Many,
Messages is related to Hyperlinks 1 to Many.
Workgroups
----------
workgroup_id PRIMARY KEY
and other columns
Messages
------------
message_id PRIMARY KEY
and other columns
Hyperlinks
-----------
hyperlink_id
workgroup_id
message_id
PRIMARY KEY (hyperlink_id,
workgroup_id,
message_id)
UNIQUE (workgoup_id,
message_id)
and other fields
I have seen this kind of relationship
discussed by others.
In article <MP************ ************@ne ws.psci.net>, gr******@psci.n et
says...
In article <zP************ ********@casema .nl>, jo**@test.com says...
I have 3 tables: Message, Workgroup, and Hyperlink. Message has 1xM link
with Hyperlink and Workgroup has 1xM link with Hyperlink. Hyperlink has the
following fields:
IDhyperlink*
IDmessage
IDworkgroup
Name_Hyperlink
In most cases either IDmessage or IDworkgroup will have no value.
Is this a good approach or should I make 2 Hyperlink tables or...?
thanks,
john
Perhaps this is a three-way relationship,
Workgroups is related to Hyperlinks 1 to Many,
Messages is related to Hyperlinks 1 to Many.
Workgroups
----------
workgroup_id PRIMARY KEY
and other columns
Messages
------------
message_id PRIMARY KEY
and other columns
Hyperlinks
-----------
hyperlink_id
workgroup_id
message_id
PRIMARY KEY (hyperlink_id,
workgroup_id,
message_id)
UNIQUE (workgoup_id,
message_id)
and other fields
I have seen this kind of relationship
discussed by others.
My previous example should not have the UNIQUE statement,
but it may be that you have 3 many-to-many relationships.
Message-Workgroup is M:M, Message-Hyperlink is M:M and
Hyperlink-Workgroup is M:M.
You have 3 tables and need 3 relationships to resolve them,
so, you need 6 tables.
"Mike Gramelspacher" <gr******@psci. netschreef in bericht
news:MP******** *************** *@news.psci.net ...
>>
My previous example should not have the UNIQUE statement,
but it may be that you have 3 many-to-many relationships.
Message-Workgroup is M:M, Message-Hyperlink is M:M and
Hyperlink-Workgroup is M:M.
You have 3 tables and need 3 relationships to resolve them,
so, you need 6 tables.
Thanks. I'll look into that.
john
In article <W5************ ********@casema .nl>, jo**@test.com says...
"Mike Gramelspacher" <gr******@psci. netschreef in bericht
news:MP******** *************** *@news.psci.net ...
>
My previous example should not have the UNIQUE statement,
but it may be that you have 3 many-to-many relationships.
Message-Workgroup is M:M, Message-Hyperlink is M:M and
Hyperlink-Workgroup is M:M.
You have 3 tables and need 3 relationships to resolve them,
so, you need 6 tables.
Thanks. I'll look into that.
john
Here is a small database where I tried to do multiple relations. http://www.psci.net/gramelsp/temp/Mu...s%20No%202.zip
This was just a learning thing, so take it for what it is worth.
>
"Mike Gramelspacher" <gr******@psci. netschreef in bericht news:MP******** *************** *@news.psci.net ...
My previous example should not have the UNIQUE statement,
but it may be that you have 3 many-to-many relationships.
OP stated he had two 1:M relationships
You have 3 tables and need 3 relationships to resolve them,
so, you need 6 tables.
Huh ????
Arno R
In article <45************ **********@text .nova.planet.nl >, ar***********@t iscali.nl says...
>
"Mike Gramelspacher" <gr******@psci. netschreef in bericht news:MP******** *************** *@news.psci.net ...
My previous example should not have the UNIQUE statement,
but it may be that you have 3 many-to-many relationships.
OP stated he had two 1:M relationships
You have 3 tables and need 3 relationships to resolve them,
so, you need 6 tables.
Huh ????
Arno R
Yes, but I inferred there could really be 3 relationships.
Maybe the inference was wrong. It happens regulary. I wonder
what entity is the recipient of these messages. A message
has a hyperlink that relates to a workgroup, but the message
itself does not. The workgroup does not need the message,
but only the hyperlink. OK. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Don Vaillancourt |
last post by:
Hello all,
Over the years as I design more database schemas the more I come up with
patterns in database design. The more patterns I recognize the more I
want to try to design some kind of generic design patterns that can be
used and shared amongst many sub-schemas.
For example, the grouping of entities. I may have the following tables:
employee, product and client. These tables have no direct relationship
with each other. But...
|
by: sk |
last post by:
I have an applicaton in which I collect data for different parameters
for a set of devices. The data are entered into a single table, each
set of name, value pairs time-stamped and associated with a device.
The definition of the table is as follows:
CREATE TABLE devicedata
(
device_id int NOT NULL REFERENCES devices(id), -- id in the device
|
by: Test User |
last post by:
Hi all, (please excuse the crosspost as I'm trying to reach as many people
as possible)
I am somewhat familiar with Access 2000, but my latest project has me
stumped. So, I defer to you experts.
I've been asked to create a Daily Log sheet to be distributed to some of our
clerks.
For each day, the clerk is to log tasks worked on for the day, (i.e worked
on the johnson account).
|
by: rodchar |
last post by:
Hey all,
I'm trying to understand Master/Detail concepts in VB.NET. If I do a data
adapter fill for both customer and orders from Northwind where should that
dataset live?
What client is responsible for instantiating the orders class? Would it be
the ui layer or the master class in the business layer?
thanks,
|
by: tshad |
last post by:
Many (if not most) have said that code-behind is best if working in teams -
which does seem logical.
How do you deal with the flow of the work?
I have someone who is good at designing, but know nothing about ASP. He can
build the design of the pages in HTML with tables, labels, textboxes etc.
But then I would need to change them to ASP.net objects and write the code
to make the page work (normally I do this as I go - can't do this...
| |
by: roN |
last post by:
Hi,
I'm creating a Website with divs and i do have some troubles, to make it
looking the same way in Firefox and IE (tested with IE7). I checked it with
the e3c validator and it says: "
This Page Is Valid XHTML 1.0 Transitional!" but it still wouldn't look the
same.
It is on http://www.dvdnowkiosks.com/new/theproduct.php scroll down and
recognize the black bottom bar when you go ewith firefox(2.0) which isn't
there with IE7. Why does...
|
by: JoeC |
last post by:
I have a question about designing objects and programming. What is the
best way to design objects? Create objects debug them and later if you
need some new features just use inhereitance. Often times when I
program, I will create objects for a specific purpose for a program and
if I need to add to it I just add the code.
|
by: |
last post by:
I have a question about spawning and displaying subordinate list controls
within a list control. I'm also interested in feedback about the design of
my search application. Lots of code is at the end of this message, but I
will start with an overview of the problem.
I've made a content management solution for my work with a decently
structured relational database system. The CMS stores articles. The CMS also
stores related items --...
|
by: neelsmail |
last post by:
Hi,
I have been working on C++ for some time now, and I think I have a
flair for design (which just might be only my imagination over-
stretched.. :) ). So, I tried to find a design certification, possibly
that involves C++, but, if not, C++ and UML. All I could find was Java
+ UML design certifications (one such is detailed on
http://www.objectsbydesign.com/tools/certification.html). Although UML
is expected to be language independent,...
|
by: indrawati.yahya |
last post by:
In a recent job interview, the interviewer asked me how I'd design
classes for the following problem: let's consider a hypothetical
firewall, which filters network packets by either IP address, port
number, or both. How should we design the classes to represent these
filters?
My answer was:
class FilterRule
{
|
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...
| |
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: 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...
| |