473,399 Members | 2,278 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Sub Tables

In my client database, I have a table for client names and another for file information. They are linked through the client ID. There is one file ID for each item in a client's file, but a client's file could contain many files, or none at all. It is possible for a file ID to be used multiple times, but only once per client. (ie: Client A001 and client Y017 might both have a file that has an ID number of 01. I was thinking of "joining" the two (they're already linked in a relationship), but I'm unsure. Any help will be appreciated.
Aug 21 '07 #1
11 2287
Scott Price
1,384 Expert 1GB
Hi unclesteve,

Could you post the meta data of your tables in this kind of a format:

Expand|Select|Wrap|Line Numbers
  1. table1
  2. CustID AutoNumber PK
  3. CustFName  Text
  4. CustLName Text
  5. FileID FK
etc?

This will give a little better idea of what you have and what you want to have!

Regards,
Scott
Aug 21 '07 #2
Hi unclesteve,

Could you post the meta data of your tables in this kind of a format:

Expand|Select|Wrap|Line Numbers
  1. table1
  2. CustID AutoNumber PK
  3. CustFName  Text
  4. CustLName Text
  5. FileID FK
etc?

This will give a little better idea of what you have and what you want to have!

Regards,
Scott
Client_Table

Client Key AutoNumber PK
Client ID Text
ClientIs_Entity Y/N
Client_PriName text
Client_SecName text

File_Table

File_Key PK
File_ID number
File_Description text
File_boxed Y/N
File_Destroy Y/N
Client Linked to Client_ID
File_Status_FK FK, linked to Status_Table
File_Location_FK FK, linked to Location_Table
Box_Key Linked to Box_Table
Aug 21 '07 #3
Scott Price
1,384 Expert 1GB
From your description, it sounds like you are having a little naming trouble with what really is a file. If I understand you correctly, each file will contain many items? Each client may be associated with more than one file, each file may contain more than one item?

Rather than joining the two tables (I consider that would be the wrong approach), you should create another table to hold the items that will be associated with the files.

A sample of the data you have entered in the tables would help clarify the case also.

Regards,
Scott
Aug 21 '07 #4
From your description, it sounds like you are having a little naming trouble with what really is a file. If I understand you correctly, each file will contain many items? Each client may be associated with more than one file, each file may contain more than one item?

Rather than joining the two tables (I consider that would be the wrong approach), you should create another table to hold the items that will be associated with the files.

A sample of the data you have entered in the tables would help clarify the case also.

Regards,
Scott
Scott:

I can see where the confusion comes in. I'm using the table names that the office administrator gave me. Personally, I would prefer "item" to the term "file". Yes, each client will have a number of different "items" in each client's file folder (that's probably a bad term to use, too). And each client's folder could have items with the same code as another client.

So far I've just been making up test data. Eventually the whole thing will be the front end (Probably another imprecise term. I would eventually be splitting the whole thing into a front end and a back end so that the end users wouldn't be able to mess with the tables and queries) for an Excel database that they already have built up. Hope this helps out. Thanks for your time.



Steve
Aug 22 '07 #5
Scott Price
1,384 Expert 1GB
Scott:

I can see where the confusion comes in. I'm using the table names that the office administrator gave me. Personally, I would prefer "item" to the term "file". Yes, each client will have a number of different "items" in each client's file folder (that's probably a bad term to use, too). And each client's folder could have items with the same code as another client.

So far I've just been making up test data. Eventually the whole thing will be the front end (Probably another imprecise term. I would eventually be splitting the whole thing into a front end and a back end so that the end users wouldn't be able to mess with the tables and queries) for an Excel database that they already have built up. Hope this helps out. Thanks for your time.



Steve
A couple test questions might help point us in the right direction :-)

Using their nomenclature:

Can one client be associated with more than one file folder?

Can more than one client be associated with the same file folder?

Can a file be associated with more than one file folder?

Can more than one file be associated with the same file folder?

Can more than one client be associated with more than one file? (i.e. can 2 clients be associated with one file?)

It looks to me like you've really got three subjects (i.e. tables) here... Clients, File Folders, and Files.

The above questions should clarify the One to Many relationships that exist between the three.

If the last question is true, then you have a Many to Many relationship between Clients and Files, and that would require a third table to link the two, or break the Many to Many down into two One to Many relationships.

Regards,
Scott
Aug 22 '07 #6
A couple test questions might help point us in the right direction :-)

Using their nomenclature:

Can one client be associated with more than one file folder?

Each client can have zero, one, or several "files" associated with it. Each file/item is one piece of correspondence, or a contract, etc. (This is a law firm)

Can more than one client be associated with the same file folder?

No. Different clients can have a file/item with the same number, but the numbers do not consistently relate to a type of item (ie: will).

Can a file be associated with more than one file folder?

As they use it, they are the same: a file/item is a thing unto itself, hence your confusion.

Can more than one file be associated with the same file folder?

