473,569 Members | 2,901 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Data Repeated

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),
tower(yes/no)
Here, mayb a city has all the three (river, airport, tower) and
another city wont have any of them.
So, I made a sub table with a lookup feild and the three choices in
the feild. here if two cities have airports, airport is mentioned
twice in the same subtable.
I hope you got me,
I appreciate your help,
Farhaad

Apr 23 '07 #1
13 1855
So the junction table will have fields for CityID and Feature, and you will
have records like this:
CityID Feature
==== ======
2 Airport
2 River
3 Airport
3 Tower

What's wrong with that?

--
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.

<fa******@gmail .comwrote in message
news:11******** **************@ o5g2000hsb.goog legroups.com...
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),
tower(yes/no)
Here, mayb a city has all the three (river, airport, tower) and
another city wont have any of them.
So, I made a sub table with a lookup feild and the three choices in
the feild. here if two cities have airports, airport is mentioned
twice in the same subtable.

I hope you got me,
I appreciate your help,

Farhaad
Apr 23 '07 #2
On Apr 23, 9:47 am, "Allen Browne" <AllenBro...@Se eSig.Invalidwro te:
So the junction table will have fields for CityID and Feature, and you will
have records like this:
CityID Feature
==== ======
2 Airport
2 River
3 Airport
3 Tower

What's wrong with that?

--
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.

<farha...@gmail .comwrote in message

news:11******** **************@ o5g2000hsb.goog legroups.com...
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),
tower(yes/no)
Here, mayb a city has all the three (river, airport, tower) and
another city wont have any of them.
So, I made a sub table with a lookup feild and the three choices in
the feild. here if two cities have airports, airport is mentioned
twice in the same subtable.
I hope you got me,
I appreciate your help,
Farhaad- Hide quoted text -

- Show quoted text -
Sir,

I just want to know if we can avoid the repition of data in the sub
table.

Thanks alot,

Apr 23 '07 #3
No. That's the right structure.

Ultimately you have 3 tables:
Table 1 = a list of cities;
Table 2 = a list of features;
Table 3 = the junction table between the other two (matching cities and
features.)

That is the standard way to resolve a many-to-many relation into a pair of
one-to-many relations.

--
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.

<fa******@gmail .comwrote in message
news:11******** **************@ o5g2000hsb.goog legroups.com...
On Apr 23, 9:47 am, "Allen Browne" <AllenBro...@Se eSig.Invalidwro te:
>So the junction table will have fields for CityID and Feature, and you
will
have records like this:
CityID Feature
==== ======
2 Airport
2 River
3 Airport
3 Tower

What's wrong with that?

--
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.

<farha...@gmai l.comwrote in message

news:11******* *************** @o5g2000hsb.goo glegroups.com.. .
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),
tower(yes/no)
Here, mayb a city has all the three (river, airport, tower) and
another city wont have any of them.
So, I made a sub table with a lookup feild and the three choices in
the feild. here if two cities have airports, airport is mentioned
twice in the same subtable.
I hope you got me,
I appreciate your help,
Farhaad- Hide quoted text -

- Show quoted text -

Sir,

I just want to know if we can avoid the repition of data in the sub
table.

Thanks alot,
Apr 23 '07 #4
On Apr 23, 4:26 pm, "Allen Browne" <AllenBro...@Se eSig.Invalidwro te:
No. That's the right structure.

Ultimately you have 3 tables:
Table 1 = a list of cities;
Table 2 = a list of features;
Table 3 = the junction table between the other two (matching cities and
features.)

That is the standard way to resolve a many-to-many relation into a pair of
one-to-many relations.

--
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.

<farha...@gmail .comwrote in message

news:11******** **************@ o5g2000hsb.goog legroups.com...
On Apr 23, 9:47 am, "Allen Browne" <AllenBro...@Se eSig.Invalidwro te:
So the junction table will have fields for CityID and Feature, and you
will
have records like this:
CityID Feature
==== ======
2 Airport
2 River
3 Airport
3 Tower
What's wrong with that?
--
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.
<farha...@gmail .comwrote in message
>news:11******* *************** @o5g2000hsb.goo glegroups.com.. .
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),
tower(yes/no)
Here, mayb a city has all the three (river, airport, tower) and
another city wont have any of them.
So, I made a sub table with a lookup feild and the three choices in
the feild. here if two cities have airports, airport is mentioned
twice in the same subtable.
I hope you got me,
I appreciate your help,
Farhaad- Hide quoted text -
- Show quoted text -
Sir,
I just want to know if we can avoid the repition of data in the sub
table.
Thanks alot,- Hide quoted text -

