SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Best Practices in an Adhoc Environment


Best Practices in an Adhoc Environment

Author
Message
Dave Poole
Dave Poole
SSCoach
SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)

Group: General Forum Members
Points: 17086 Visits: 3403
TRUNCATE also fails if you use foreign key constraints, regardless of whether they are violated.

I fully agree that people should not be allowed to create datbases willy-nilly.

If developers go creating databases then

  • who is going to put the databases onto a backup schedule.
  • Who is going to ensure that the correct database options are set.
  • Who is going to check server capacity i.e. Mr Developer decides he needs a 10Gb database.


========================
He was not wholly unware of the potential lack of insignificance.

LinkedIn Profile
www.simple-talk.com
thormj
thormj
SSC Veteran
SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)

Group: General Forum Members
Points: 229 Visits: 1

About primary keys:

Are they still a good idea no matter how complex they become or how irrelevant they are?

Example: I have this calculation table (when used with joins and group by it does wonders )

ComputedID as int,
SrcID as int,
scale as float,
offset as float

I could make a PK field, but why except maybe for making it slightly easier to make an editor)?

I also have a table that is something like

CustID int,
BudID int,
AcctID int,
BldgID int,
SrcID int,
Dt DateTime,
Reading float,
ReliabilityID int

The PK would be (CustID, BudID, AcctID, BldgID, SrcID, DT)... but does it make sense to make a PK that complex, esp since I don't plan to pull things out in that order (mostly, select Dt,Reading,Reliability order by DT where xxxx)?

Thanks,
Thor





Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search