The database was pointing to the wrong place one day. How can I combine that one day records back to the correct database?
merge daily records
Started by saukwan, Nov 23 2010 03:22 PM
3 replies to this topic
#1
Posted 23 November 2010 - 03:22 PM
#2
Posted 24 November 2010 - 09:37 PM
Hello,
You can print out the records of that day and manually enter them in the correct database.
You can print out the records of that day and manually enter them in the correct database.
#3
Posted 01 December 2010 - 10:15 AM
Manually!!! Any other easier way to do it?
#4
Posted 01 December 2010 - 01:40 PM
Manually would be the easiest way. With relational databases the data is stored in different tables and only references to records in these tables are used in other tables. For example, student "John Smith" in the student table would be represented by an internal unique ID of something like "792901". Any reference to this student in other tables (e.g. appointments, visits, media checkouts, session notes, etc) would only use the internal ID and not the actual name or ID of the student. For example, if the system records a visit for this student, then the visits table would show a record similar to this:
792901,11/20/2010 11:08:22AM,11/20/2010 11:52:22AM,3930
The above record shows the student's internal ID, sign in date and time, sign out date and time, and the internal ID of the selected activity (3930). The actual activity (e.g. College Algebra tutoring) would be recorded in the Activity table with that internal ID.
The internal IDs are different from one database to the other even if the entered text is the same. In other words, if you enter the same student and activity in a different database, then both the student and the activity will have different internal IDs in the other databases. So for the same student and activity, a sign-in record might look like this in another database:
26880,11/20/2010 11:08:22AM,11/20/2010 11:52:22AM,533
The same applies to other records and tables.
To 'merge' data from different databases, the system would need to resolve each internal ID in every table to its corresponding record, and then try to match that record to a corresponding one in the other database using other fields of that record. In our example it would need to look up "26880" in the second database and then use the associated student's name or ID and look the name or ID in the other database. If it could match it, then it would need to take its internal ID in the other database (i.e. 792901) and add a new record to the visits table using the internal ID of that database. It would need to do the same for the activity and repeat the same process for every record in every table!
In addition to this, the system would need to know what records exist only in the second database to add to the first database! It would also need to know how to handle records that it cannot match (e.g. a student or activity that exists in the second database but not in the first!)
As you can see, this is way too complex, and it would probably be simpler and faster to generate a report of the visits you saved in the wrong database for that day and then add them via System Administration - Edit Sign in Logs to the correct database.
792901,11/20/2010 11:08:22AM,11/20/2010 11:52:22AM,3930
The above record shows the student's internal ID, sign in date and time, sign out date and time, and the internal ID of the selected activity (3930). The actual activity (e.g. College Algebra tutoring) would be recorded in the Activity table with that internal ID.
The internal IDs are different from one database to the other even if the entered text is the same. In other words, if you enter the same student and activity in a different database, then both the student and the activity will have different internal IDs in the other databases. So for the same student and activity, a sign-in record might look like this in another database:
26880,11/20/2010 11:08:22AM,11/20/2010 11:52:22AM,533
The same applies to other records and tables.
To 'merge' data from different databases, the system would need to resolve each internal ID in every table to its corresponding record, and then try to match that record to a corresponding one in the other database using other fields of that record. In our example it would need to look up "26880" in the second database and then use the associated student's name or ID and look the name or ID in the other database. If it could match it, then it would need to take its internal ID in the other database (i.e. 792901) and add a new record to the visits table using the internal ID of that database. It would need to do the same for the activity and repeat the same process for every record in every table!
In addition to this, the system would need to know what records exist only in the second database to add to the first database! It would also need to know how to handle records that it cannot match (e.g. a student or activity that exists in the second database but not in the first!)
As you can see, this is way too complex, and it would probably be simpler and faster to generate a report of the visits you saved in the wrong database for that day and then add them via System Administration - Edit Sign in Logs to the correct database.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users