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


Need Architecture Solution


Need Architecture Solution

Author
Message
Swartkruit
Swartkruit
Grasshopper
Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)

Group: General Forum Members
Points: 24 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
Sergiy
Sergiy
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10544 Visits: 11964
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.
SQLRNNR
SQLRNNR
SSC-Dedicated
SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)

Group: General Forum Members
Points: 32829 Visits: 18559
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, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

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