<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add(self, document):
 """ Add a document to the database. """

        docid = int(document.uniqueIdentifier())
        text = u' '.join(document.textParts())

        self.store.executeSQL(self.addSQL, (docid, text))