473,769 Members | 6,838 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

One-to-one relationships as feedback

I have an mdb with a *projects* table. I also have a *timecode*
table.

Projects and timecodes are related by a one-to-one relationship but I
do not want to simply add the timecode field to my projects table for
the following reasons:

-Not all projects have a timecode
-Not all timecodes have a project initially.

The timecodes table can be viewed as a pool of codes. We add a series
of available codes to the table and assign them to projects as time
goes by. When we're out, we add more.

I thus would like to be able to assign a timecode to a project from
the projects table. This is easily done. The tricky part is:

I would like there to be some of way to feedback this assignment to
the timecode table in such a way that it is possible to open up the
timecode table and see which codes have been assigned and which ones
are still available.

I'm looking for a simple way of implementing this. I'm not using
forms or anything fancy. Users of my db will simply edit tables
manually. I'm basically building something between an excel
spreadsheet and a full scale db with ui.

Many thanks for considering this.

Many thanks.

Jun 21 '07 #1
5 1495
On Thu, 21 Jun 2007 18:20:40 -0000, Shogun <ar***********@ gmail.com>
wrote:
>I have an mdb with a *projects* table. I also have a *timecode*
table.

Projects and timecodes are related by a one-to-one relationship but I
do not want to simply add the timecode field to my projects table for
the following reasons:

-Not all projects have a timecode
-Not all timecodes have a project initially.

The timecodes table can be viewed as a pool of codes. We add a series
of available codes to the table and assign them to projects as time
goes by. When we're out, we add more.

I thus would like to be able to assign a timecode to a project from
the projects table. This is easily done. The tricky part is:

I would like there to be some of way to feedback this assignment to
the timecode table in such a way that it is possible to open up the
timecode table and see which codes have been assigned and which ones
are still available.

I'm looking for a simple way of implementing this. I'm not using
forms or anything fancy. Users of my db will simply edit tables
manually. I'm basically building something between an excel
spreadsheet and a full scale db with ui.

Many thanks for considering this.

Many thanks.
Jun 22 '07 #2
On Thu, 21 Jun 2007 18:20:40 -0000, Shogun <ar***********@ gmail.com>
wrote:

I'm not sure those are good reasons to not keep the timecode in the
projects table. Say you have a Customers table. You don't know the
FirstName of every Customer. Taking your logic I could create a
FirstNames table and only store those FirstNames there that I know. If
you read up on Normal Forms this actually has a name, and it's not
often used in the business productivity apps that Access is targeted
for.
The much simpler solution is to have FirstName as a not-required
field, or TimeCode as a not-required field.

You say "When we are out, we add more". Perhaps they could be
generated programmaticall y? If yes, one could be generated at the very
moment it is needed, so you would no longer need a timecodes table.

If it can be generated, it's even debatable whether it should be
stored: there are database design rules against storing calculated
data, but that's out of scope of this posting.

I understand you currently have a timecodes table with a single field:
TimeCode. If that is so, you don't have a 1:1 relationship (but rather
two standalone unrelated tables); that would require a second field:
ProjectID (not required). If you have ProjectID in your table, the
question of "which codes have been assigned" is easily answered: the
records with a ProjectID.

You should really rethink this idea of allowing users in your tables.
It is very much frowned upon (I'm sure you can understand why, or
google for it)

-Tom.

>I have an mdb with a *projects* table. I also have a *timecode*
table.

Projects and timecodes are related by a one-to-one relationship but I
do not want to simply add the timecode field to my projects table for
the following reasons:

-Not all projects have a timecode
-Not all timecodes have a project initially.

The timecodes table can be viewed as a pool of codes. We add a series
of available codes to the table and assign them to projects as time
goes by. When we're out, we add more.

I thus would like to be able to assign a timecode to a project from
the projects table. This is easily done. The tricky part is:

I would like there to be some of way to feedback this assignment to
the timecode table in such a way that it is possible to open up the
timecode table and see which codes have been assigned and which ones
are still available.