- Show quoted text -
Thanks alot for the help and Sir!

Can a primary key have many foreing keys? and can these foreign tables
have different structures depeding on primary keys?
for example, tblCity(CityID, City)1to1 tbl(CityID (fk),
Features(pk)1to many tblTrade(Featur es(fk),TradCent ers(integer)),
tblAirport(feat ures(fk),
Area(integer),R unways(integer) ,Terminals(inte ger))
tblhospital(fea tures(fk),Locat ion, Capacity(ingege r),
Doctors(Integer ), Nurses(Integer) ).

I hope you got some Idea from the above example, Suppose we have three
features (Airport,TradeC enter and Hospital) for each city and each
feature has its own attribute so I made seperate tables for each.

I again thank you very much for the help and I hope you help me with
the above structure if it is ok or should I change it?

I appreciate your extraordinary intelligence in databases and helping
others,

Apr 24 '07 #5
No. That's not right.

You need a Feature table, with a field like this:
FeatureID Text primary key
Then you enter *records* such as:
Airport
Tower
River

The junction table then has fields like this:
CityID relates to the primary key of the City table
FeatureID relates to the primary key of the Feature table.
So the records in this table look like the example in the previous reply.

--
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.

<fa******@gmail .comwrote in message
news:11******** **************@ o5g2000hsb.goog legroups.com...
On Apr 23, 4:26 pm, "Allen Browne" <AllenBro...@Se eSig.Invalidwro te:
>No. That's the right structure.

Ultimately you have 3 tables:
Table 1 = a list of cities;
Table 2 = a list of features;
Table 3 = the junction table between the other two (matching cities and
features.)

That is the standard way to resolve a many-to-many relation into a pair
of
one-to-many relations.

--
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.

<farha...@gmai l.comwrote in message

news:11******* *************** @o5g2000hsb.goo glegroups.com.. .
On Apr 23, 9:47 am, "Allen Browne" <AllenBro...@Se eSig.Invalidwro te:
So the junction table will have fields for CityID and Feature, and you
will
have records like this:
CityID Feature
==== ======
2 Airport
2 River
3 Airport
3 Tower
>What's wrong with that?
><farha...@gmai l.comwrote in message
>>news:11****** *************** *@o5g2000hsb.go oglegroups.com. ..
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),
tower(yes/no)
Here, mayb a city has all the three (river, airport, tower) and
another city wont have any of them.
So, I made a sub table with a lookup feild and the three choices in
the feild. here if two cities have airports, airport is mentioned
twice in the same subtable.
I hope you got me,
I appreciate your help,
Farhaad- Hide quoted text -
>- Show quoted text -
Sir,
I just want to know if we can avoid the repition of data in the sub
table.
Thanks alot,- Hide quoted text -

- Show quoted text -

Thanks alot for the help and Sir!

