![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have created a database with approximately 60 tables. One table "tblClients" needs to be linked with about 40 tables. Some are simply look up tables. Others hold multiple records for each client, for example children information. (One client can have many children.) Other tables are linked to tblClients and have a one-to-one relationship. This is because many of the clients will not have any data in the fields, for example, marital data. I have reached a limit and now receive a message "There are too many indexes on table 'tblClients'" So how do I created relationships between the rest of my tables and tblClients? Or am I forced to combine tables? Thank you for any help or advise you can give me. Deborah P.S. Lesson from this database. Create relationships as you create the tables and before the forms are created. I've learned the lesson so please do not beat up on me too badly. |
#3
| |||
| |||
|
|
I have created a database with approximately 60 tables. One table "tblClients" needs to be linked with about 40 tables. Some are simply look up tables. Others hold multiple records for each client, for example children information. (One client can have many children.) Other tables are linked to tblClients and have a one-to-one relationship. This is because many of the clients will not have any data in the fields, for example, marital data. I have reached a limit and now receive a message "There are too many indexes on table 'tblClients'" So how do I created relationships between the rest of my tables and tblClients? Or am I forced to combine tables? Thank you for any help or advise you can give me. Deborah |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
Thank you both for your input. I always find your posts very helpful. I will admit that I was hoping for a magic bullet. Here is my plan and I will appreciate your opinions. I'll combine the lookups into one table. It will have the usually primary key and a field for the data the user can understand. Then I'll add a third field for the Lookup category. So for Income Types, IT will be entered; for Housing Types, HT will be entered, etc. Then I can restrict the combo box to the Lookup category. |
|
I'll also change the names of most of my primary keys and end them with PK instead of ID. If I then compact the database, won't some of the hidden indexes then be removed? |
|
Then the remaining relationships (which I hope will be just a few) I can maintain with code. |
#6
| |||||
| |||||
|
|
Responses in-line -- 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. dgardner (AT) twcny (DOT) rr.com> wrote in message news:e257fe49-f109-40fc-b802-629dc3f9f0f4 (AT) p25g2000hsf (DOT) googlegroups.com... Thank you both for your input. I always find your posts very helpful. I will admit that I was hoping for a magic bullet. Here is my plan and I will appreciate your opinions. I'll combine the lookups into one table. It will have the usually primary key and a field for the data the user can understand. Then I'll add a third field for the Lookup category. So for Income Types, IT will be entered; for Housing Types, HT will be entered, etc. Then I can restrict the combo box to the Lookup category. Yes, that's a good strategy if you have lots of lookups (as distinct from lots of related tables.) TvS: Agreed. |
|
The up-side is that there are fewer relationships (so fewer indexes.) The down-side is that since RI is applied against the entire lookup table, only, it is possible to end up with an inappropriate type in your data (typically because someone changed the type after it was created.) Sometimes you can avoid that by providing an interface where the type is entered as a default value, using separate forms for each type, so the user can't even see the hidden type and therefore can't change it. Still, it makes good sense. TvS: that's why I would not use an AutoNumber for the PK but a Long |
|
I'll also change the names of most of my primary keys and end them with PK instead of ID. If I then compact the database, won't some of the hidden indexes then be removed? No need to do that. Just remove all the entries for: AutoIndex on Import/Create In Access 2007, that's under: Office Button | Access Options | Object Designers. In older verisons, it's under Tools | Options. TvS: Since you already have created relations and indexes, use the |
|
Then the remaining relationships (which I hope will be just a few) I can maintain with code. TvS: I'm not a big fan of maintaining relations in code. What if |
|
Sounds good. |
![]() |
| Thread Tools | |
| Display Modes | |
| |