DB peeps: resolving circular references
Does anyone know of some good references to read up on regarding circular references (ie. why they’re bad and how to resolve them)? It’s been a while since I did a db course or worked in any depth with db structure and now I need the info for a side project. I know that circular refs are ‘bad’ but that’s about the extent of my knowledge. I also Googled but I’ve got the wrong search terms because I couldn’t find anything that seemed to relate (just stuff for code, not databases).
Basically, I have 4 tables. Each table has a single field as PK. Each table also has a single FK which points to one other table’s PK. It’s a perfect little cirle, or square I guess. All of the relationships seem necessary to me, and the table structure is about as efficient as I can make it without redundancy. Since I might need to update any of those tables at any given time, I’m guessing I need to break the circle somewhere.
At the end of the day I mainly want to avoid bad design. I’m writing an app on top of this and I don’t want to be bit in the ass later. Please help me edjumacate myself!
What is the model structure that neccessitates that? Why can’t you have one table that joins the other 4?
As in, combine the fields and have one happy table? Data redundancy, I guess. The way I designed it, I was trying to get to 3NF. At least what I remember of 3NF.
If you meant something else, it’s probably something I haven’t thought of and/or don’t remember. At this point between sifting through information on the web, trying/failing to come up with other workarounds due to my lack of general db knowledge and just being generally frustrated, I think I’ve just ended up confused. Feel free to dumb it down if necessary.
It would be better if you just explained what you’re trying to design, rather than talk about theoretical practices. I can’t think of a reason why the 4th table would have to link back to the 1st table. I’m betting you’ve over thought this entire process in the design phase.
Sounds like you have more than one candidate key, which is suspect 3NF and probably not BCNF. Agree with 5Gen, time to reaquaint yourself with the model.
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.