473,609 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Data in different tables.

Hi,

I have 5 tables:

main

data1

data2

data3

data4

Each table has the field "name".

In a form, I want to write data in the "name" field to all the tables at the
same time.

Is this possible without complicated programming?

Regards, Wilfried (Belgium)
Nov 13 '05 #1
17 2063
You could... but why? What data do data1-4 contain? Are they really
child tables of main?

Nov 13 '05 #2
On Thu, 30 Jun 2005 18:43:25 GMT, "Wilfried"
<wi************ ***@pandora.be> wrote:
Hi,

I have 5 tables:

main

data1

data2

data3

data4

Each table has the field "name".

In a form, I want to write data in the "name" field to all the tables at the
same time.

Is this possible without complicated programming?


Yes. It is extremely easy.

You remove the "name" field from each of the data tables and then you
only need to replace it once, in the main table.

Do a search in google on "normalization" . It will explain why you
will want to do it this way.

mike
Nov 13 '05 #3
mb******@pacbel l.net.invalid (Mike Preston) wrote in
news:42******** *********@news. INDIVIDUAL.NET:
On Thu, 30 Jun 2005 18:43:25 GMT, "Wilfried"
<wi************ ***@pandora.be> wrote:
Hi,

I have 5 tables:

main

data1

data2

data3

data4

Each table has the field "name".

In a form, I want to write data in the "name" field to all the
tables at the same time.

Is this possible without complicated programming?


Yes. It is extremely easy.

You remove the "name" field from each of the data tables and
then you only need to replace it once, in the main table.

Do a search in google on "normalization" . It will explain why
you will want to do it this way.

mike


What about if the "name" is the foreign key he wants to
propagate to the additional records?

--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #4
On Thu, 30 Jun 2005 23:03:31 GMT, Bob Quintal <rq******@sPAmp atico.ca>
wrote:
mb******@pacbe ll.net.invalid (Mike Preston) wrote in
news:42******* **********@news .INDIVIDUAL.NET :
On Thu, 30 Jun 2005 18:43:25 GMT, "Wilfried"
<wi************ ***@pandora.be> wrote:
Hi,

I have 5 tables:

main

data1

data2

data3

data4

Each table has the field "name".

In a form, I want to write data in the "name" field to all the
tables at the same time.

Is this possible without complicated programming?


Yes. It is extremely easy.

You remove the "name" field from each of the data tables and
then you only need to replace it once, in the main table.

Do a search in google on "normalization" . It will explain why
you will want to do it this way.

mike


What about if the "name" is the foreign key he wants to
propagate to the additional records?


Oh, gosh. Here we go again.

A pox on keys that have real world meaning. A pox I say.

mike
Nov 13 '05 #5
The table "main" contains the names and addresses.

tables "data1-4" are used to store data of 4 different contests

to make an overall calculation with the 4 data-tables, it is necessary that
they all contain the same names (with "0" in the other fields).

Now I do this myself, for each new name I open the 4 data-tables and type a
zero in the first field (the name is filled in automatically).

<pi********@hot mail.com> schreef in bericht
news:11******** **************@ g47g2000cwa.goo glegroups.com.. .
You could... but why? What data do data1-4 contain? Are they really
child tables of main?

Nov 13 '05 #6

Yes. It is extremely easy.

You remove the "name" field from each of the data tables and then you
only need to replace it once, in the main table.

Do a search in google on "normalization" . It will explain why you
will want to do it this way.

mike


I can't do that Mike, the tables are linked together with the "name"-field.

To make some calculations with the data-tables, it is necessary to have the
names in all four the tables

(even when there is no data in the other fields)

thanks anyway,

regards, Wilfried
Nov 13 '05 #7
mb******@pacbel l.net.invalid (Mike Preston) wrote in
news:42******** *********@news. INDIVIDUAL.NET:

What about if the "name" is the foreign key he wants to
propagate to the additional records?


Oh, gosh. Here we go again.

A pox on keys that have real world meaning. A pox I say.

mike


The O.P. would have the same problem updating a number into the
foreign key field of the four tables, whether it's a number or a
name

A pox on autonumbers and a pox on those who use them instead of
a significant primary key.

And I'm not saying that the primary key should not be a numeric
ID, just that it should never be an autonumber.

--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #8
"Wilfried" <wi************ ***@pandora.be> wrote in
news:Or******** **************@ phobos.telenet-ops.be:
The table "main" contains the names and addresses.

tables "data1-4" are used to store data of 4 different
contests

to make an overall calculation with the 4 data-tables, it is
necessary that they all contain the same names (with "0" in
the other fields).

Now I do this myself, for each new name I open the 4
data-tables and type a zero in the first field (the name is
filled in automatically).
What you need to do is go to the relationships view and set the
four "name" fields to relate to the name in your main table.
Mike Preston is correct in that you should assign a NameID field
to that table and use it instead, because you may occasionally
run into 2 John Smiths. There are 5 Robert Quintals in the local
phone directory.

