def savedb(self,Db=None,overwrite=False):
        
        # if table is empty, raise an exception
        if self.isempty(): raise Exception('Empty table')
        
        # connect to the local database file
        dbconnect=sqlite3.connect(Db)
        cursor=dbconnect.cursor()
        tablename=self.get_name()
        
        # create a table
        sqlcmd="""create table %s (""" %(tablename)+','.join(self.columns)+""")"""
        try:
            cursor.execute(sqlcmd)
        except sqlite3.OperationalError,e:
            if overwrite:
                warnings.warn("Overwritting the existing table")
                cursor.execute("""drop table %s""" %(tablename))
                cursor.execute(sqlcmd)
            else:
                raise sqlite3.OperationalError(e)
            
        # write the annotation in the table
        num_columns=len(self.columns)
        chroms=self.get_chroms()
        sqlcmd="""insert into %s (""" %(tablename)+', '.join(self.columns)+""") values (""" +', '.join(['?' for ix in range(0,num_columns)])+""")""" 
        for chrom in chroms:
            export_data=self.fit_to_db(chrom)
            cursor.execute(sqlcmd,tuple(export_data))
                
        # save the change
        dbconnect.commit()
        #close the database file
        cursor.close()
        dbconnect.close()
Gets the path for the provided resource.
dataset/ETHPy150Open taoliu/taolib/Assoc/tables.py/P.savedb--crossover with--dataset/ETHPy150Open cloudify-cosmo/cloudify-manager/tests/testenv/utils.py/get_resource