Discussion:
what is the difference in the FK properties
(too old to reply)
sparks
2012-04-05 13:48:01 UTC
Permalink
I finished all the merging and inserting of the database I have been
working on and made a copy of the final and a backup


anyway I was trying compare from redcraft

I found this comparing the empty database I started with and the
final.

ALTER TABLE [dbo].[QuestionnaireData] ADD CONSTRAINT
[FK_QuestionnaireData_ClientID] FOREIGN KEY ([ClientID]) REFERENCES
[dbo].[Client] ([ClientID])

ALTER TABLE [dbo].[QuestionnaireData] ADD CONSTRAINT
[QuestionnaireData_ClientID_FK] FOREIGN KEY ([ClientID]) REFERENCES
[dbo].[Client] ([ClientID])


I don't know much about this but why is FK at the start of the
statement in the original FK_QuestionnaireData_ClientID
and at the end in the final QuestionnaireData_ClientID_FK
sparks
2012-04-05 13:50:22 UTC
Permalink
Sorry I ment to say the compare in Redgate not redcraft
Post by sparks
I finished all the merging and inserting of the database I have been
working on and made a copy of the final and a backup
anyway I was trying compare from redcraft
I found this comparing the empty database I started with and the
final.
ALTER TABLE [dbo].[QuestionnaireData] ADD CONSTRAINT
[FK_QuestionnaireData_ClientID] FOREIGN KEY ([ClientID]) REFERENCES
[dbo].[Client] ([ClientID])
ALTER TABLE [dbo].[QuestionnaireData] ADD CONSTRAINT
[QuestionnaireData_ClientID_FK] FOREIGN KEY ([ClientID]) REFERENCES
[dbo].[Client] ([ClientID])
I don't know much about this but why is FK at the start of the
statement in the original FK_QuestionnaireData_ClientID
and at the end in the final QuestionnaireData_ClientID_FK
Gene Wirchenko
2012-04-05 15:27:35 UTC
Permalink
On Thu, 05 Apr 2012 08:48:01 -0500, sparks <***@home.com> wrote:

[snip]
Post by sparks
I don't know much about this but why is FK at the start of the
statement in the original FK_QuestionnaireData_ClientID
and at the end in the final QuestionnaireData_ClientID_FK
It is simply a different naming convention. I tend to go with
the first style of categorising at the beginning myself.

Sincerely,

Gene Wirchenko
sparks
2012-04-05 16:17:25 UTC
Permalink
Thank you for that.

the compare showed they didn't match.
and that was the only difference between the two.

I could not fngure out how copying the database would generate that
difference.
Post by Gene Wirchenko
[snip]
Post by sparks
I don't know much about this but why is FK at the start of the
statement in the original FK_QuestionnaireData_ClientID
and at the end in the final QuestionnaireData_ClientID_FK
It is simply a different naming convention. I tend to go with
the first style of categorising at the beginning myself.
Sincerely,
Gene Wirchenko
Gene Wirchenko
2012-04-05 16:41:58 UTC
Permalink
Post by sparks
Thank you for that.
the compare showed they didn't match.
and that was the only difference between the two.
I could not fngure out how copying the database would generate that
difference.
Nor can I. something else is happening besides just copying.

[snip - Please do not top post.]

Sincerely,

Gene Wirchenko
Erland Sommarskog
2012-04-05 21:48:09 UTC
Permalink
Post by sparks
I could not fngure out how copying the database would generate that
difference.
Corruption can always occur - but no that difference is not due to
corruption, but it is due to intervention by human hands - may be you?
--
Erland Sommarskog, SQL Server MVP, ***@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
sparks
2012-04-09 13:36:35 UTC
Permalink
It is simply a different naming convention.

can you tell me what was done by human hands to generate the
difference?

On Thu, 05 Apr 2012 23:48:09 +0200, Erland Sommarskog
Post by Erland Sommarskog
Post by sparks
I could not fngure out how copying the database would generate that
difference.
Corruption can always occur - but no that difference is not due to
corruption, but it is due to intervention by human hands - may be you?
Erland Sommarskog
2012-04-09 13:59:16 UTC
Permalink
Post by sparks
can you tell me what was done by human hands to generate the
difference?
You mean that I from a distance should say exactly what you did to achieve
the duplicate constraints?

All I can say is that someone(s) used different name for the same constraint
at different points in time.
--
Erland Sommarskog, SQL Server MVP, ***@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
sparks
2012-04-16 15:43:12 UTC
Permalink
All I can say is that someone(s) used different name for the same
constraint
at different points in time.


thank you.

I asked the people that this was sent to and they said that one fk was
not correct.

SO it didn't work?
No it just didn't show up in our mapping so we added it.
you mean the graphical view?
yes.

so that is where they got it.
I don't know why they said it didn't show up I can only assume that
some how it broke it when they restored it because it looks fine here.

overall this has been a big learning experience. I think the main
problem to me was working with a production database and trying to
keep everything the same but then finding things impossible to merge
and insert when you could not retain values since the fields were not
the same.

thanks again for this and all the help from everyone here.



On Mon, 09 Apr 2012 15:59:16 +0200, Erland Sommarskog
Post by Erland Sommarskog
Post by sparks
can you tell me what was done by human hands to generate the
difference?
You mean that I from a distance should say exactly what you did to achieve
the duplicate constraints?
All I can say is that someone(s) used different name for the same constraint
at different points in time.
Continue reading on narkive:
Loading...