sql update

update for direcory scanning and sql