Can a primary key have many foreing keys? and can these foreign tables
have different structures depeding on primary keys?
for example, tblCity(CityID, City)1to1 tbl(CityID (fk),
Features(pk)1to many tblTrade(Featur es(fk),TradCent ers(integer)),
tblAirport(feat ures(fk),
Area(integer),R unways(integer) ,Terminals(inte ger))
tblhospital(fea tures(fk),Locat ion, Capacity(ingege r),
Doctors(Integer ), Nurses(Integer) ).

I hope you got some Idea from the above example, Suppose we have three
features (Airport,TradeC enter and Hospital) for each city and each
feature has its own attribute so I made seperate tables for each.

I again thank you very much for the help and I hope you help me with
the above structure if it is ok or should I change it?

I appreciate your extraordinary intelligence in databases and helping
others,
Apr 24 '07 #6
On Apr 24, 8:42 am, "Allen Browne" <AllenBro...@Se eSig.Invalidwro te:
No. That's not right.

You need a Feature table, with a field like this:
FeatureID Text primary key
Then you enter *records* such as:
Airport
Tower
River

The junction table then has fields like this:
CityID relates to the primary key of the City table
FeatureID relates to the primary key of the Feature table.
So the records in this table look like the example in the previous reply.

--
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.

<farha...@gmail .comwrote in message

news:11******** **************@ o5g2000hsb.goog legroups.com...
On Apr 23, 4:26 pm, "Allen Browne" <AllenBro...@Se eSig.Invalidwro te:
No. That's the right structure.
Ultimately you have 3 tables:
Table 1 = a list of cities;
Table 2 = a list of features;
Table 3 = the junction table between the other two (matching cities and
features.)
That is the standard way to resolve a many-to-many relation into a pair
of
one-to-many relations.
--
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.
<farha...@gmail .comwrote in message
>news:11******* *************** @o5g2000hsb.goo glegroups.com.. .
On Apr 23, 9:47 am, "Allen Browne" <AllenBro...@Se eSig.Invalidwro te:
So the junction table will have fields for CityID and Feature, and you
will
have records like this:
CityID Feature
==== ======
2 Airport
2 River
3 Airport
3 Tower
What's wrong with that?
<farha...@gmail .comwrote in message
>news:11******* *************** @o5g2000hsb.goo glegroups.com.. .
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),
tower(yes/no)
Here, mayb a city has all the three (river, airport, tower) and
another city wont have any of them.
So, I made a sub table with a lookup feild and the three choices in
the feild. here if two cities have airports, airport is mentioned
twice in the same subtable.
I hope you got me,
I appreciate your help,
Farhaad- Hide quoted text -
- Show quoted text -
Sir,
I just want to know if we can avoid the repition of data in the sub
table.
Thanks alot,- Hide quoted text -
- Show quoted text -
Thanks alot for the help and Sir!
Can a primary key have many foreing keys? and can these foreign tables
have different structures depeding on primary keys?
for example, tblCity(CityID, City)1to1 tbl(CityID (fk),
Features(pk)1to many tblTrade(Featur es(fk),TradCent ers(integer)),
tblAirport(feat ures(fk),
Area(integer),R unways(integer) ,Terminals(inte ger))
tblhospital(fea tures(fk),Locat ion, Capacity(ingege r),
Doctors(Integer ), Nurses(Integer) ).
I hope you got some Idea from the above example, Suppose we have three
features (Airport,TradeC enter and Hospital) for each city and each
feature has its own attribute so I made seperate tables for each.
I again thank you very much for the help and I hope you help me with
the above structure if it is ok or should I change it?
I appreciate your extraordinary intelligence in databases and helping
others,- Hide quoted text -

- Show quoted text -
Thank you sir,

What I mean here is that each primary key in features table relates to
a different table. For example (airport,city,t ower) have their own
tables and foreign keys for the feature table.

is that ok?

I thank you very much

Apr 24 '07 #7
No. that is not okay.

--
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.
<fa******@gmail .comwrote in message
news:11******** **************@ r30g2000prh.goo glegroups.com.. .
On Apr 24, 8:42 am, "Allen Browne" <AllenBro...@Se eSig.Invalidwro te:
>No. That's not right.

You need a Feature table, with a field like this:
FeatureID Text primary key
Then you enter *records* such as:
Airport
Tower
River

The junction table then has fields like this:
CityID relates to the primary key of the City table
FeatureID relates to the primary key of the Feature table.
So the records in this table look like the example in the previous reply.

--
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.

<farha...@gmai l.comwrote in message

news:11******* *************** @o5g2000hsb.goo glegroups.com.. .
On Apr 23, 4:26 pm, "Allen Browne" <AllenBro...@Se eSig.Invalidwro te:
No. That's the right structure.
>Ultimately you have 3 tables:
Table 1 = a list of cities;
Table 2 = a list of features;
Table 3 = the junction table between the other two (matching cities
and
features.)
>That is the standard way to resolve a many-to-many relation into a
pair
of
one-to-many relations.
>--
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.
><farha...@gmai l.comwrote in message
>>news:11****** *************** *@o5g2000hsb.go oglegroups.com. ..
On Apr 23, 9:47 am, "Allen Browne" <AllenBro...@Se eSig.Invalid>
wrote:
So the junction table will have fields for CityID and Feature, and
you
will
have records like this:
CityID Feature
==== ======
2 Airport
2 River
3 Airport
3 Tower
>What's wrong with that?
><farha...@gmai l.comwrote in message
>>news:11****** *************** *@o5g2000hsb.go oglegroups.com. ..
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),
tower(yes/no)
Here, mayb a city has all the three (river, airport, tower) and
another city wont have any of them.
So, I made a sub table with a lookup feild and the three choices
in
the feild. here if two cities have airports, airport is mentioned
twice in the same subtable.
I hope you got me,
I appreciate your help,
Farhaad- Hide quoted text -
>- Show quoted text -
Sir,
I just want to know if we can avoid the repition of data in the sub
table.
Thanks alot,- Hide quoted text -
>- Show quoted text -
Thanks alot for the help and Sir!
Can a primary key have many foreing keys? and can these foreign tables
have different structures depeding on primary keys?
for example, tblCity(CityID, City)1to1 tbl(CityID (fk),
Features(pk)1to many tblTrade(Featur es(fk),TradCent ers(integer)),
tblAirport(feat ures(fk),
Area(integer),R unways(integer) ,Terminals(inte ger))
tblhospital(fea tures(fk),Locat ion, Capacity(ingege r),
Doctors(Integer ), Nurses(Integer) ).
I hope you got some Idea from the above example, Suppose we have three
features (Airport,TradeC enter and Hospital) for each city and each
feature has its own attribute so I made seperate tables for each.
I again thank you very much for the help and I hope you help me with
the above structure if it is ok or should I change it?
I appreciate your extraordinary intelligence in databases and helping
others,- Hide quoted text -

- Show quoted text -

Thank you sir,

What I mean here is that each primary key in features table relates to
a different table. For example (airport,city,t ower) have their own
tables and foreign keys for the feature table.

is that ok?

I thank you very much
Apr 24 '07 #8
On Apr 24, 10:23 am, "Allen Browne" <AllenBro...@Se eSig.Invalid>
wrote:
No. that is not okay.

--
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.<farha...@g mail.comwrote in message

news:11******** **************@ r30g2000prh.goo glegroups.com.. .
On Apr 24, 8:42 am, "Allen Browne" <AllenBro...@Se eSig.Invalidwro te:
No. That's not right.
You need a Feature table, with a field like this:
FeatureID Text primary key
Then you enter *records* such as:
Airport
Tower
River
The junction table then has fields like this:
CityID relates to the primary key of the City table
FeatureID relates to the primary key of the Feature table.
So the records in this table look like the example in the previous reply.
--
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.
<farha...@gmail .comwrote in message
>news:11******* *************** @o5g2000hsb.goo glegroups.com.. .
On Apr 23, 4:26 pm, "Allen Browne" <AllenBro...@Se eSig.Invalidwro te:
No. That's the right structure.
Ultimately you have 3 tables:
Table 1 = a list of cities;
Table 2 = a list of features;
Table 3 = the junction table between the other two (matching cities
and
features.)
That is the standard way to resolve a many-to-many relation into a
pair
of
one-to-many relations.
--
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.
<farha...@gmail .comwrote in message
>news:11******* *************** @o5g2000hsb.goo glegroups.com.. .
On Apr 23, 9:47 am, "Allen Browne" <AllenBro...@Se eSig.Invalid>
wrote:
So the junction table will have fields for CityID and Feature, and
you
will
have records like this:
CityID Feature
==== ======
2 Airport
2 River
3 Airport
3 Tower
What's wrong with that?
<farha...@gmail .comwrote in message
>news:11******* *************** @o5g2000hsb.goo glegroups.com.. .
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),
tower(yes/no)
Here, mayb a city has all the three (river, airport, tower) and
another city wont have any of them.
So, I made a sub table with a lookup feild and the three choices
in
the feild. here if two cities have airports, airport is mentioned
twice in the same subtable.
I hope you got me,
I appreciate your help,
Farhaad- Hide quoted text -
- Show quoted text -
Sir,
I just want to know if we can avoid the repition of data in the sub
table.
Thanks alot,- Hide quoted text -
- Show quoted text -
Thanks alot for the help and Sir!
Can a primary key have many foreing keys? and can these foreign tables
have different structures depeding on primary keys?
for example, tblCity(CityID, City)1to1 tbl(CityID (fk),
Features(pk)1to many tblTrade(Featur es(fk),TradCent ers(integer)),
tblAirport(feat ures(fk),
Area(integer),R unways(integer) ,Terminals(inte ger))
tblhospital(fea tures(fk),Locat ion, Capacity(ingege r),
Doctors(Integer ), Nurses(Integer) ).
I hope you got some Idea from the above example, Suppose we have three
features (Airport,TradeC enter and Hospital) for each city and each
feature has its own attribute so I made seperate tables for each.
I again thank you very much for the help and I hope you help me with
the above structure if it is ok or should I change it?
I appreciate your extraordinary intelligence in databases and helping
others,- Hide quoted text -
- Show quoted text -
Thank you sir,
What I mean here is that each primary key in features table relates to
a different table. For example (airport,city,t ower) have their own
tables and foreign keys for the feature table.
is that ok?
I thank you very much- Hide quoted text -

- Show quoted text -
Sir,
Each feature has its own attributes and I cannot bring all the
features in one table because some fields may be left blank for some
features. Pleas guide me what to do.

Thank alot

Apr 24 '07 #9
Sorry: I'm out of suggestions.

You are closer to your data, and you know what you can and can't achieve. I
can't see it so all I can do is explain the normalized approach. If that
doesn't apply, you can take it from there, and it's time for me to move on
to answering other questions.

All the best

--
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.

<fa******@gmail .comwrote in message
news:11******** **************@ s33g2000prh.goo glegroups.com.. .
On Apr 24, 10:23 am, "Allen Browne" <AllenBro...@Se eSig.Invalid>
wrote:
>No. that is not okay.

news:11******* *************** @r30g2000prh.go oglegroups.com. ..
On Apr 24, 8:42 am, "Allen Browne" <AllenBro...@Se eSig.Invalidwro te:
No. That's not right.
>You need a Feature table, with a field like this:
FeatureID Text primary key
Then you enter *records* such as:
Airport
Tower
River
>The junction table then has fields like this:
CityID relates to the primary key of the City table
FeatureID relates to the primary key of the Feature table.
So the records in this table look like the example in the previous
reply.
>--
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.
><farha...@gmai l.comwrote in message
>>news:11****** *************** *@o5g2000hsb.go oglegroups.com. ..
On Apr 23, 4:26 pm, "Allen Browne" <AllenBro...@Se eSig.Invalid>
wrote:
No. That's the right structure.
>Ultimately you have 3 tables:
Table 1 = a list of cities;
Table 2 = a list of features;
Table 3 = the junction table between the other two (matching cities
and
features.)
>That is the standard way to resolve a many-to-many relation into a
pair
of
one-to-many relations.
>--
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.
><farha...@gmai l.comwrote in message
>>news:11****** *************** *@o5g2000hsb.go oglegroups.com. ..
On Apr 23, 9:47 am, "Allen Browne" <AllenBro...@Se eSig.Invalid>
wrote:
So the junction table will have fields for CityID and Feature,
and
you
will
have records like this:
CityID Feature
==== ======
2 Airport
2 River
3 Airport
3 Tower
>What's wrong with that?
><farha...@gmai l.comwrote in message
>>news:11****** *************** *@o5g2000hsb.go oglegroups.com. ..
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),
tower(yes/no)
Here, mayb a city has all the three (river, airport, tower)
and
another city wont have any of them.
So, I made a sub table with a lookup feild and the three
choices
in
the feild. here if two cities have airports, airport is
mentioned
twice in the same subtable.
I hope you got me,
I appreciate your help,
Farhaad- Hide quoted text -
>- Show quoted text -
Sir,
I just want to know if we can avoid the repition of data in the
sub
table.
Thanks alot,- Hide quoted text -
>- Show quoted text -
Thanks alot for the help and Sir!
Can a primary key have many foreing keys? and can these foreign
tables
have different structures depeding on primary keys?
for example, tblCity(CityID, City)1to1 tbl(CityID (fk),
Features(pk)1to many tblTrade(Featur es(fk),TradCent ers(integer)),
tblAirport(feat ures(fk),
Area(integer),R unways(integer) ,Terminals(inte ger))
tblhospital(fea tures(fk),Locat ion, Capacity(ingege r),
Doctors(Integer ), Nurses(Integer) ).
I hope you got some Idea from the above example, Suppose we have
three
features (Airport,TradeC enter and Hospital) for each city and each
feature has its own attribute so I made seperate tables for each.
I again thank you very much for the help and I hope you help me with
the above structure if it is ok or should I change it?
I appreciate your extraordinary intelligence in databases and
helping
others,- Hide quoted text -
>- Show quoted text -
Thank you sir,
What I mean here is that each primary key in features table relates to
a different table. For example (airport,city,t ower) have their own
tables and foreign keys for the feature table.
is that ok?
I thank you very much- Hide quoted text -

- Show quoted text -

Sir,
Each feature has its own attributes and I cannot bring all the
features in one table because some fields may be left blank for some
features. Pleas guide me what to do.

Thank alot
Apr 24 '07 #10

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

Similar topics

7
1646
by: Mike | last post by:
List, I call this a "Parsing Problem", but it could be called formatting or regular expressions as well. I have a set of data that was formerly processed on an OS390 (hence a lot of horsepower). Now, it has been moved to a database from where I can call it via a web service with a C# client. The data looks like this: ABLATION...
1
2711
by: Dot net work | last post by:
Hello. I have an interesting data binding scenario: I have a repeater control. It repeats a typical custom web user control. I also have a collection object, and each collection element contains various pieces of information inside a custom object, including an id field.
1
1218
by: epigram | last post by:
I'd like to know if there is a best approach, in terms of using the Data Web Controls (i.e. DataGrid, DataList & Repeater), for displaying data that is the result of a query that joins two tables that have a one-to-many relationship. For instance if I perform a query on two such tables, I might expect that there would be data repeated on...
27
13018
by: ted benedict | last post by:
hi everybody, i hope this is the right place to discuss this weird behaviour. i am getting dynamically generated text or xml from the server side using xmlhttprequest. if the server side data is STATIC, i can have whatever size of data i want. but if the data (xml or text) is generated dynamically using php, then there seems to be a size...
1
13642
by: deepdata | last post by:
Hi, I am trying to fetch data from db2 (express version) database by calling stored procedure. I have tried to use both cursor and for loop but still i am getting error. --======Start procedure============= Create PROCEDURE get_timedout_scripts (
0
3919
by: sporob | last post by:
Issue: Each webpage/screen in our project has a corresponding WCF class and also a proxy is generated per class. We are inheriting Data Contract declared in a common WCF class, though WCF allows inheritance we are facing problem when we generate the proxy. When the proxy is generated all inherited DataContracts are also auto-generated in each...
1
1334
by: Rams123 | last post by:
i have a table with two cloumns, first column have unique numbers from 1 to 10 and the second column have repeated numbers from 1 to 5. How can i write a query to get the data from second column as 1 is repeated these many times and 2 is repeated for these many times.........till 5. thanks in advance Rams
9
2987
by: C#_Help_needed | last post by:
I need help with the following question. THANKS :) Write a program in c# that takes in a directory as a command line parameter, and returns the longest repeated phrase in ALL text files in that directory. Assume that all contents of all the files may be held in memory at the same time. Do not use unsafe code blocks and/ or pointers.
7
2730
by: MNNovice | last post by:
I have 3 queries that show expenses on various projects/funds. I would like to combine the results and show various expenses on each project/fund etc. But when I try to combine these 3 queries, the data gets repeated multiple times and the result becomes huge. Query 1: qryAPDetail has 92 records Query 2: qryPayDetail has 77 records...
0
7605
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...
0
7917
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. ...
0
8118
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...
0
7962
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...
0
6277
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...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2105
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
1
1207
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
933
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...

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.