SQL implementation of system log repository