Working on sql-base