1 Replies - 962 Views - Last Post: 28 April 2012 - 10:23 AM Rate Topic: -----

#1 AN1554  Icon User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 130
  • Joined: 03-April 11

Archive records from a relational database

Posted 28 April 2012 - 01:52 AM

Any ideas as to how to archive records from a relational database (Microsoft Access)?

I want to save a record from a table in a database to another database. This table has 2 foreign key, each from 2 different tables. These tables each have a foreign key from 2 different tables, and so on.

A child record cannot be saved when there is no parent record. With a foreign key relationship, the parent record must always be inserted first, before the child record. This means that to save a record from that one particular table, I have to save all the tables having related records with it and those having related records with those tables?

Would an alternative solution be to remove all the relationships in that other database? This other database is just to archive the records from the main database.

Is This A Good Question/Topic? 0
  • +

Replies To: Archive records from a relational database

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9574
  • View blog
  • Posts: 36,262
  • Joined: 12-June 08

Re: Archive records from a relational database

Posted 28 April 2012 - 10:23 AM

Quote

Would an alternative solution be to remove all the relationships in that other database? This other database is just to archive the records from the main database.

yes.. if you don't care about the relationships then that would be a good and quick way of just keeping the data. If you think you'll need to grab that data later on and rehydrate it as a backup for a crashed db then no.. that would not be a good solution...

Quote

I want to save a record from a table in a database to another database. This table has 2 foreign key, each from 2 different tables. These tables each have a foreign key from 2 different tables, and so on.

That sounds like a poorly setup db relationships.. it should be reworked!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1