Each file/item is one thing: a will, correspondence, articles of incorporation.

Can more than one client be associated with more than one file? (i.e. can 2 clients be associated with one file?)

No. Although two clients can have a file/item with the same number, each item is only associated with one client.

It looks to me like you've really got three subjects (i.e. tables) here... Clients, File Folders, and Files.

The above questions should clarify the One to Many relationships that exist between the three.

If the last question is true, then you have a Many to Many relationship between Clients and Files, and that would require a third table to link the two, or break the Many to Many down into two One to Many relationships.

Regards,
Scott
I hope that this clears up my murky previous posts and heads me towards solving this one problem. (Yes, there are others)

steve
Aug 22 '07 #7
Scott Price
1,384 Expert 1GB
I hope that this clears up my murky previous posts and heads me towards solving this one problem. (Yes, there are others)

steve

Hi Steve,

Looking at the way they use their nomenclature is a little confusing! However, the way you have explained it makes it seem more clear that you have a One to Many relationship between Clients and Files. Something still nags at me about that situation, but it's not coming to the surface at the moment!

Having a One to Many relationship means you need two tables, and to answer your first question, then: no, you shouldn't join(make one table out of two), however, yes you should join(create a relationship between the two). The relationship should be: Client_Key FK field in the File table linked to Client_Key PK field in the Client table.

Regards,
Scott
Aug 22 '07 #8
Scott Price
1,384 Expert 1GB
Part of the problem that was nagging at me is that you have two ID fields. The _Key field and the _ID field.

I understand that you have to use their system of numbering their ID fields, and am assuming that you added the _Key field to uniquely identify each record in the tables. Just remember that when creating the relationships you will need to join the tables on the _Key (unique) field rather than the _ID (non-unique) field!

Regards,
Scott
Aug 22 '07 #9
Part of the problem that was nagging at me is that you have two ID fields. The _Key field and the _ID field.

I understand that you have to use their system of numbering their ID fields, and am assuming that you added the _Key field to uniquely identify each record in the tables. Just remember that when creating the relationships you will need to join the tables on the _Key (unique) field rather than the _ID (non-unique) field!

Regards,
Scott
Thank you. I'll plow back into this and let you know how I do.
Aug 22 '07 #10
Part of the problem that was nagging at me is that you have two ID fields. The _Key field and the _ID field.

I understand that you have to use their system of numbering their ID fields, and am assuming that you added the _Key field to uniquely identify each record in the tables. Just remember that when creating the relationships you will need to join the tables on the _Key (unique) field rather than the _ID (non-unique) field!

Regards,
Scott
It seems to be working okay. Thanks for your help
Aug 22 '07 #11
Scott Price
1,384 Expert 1GB
It seems to be working okay. Thanks for your help
Glad I could help, Steve.

Regards,
Scott
Aug 23 '07 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

44
by: Mariusz Jedrzejewski | last post by:
Hi, I'll be very grateful if somebody can explain me why my Opera 7.23 (runing under linux) doesn't show me inner tables. Using below code I can see only "inner table 1". There is no problem with...
3
by: Random Person | last post by:
Does anyone know how to use VBA to relink tables between two MS Access databases? We have two databases, one with VBA code and the other with data tables. The tables are referenced by linked...
11
by: dskillingstad | last post by:
I've been struggling with this problem for some time and have tried multiple solutions with no luck. Let me start with, I'm a novice at Access and I'm not looking for someones help to design my...
2
by: Jill Elaine | last post by:
I am building an Access 2002 frontend with linked tables to an encrypted Paradox 7 database. When I first create these linked tables, I'm asked for the password to the encrypted Paradox database,...
1
by: Shelby | last post by:
Problem: My company generates its own data export from a propietary database. These (free) tables can be read in C#.NET using a Visual FoxPro driver (vfpoledb). I can read each of the six tables...
59
by: phil-news-nospam | last post by:
In followups by Brian O'Connor (ironcorona) to other posts, he repeats the idea that using tables in CSS is not something that should be done because IE doesn't support it. Of course I'm not happy...
5
by: rdemyan via AccessMonster.com | last post by:
I have a need to add another field to all of my tables (over 150). Not data, but an actual field. Can I code this somehow. So the code presumabley would loop through all the tables, open each...
4
by: db2admin | last post by:
Hello, I want to plan rearranging tables in our database according to business areas. say all tables in business area A will be in seperate tablespace or tablespaces. I am planning to monitor...
25
by: bubbles | last post by:
Using Access 2003 front-end, with SQL Server 2005 backend. I need to make the front-end application automatically refresh the linked SQL Server tables. New tables will be added dynamically in...
11
by: shriil | last post by:
Hi I have this database that calculates and stores the incentive amount earned by employees of a particular department. Each record is entered by entering the Date, Shift (morn, eve, or night)...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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 project—planning, coding, testing,...
0
isladogs
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...

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.