Once you have your relationships, you set up a form to enter the
data in the main table, and you then add a subform for each of
the other four forms. The wizard should take care of
automatically populating the sub-tables.
<pi********@hot mail.com> schreef in bericht
news:11******** **************@ g47g2000cwa.goo glegroups.com.. .
You could... but why? What data do data1-4 contain? Are
they really child tables of main?



--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #9
> What you need to do is go to the relationships view and set the
four "name" fields to relate to the name in your main table.
Mike Preston is correct in that you should assign a NameID field
to that table and use it instead, because you may occasionally
run into 2 John Smiths. There are 5 Robert Quintals in the local
phone directory.

Once you have your relationships, you set up a form to enter the
data in the main table, and you then add a subform for each of
the other four forms. The wizard should take care of
automatically populating the sub-tables.


Why didn't I think of that ;-)

It's so simple and I think you are absolutely right.

I'm going to try it out as soon as possible.

Many thanks to all of you.

Wilfried.
Nov 13 '05 #10

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

Similar topics

8
8346
by: Ilan | last post by:
Hi all I need to add data from two Excel sheets (both on the same workbook) to an existing table in my SQL DB. The problem is that each sheet holds different fields for the same record, though the records are sorted by row numbers. (I had to split the fields to different sheets because Excel has a limit of 256 fields in each sheet) My sheets are quite large (~55,000 rows and 200 columns each) and I'll have to repeat this action many...
8
2001
by: Steve Jorgensen | last post by:
Hi folks, I'm posting this message because it's an issue I come up against relatively often, but I can't find any writings on the subject, and I haven't been able to figure out even what key words one would use to look for it. First, in broad philosophical terms, code actually -is- data. Code is the data that's fed into a compiler, interpreter, or microprocessor that tells it what to do. Code execution is, then, just a form another...
5
2250
by: Nico | last post by:
My database have 20 tables and many users. I wish to store encrypted data in 3 tables and have only 3 users have access to them, walking into tables or using forms. Can someone point me a direct help or something to read? Tnx Nico
3
2571
by: brian kaufmann | last post by:
Hi, I had sent this earlier, and would appreciate any suggestions on this. I need to make calculations for unemployment rate for three different data sources (A,B,C) for many countries and age groupings. The calculation is: unemployment rate = number of unemployed/number of labour force
2
2445
by: Abhishek Srivastava | last post by:
Hello All, Suppose if I have a SQL query like select p.ID, p.NAME, p.UNIT_PRICE, o.QUANTITY from PRODUCT p ORDERS o where p.ID = X AND P.ID = O.ID Here one product can have many orders. Essentially Product is the master table and Orders is the details table.
5
2453
by: Rick | last post by:
The data adapter wizard allows you to add more than one table, but that doesn't seem to work right when setting up a dataset. Some of the documentation I have read states that only one table should be selected per data adapter, and then you use a DataRelation object to pull join them together. Okay, if that's the case then fine, but why would the data adapter allow you to add more than one table if this is not how it is supposed to work....
4
1851
by: Steve | last post by:
Hi, I've been running postgres on my server for over a year now and the tables have become huge. I have 3 tables that have data over 10GB each and these tables are read very very frequently. In fact, heavy searches on these tables are expected every 2 to 3 minutes. This unfortunately gives a very poor response time to the end user and so I'm looking at other alternatives now. Currently, the postgresql installation is on a single disk...
9
4011
by: Anil Gupte | last post by:
After reading a tutorial and fiddling, I finally got this to work. I can now put two tables created with a DataTable class into a DataRelation. Phew! And it works! Dim tblSliceInfo As New DataTable("SliceInfo") Dim tblSliceRatings As New DataTable("SliceRatings") '.... All the adding datacolumns, datarows, etc. goes here.. DatasetInit.Tables.Add(tblSliceInfo)
1
9757
by: Query Builder | last post by:
I have one of our production Accounting Databases starting from 2 GB now grown into a 20 GB Database over the period of a few years... I have been getting timeouts when transactions are trying to update different tables in the database.. Most of the error I get are I/O requests to the data file (Data file of the production db Accounting_Data.MDF). I would like to implement the following to this Accounting database.
13
1873
by: farhaaad | last post by:
Dears, I have many feilds in my tables that are left blank for some records, If I make a sub table for it and and change those feilds to a lookup feilds so only those options are chosen which fit to the table, some information will be repeated for all records. Example: I have table for the cities in the country tblCity(cityID(pk), City(text), river(yes/no), airport(yes/no),
0
8076
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
8573
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...
1
8222
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
8406
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
7002
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, 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...
0
4021
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...
0
4085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1672
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1389
bsmnconsultancy
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...

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.