Dealing with database+framework