To keep it simple we can say that from where in general is to be traduced with da dove. Only combined with the verb esserefrom where has to be translated with di dove. In a more abstract way one can say that the preposition da is to be used when talking about the source, the origin of something. The final e of dove is omitted if the following verb starts with e as in the case of è, era, erano.