mysql - updating results -
table1
create table master (id int primarykey, start_point int, data blob ) 'changes' table:
sample data
1, 0, data1
2, 1, data2
3, 2, data3
4, 4, data4
5, 6, data5
6, 8, data6
table2
create table changes (id int, start_point int, user varchar(10), data blob ) user table:
sample data
5, 6, user1, data5(with changed data)
3, 2, user2, data3( changes)
4, 6, user2, data4(with changes)
5, 8, user2, data5 (with changes)
table3 create table users (id int, user varchar(10) )
sample data
1, user1
2, user1
3, user1
4, user1
5, user1
1, user2
2, user2
3, user2
4, user2
5, user2
final result user1 should (information of id's user1 provided table3)
0, data1----from master
1, data2----from master
2, data3----from master
4, data4-----from master
6, data5...this changes
final result user2 should be
0, data1
1, data2
2, data3
6, data4
8, data5
so trying get.....my problem here getting changed record both changed , master table. don't want master record changed ones....can me?
for such simple application, try implementing every way can think of. unlikely take more hour each, in day's time hit upon effective implementation.
you discover schemes complicated or grungy won't inspired complete them. that's part of engineering process.
in short, relax. try few ideas, perhaps writing rough schema , query retrieve data. consider how hard write queries populate data, including referential integrity.
Comments
Post a Comment