Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 7,2000
»
Strategies
»
Need Architecture Solution
Need Architecture Solution
Rate Topic
Display Mode
Topic Options
Author
Message
Swartkruit
Swartkruit
Posted Wednesday, October 14, 2009 2:35 AM
Grasshopper
Group: General Forum Members
Last Login: Friday, June 15, 2012 6:34 AM
Points: 12,
Visits: 64
Hi Everyone,
Here is the situation:
On the one side we have a SQL DB with staff (active & terminated). On the other side an Oracle DB, also with staff, but only active. Then the primary key for the two systems differ. On the SQL-side the key is CHAR (6) and on the Oracle-side the key is BIGINT or Numeric (Oracle).
The two systems need to update each other. The dynamics of this combination is that when a staff member leaves and comes back, the key will always stay the same on the Oracle-side. On the SQL-side if the staff member leaves and comes back, the old record's status will become terminated when they leave and a new record is created when they come back.
Then, a terminated record can also be updated a month or two in arrears from the Oracle-side and vice versa. My suggestion for the solution is a composite cluster with the 2 keys and a status field making it an ongoing unique combination i.e.
SQL Key----- Oracle Key----- Status
PK-A----- PK-1----- A
PK-B----- PK-2----- T
PK-B1----- PK-2----- A
PK-C----- PK-3----- A
PK-D----- PK-4----- A
PK-E----- PK-5----- A
PK-F----- PK-6----- A
PK-G----- PK-7----- A
If I'm completely wrong with my solution, please advise. If you guys have implemented or know of better real world solutions, please let me know as well.
Regards,
S
Post #802566
Sergiy
Sergiy
Posted Wednesday, March 17, 2010 9:36 PM
SSCarpal Tunnel
Group: General Forum Members
Last Login: Today @ 2:38 PM
Points: 4,557,
Visits: 8,213
I'm afraid you're wrong with you requirements.
These 2 statements contradict each other:
On the other side an Oracle DB, also with staff, but only active.
when a staff member leaves and comes back, the key will always stay the same on the Oracle-side.
When a staff member leaves then it must be deleted from Oracle database because it holds only active ones.
When the same staff member comes back the old key should be gone, and therefore there is no way to re-assign it to this staff member.
Something is wrong in the task description.
Post #885196
SQLRNNR
SQLRNNR
Posted Wednesday, March 17, 2010 9:46 PM
SSCoach
Group: General Forum Members
Last Login: Today @ 10:25 AM
Points: 18,754,
Visits: 12,337
Sergiy (3/17/2010)
I'm afraid you're wrong with you requirements.
These 2 statements contradict each other:
On the other side an Oracle DB, also with staff, but only active.
when a staff member leaves and comes back, the key will always stay the same on the Oracle-side.
When a staff member leaves then it must be deleted from Oracle database because it holds only active ones.
When the same staff member comes back the old key should be gone, and therefore there is no way to re-assign it to this staff member.
Something is wrong in the task description.
I agree with Sergiy here. These requirements don't quite make total sense.
Jason
AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server 2008
SQL RNNR
Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #885202
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.