-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sunday 20 July 2003 09:03, Andreas wrote: > Hi folks, > > how would you design a 1:1 relation ? > > > I'd like to split an entities's attributes because they won't get > equally frequently requested. So I can save memory and disk access time. > The integrity of the splitted record should be retained.
I'll admit that I may be missing the obvious here, but ... why split them at all? Just request the items you need. If Table tbl has 5 flds (fld1, fld2, ... fld5), do the SQL request by Field name (it's up to MySQL to do it efficiently) instead of Select * If you really need to split them, simply give them the same key value, for example: Table tbl1 (Key1 int not null Primary Key Auto_Increment, ...) Table tbl2 (Key1 int not null Primary Key, ...) Each time you add a record to tbl1, add a corresponding record to tbl2 using the same key value. I'd be careful to do it in a transaction to insure that both records get inserted. Obviously, this violates normalization rules as all data defined by the key is not together, but if it solves your problem, go for it. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux) iD8DBQE/GqV/jeziQOokQnARAtV3AJ0X296Iz4odk1Xv2xtZrIwgjhhAvgCfRzoZ j3lhTmQHuAprc0P6YDksdaU= =sFW8 -----END PGP SIGNATURE----- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]