First, the simple answer to your question is that in your Diagram.ExternalObjectsDropped event handler you can look at the Diagram.SelectedParts collection to see what was dropped.
(The same is true for many of the other Diagram events that operate on the selection, such as Diagram.SelectionMoved or Diagram.ClipboardPasted.)
Second, the issue of when to update the underlying database is a bit more complicated. I assume you do not want the “Save/Load” paradigm of user-directed persistence, but that you do want to keep the database up-to-date “all the time”.
If that’s the case for your application, you probably only want to update your database when a diagram transaction completes. That way you can ignore any temporary node creations, such as when the user cancels the operation they were performing.
There are at least two implementation strategies to accomplish this. You can either implement a DiagramModel.Changed event handler, or you can customize the model’s UndoManager to override the UndoManager.CommitCompoundEdit method.
If you want to implement a DiagramModel.Changed event handler, either add an event handler or override its OnChanged method (and call the base method!). Its ModelChangedEventArgs.Change property will describe the kind of change that just occurred. Look for the ModelChange.CommitedTransaction value.
If you want to override the UndoManager.CommitCompoundEdit method, call the base method first. You also need to make sure you set your model’s DiagramModel.UndoManager property to refer to an instance of your custom undo manager class.
With either implementation strategy you’ll get an UndoManager.CompoundEdit that describes all of the model changes that have occurred within the model transaction. (It’s either the return value from calling the base method or it’s the ModelChangedEventArgs.OldValue.)
You can then iterate over all of the CompoundEdit.Edits and look for the change events that you care about, such as ModelChange.AddedNode and ModelChange.RemovedNode. The ModelChangedEventArgs.Data property will give you the node data.
I hope I have explained myself well enough. In particular, I hope it’s clear that a “mouse-up” or “dropped” event is probably not the right time to modify a database.