//Get the first path in the array.
NSString *documentsDirectory = [paths objectAtIndex:0];
if (![documentsDirectory hasSuffix:@"/"]) {
documentsDirectory = [documentsDirectory stringByAppendingString:@"/"];
}
//Create the complete path to the database file.
NSString *databasePath = [documentsDirectory stringByAppendingString:DB_FILENAME];