Click here to Skip to main content
15,902,635 members
Home / Discussions / Database
   

Database

 
GeneralRe: DB Design-Going in circles Pin
Colin Angus Mackay9-May-05 5:57
Colin Angus Mackay9-May-05 5:57 
GeneralRe: DB Design-Going in circles Pin
hp1089-May-05 21:56
hp1089-May-05 21:56 
GeneralRe: DB Design-Going in circles Pin
Colin Angus Mackay9-May-05 22:47
Colin Angus Mackay9-May-05 22:47 
GeneralRe: DB Design-Going in circles Pin
hp1089-May-05 23:57
hp1089-May-05 23:57 
GeneralRe: DB Design-Going in circles Pin
hp10810-May-05 5:47
hp10810-May-05 5:47 
GeneralRe: DB Design-Going in circles Pin
Colin Angus Mackay10-May-05 6:03
Colin Angus Mackay10-May-05 6:03 
GeneralRe: DB Design-Going in circles Pin
hp10810-May-05 6:34
hp10810-May-05 6:34 
GeneralRe: DB Design-Going in circles Pin
Colin Angus Mackay10-May-05 6:53
Colin Angus Mackay10-May-05 6:53 
Normally I use stored procedures for everything, so in a situation like this the stored procedure would determine if an existing address existed and join to that, or if a new address needed to be created and then create and join to the new address. It would do this all in one transaction, so that if the later part of the transaction failed (for example creating a new row in the Person table) then the whole thing would be rolled back and it would be as if there never was an Address record.

In the reverse situation, you could always add a trigger to the person or company/companyLocation table so that in the event that it is being deleted the trigger can see if there is anything else joined to the address and remove the address if it would be orphaned.

Personally, I'm not a big fan of triggers (I've only used them for building audit information) as I prefer all access through stored procedures.

There will always be weak points in a design but you you'll know how you intend to use it and can compromise on certain things. For example, if you will be mostly reading (SELECTing) data then you can optimise it by putting indexes on the columns most often referenced in your WHERE clauses, however, by doing this you will slow down INSERT, UPDATE, DELETES.

I hope this helps (I may have gone off at a tangent a little in my last paragraph).


My: Blog | Photos | Next SQL Presentation
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More


GeneralRe: DB Design-Going in circles Pin
hp10810-May-05 7:24
hp10810-May-05 7:24 
GeneralRe: DB Design-Going in circles Pin
jasncab10-May-05 14:29
jasncab10-May-05 14:29 
GeneralRe: DB Design-Going in circles Pin
hp10810-May-05 23:21
hp10810-May-05 23:21 
GeneralOracle 10G Pin
Member 17906978-May-05 22:47
Member 17906978-May-05 22:47 
GeneralRe: Oracle 10G Pin
jasncab11-May-05 6:07
jasncab11-May-05 6:07 
QuestionSQL Server 2000 to Access ? Pin
WDI8-May-05 7:01
WDI8-May-05 7:01 
AnswerRe: SQL Server 2000 to Access ? Pin
Tad McClellan8-May-05 14:15
professionalTad McClellan8-May-05 14:15 
AnswerRe: SQL Server 2000 to Access ? Pin
Member 17906978-May-05 22:40
Member 17906978-May-05 22:40 
GeneralRe: SQL Server 2000 to Access ? Pin
WDI9-May-05 10:15
WDI9-May-05 10:15 
GeneralDAAB Compatibility with Oracle Database 10G Pin
Member 17906977-May-05 23:11
Member 17906977-May-05 23:11 
Generalmultiple database Pin
Anonymous7-May-05 20:51
Anonymous7-May-05 20:51 
GeneralRe: multiple database Pin
Member 17906977-May-05 23:16
Member 17906977-May-05 23:16 
GeneralRe: multiple database Pin
Colin Angus Mackay7-May-05 23:53
Colin Angus Mackay7-May-05 23:53 
GeneralRe: multiple database Pin
Colin Angus Mackay8-May-05 0:01
Colin Angus Mackay8-May-05 0:01 
GeneralRe: multiple database Pin
sadmilson@terra.com.br11-May-05 7:24
susssadmilson@terra.com.br11-May-05 7:24 
QuestionCan you JOIN a Subquery Pin
Larsenal7-May-05 15:39
Larsenal7-May-05 15:39 
AnswerRe: Can you JOIN a Subquery Pin
jasncab10-May-05 14:37
jasncab10-May-05 14:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.