I'm looking for a simple way of implementing this. I'm not using
forms or anything fancy. Users of my db will simply edit tables
manually. I'm basically building something between an excel
spreadsheet and a full scale db with ui.

Many thanks for considering this.

Many thanks.
Jun 22 '07 #3
We get the new codes from another database and do not have control
over what they will be.

This mdb is for a team of 4 engineers familiar with SQL so I'm not
worried about leaving the tables open. We're currently using Excel
and the complexity is such that although the solution is usable, it's
not very practical.

I understand that what I'm doing is trying to solve a data-
presentation problem by modifying the data-model and how "bad" this is
but it's probably the quickest way for me to solve this. If this was
more important or if I had more time, I'd build a real db app. I'm
just trying to cut corners here.

Maybe I should just learn how to use Excel as a front-end for Access.

Thanks for your input. Let me know what you'd do.

Jun 22 '07 #4
"Shogun" <ar***********@ gmail.comwrote in message
<11************ *********@d30g2 000prg.googlegr oups.com>:
I have an mdb with a *projects* table. I also have a *timecode*
table.

Projects and timecodes are related by a one-to-one relationship but I
do not want to simply add the timecode field to my projects table for
the following reasons:

-Not all projects have a timecode
-Not all timecodes have a project initially.

The timecodes table can be viewed as a pool of codes. We add a
series of available codes to the table and assign them to projects as
time goes by. When we're out, we add more.

I thus would like to be able to assign a timecode to a project from
the projects table. This is easily done. The tricky part is:

I would like there to be some of way to feedback this assignment to
the timecode table in such a way that it is possible to open up the
timecode table and see which codes have been assigned and which ones
are still available.

I'm looking for a simple way of implementing this. I'm not using
forms or anything fancy. Users of my db will simply edit tables
manually. I'm basically building something between an excel
spreadsheet and a full scale db with ui.

Many thanks for considering this.

Many thanks.
If you wish to pursue this from a RI/1:1 relationship point of view,
then I think there are at least two types of 1:1 relationships,
asymmetric and symmetric. To play with it, consider table A and table
B.

Asymmetric – here there will be a “main table” (A) and a referencing
table (B). The main table will contain all records, say employees, and
the referencing table, might contain far fewer records (say information
about some few employees who need some special certifications to do
their jobs). The usual construct, would be to have the primary key from
the referenced table be the foreign key (and primary key) of the
referencing table.

One A may relate to zero or one B
One B relates to one and only one A

The relationship is created with RI where the fields on both sides are
indexed without dupes.

This is the most common, if such term can be used on 1:1 relationships,
of 1:1 relationships.

Symmetric – which this seems to be, both tables are “equal” in the
relationship.

One A may relate to zero or one B
One B may relate to zero or one A.

Same as with M:N relationship, this can’t be implemented directly in
the
database, but will need a junction table. The difference between
resolving a symmetric 1:1 relationship vs resolving a M:N relationship,
is that when resolving the symmetric 1:1 relationship, one does so by
creating two asymmetric 1:1 relationships.

I e, in the junction table AB, the primary key of both table A and
table
B is present, both constrained UNIQUE NOT NULL (Indexed, no dupes,
required, no ZLS). In effect this will allow for projects without
timecode and timecodes without projects, and only the projects having a
timecode and timecodes assigned to project will be found in this
junction table. An outer join between the junction table and the
timecode table should give you the available timecodes, and RI will
prevent assigning of timecodes to projects where either the timecode is
alredy used or it doesn’t exist in the timecode table.

One might argue that this approach is a wee bit academic/theoretic, but
I think it should resolve the issue you’re working with.

--
Roy-Vidar
Jun 22 '07 #5
I have a 2 tables one is a list of available Cost codes "tblCostCod e" the
other is a Job / Cost Code table "tblJobCost " that list cost codes assigned
to the job. When a user wants to add a new cost code to the job I use the
following query to show only unassigned codes.

SELECT DISTINCTROW tblCostCode.* FROM tblCostCode WHERE (((tblCostCode. Code)
Not In (SELECT tblJobCost.Code FROM tblJobCost WHERE
(((tblJobCost.J ob="JobNumber") );))) ORDER BY tblCostCode.Cod e;

Something similar should work for you application.
"Shogun" <ar***********@ gmail.comwrote in message
news:11******** *************@d 30g2000prg.goog legroups.com...
I have an mdb with a *projects* table. I also have a *timecode*
table.

Projects and timecodes are related by a one-to-one relationship but I
do not want to simply add the timecode field to my projects table for
the following reasons:

-Not all projects have a timecode
-Not all timecodes have a project initially.

The timecodes table can be viewed as a pool of codes. We add a series
of available codes to the table and assign them to projects as time
goes by. When we're out, we add more.

I thus would like to be able to assign a timecode to a project from
the projects table. This is easily done. The tricky part is:

I would like there to be some of way to feedback this assignment to
the timecode table in such a way that it is possible to open up the
timecode table and see which codes have been assigned and which ones
are still available.

I'm looking for a simple way of implementing this. I'm not using
forms or anything fancy. Users of my db will simply edit tables
manually. I'm basically building something between an excel
spreadsheet and a full scale db with ui.

Many thanks for considering this.

Many thanks.

Jun 22 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
3027
by: Ed | last post by:
I am running Access 2002 and just ran the built in Access wizard for splitting a database into a back end (with tables) and front end (with queries, forms, modules, etc.). After running the wizard, I opened the table relationship view and noticed that all the relationships are missing. Is this supposed to happen? If so, why? I've noticed that queries are behaving strangely now, seemingly because the relationships are not established....
0
1481
by: Megan | last post by:
Hi Everybody- I know that this is a really, really long post, but I wanted to try to give you as much background as possible. So here's a quick overview of the issues I'm asking for help with: 1.) I'm trying to create a many to many relationship, and I get the following Error when I try to enforce referential integrity.
2
4147
by: Max | last post by:
Hi. I really hope someone can help me. Going slowly insane with this problem. I have a two Access 2000 databases. One is the backend containing tables and some admin queries. The other is the front end with forms / queries and links to the tables in the back end. From the Relationships window I selected File / Print Relationships. The resulting report shows relationships that are not displayed in the relationships window. Some of...
7
2124
by: davegb | last post by:
I'm totally new to relational database design. My boss has asked me to create a database of information on the employees in our group. Seemed to me like a simple application to learn the ropes. A couple of things are confusing me. The first is "Relationships" and "Joins". Are they different names for the same thing? If not, what is the difference? I have a copy of the Access 2000 Bible, and it says, "When you create a relationship between...
10
7032
by: Dixie | last post by:
I need to delete some relationships in code. How do I know what the names of those relationships are?
45
3423
by: salad | last post by:
I'm curious about your opinion on setting relationships. When I designed my first app in Access I'd go to Tools/Relationships and set the relationships. Over time I'd go into the window and see relationship spaghetti....tables/queries all overthe place with lots of relationship lines between here and there. After that first app I didn't do relationships. If I had a query, I defined the relationship. Many of the times when I create a...
3
2539
by: mark.szretter | last post by:
Relationships between tables disappear without explanation in the database diagram using SQL Server 2005. Many thanks for any thoughts/questions on the topic!
2
7967
by: Neil Patterson | last post by:
Hello, After preparing a relationships diagram I select 'Relationship Report'. The only response is the feedback 'The command you specified is not available in an .mde, .accde, or .ade database.' Anyone know how to enable this feature? .../neil patterson
13
2078
by: ARC | last post by:
Hello all, Prior to going live with my app, I have questions on relationships theory. My prior app was done in Access 97, and I did NOT use relationships at all. I have 65 tables in my back-end database, and with Access 97, if you added relationships, it would add multiple copies of the same relationships over and over, so I decided not to use any relationships at all. Additionally, when I needed to add or remove fields via code, it...
0
9589
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, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9423
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
10222
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
10050
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...
1
9999
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,...
0
9866
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
8876
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 projectplanning, coding, testing, and deploymentwithout 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...
1
3967
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
2
3570
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.