code: def db_dict(c):
      
      db_d = {}
      c.execute('SELECT * FROM library_spectra')
      db_d['library_spectra'] = [list(row) for row in c]
  
      c.execute('SELECT * FROM library_spectra_meta')
      db_d['library_spectra_meta'] = [list(row) for row in c]
  
      c.execute('SELECT * FROM library_spectra_annotation')
      db_d['library_spectra_annotations'] = [list(row) for row in c]
  
      c.execute('SELECT * FROM library_spectra_source')
      db_d['library_spectra_source'] = [list(row) for row in c]
  
      c.execute('SELECT * FROM metab_compound')
      db_d['metab_compound'] = [list(row) for row in c]
  
      return db_d
docs: Get a dictionary of the library spectra from a database
  
      Example:
          >>> from msp2db.db import get_connection
          >>> conn = get_connection('sqlite', 'library.db')
          >>> test_db_d = db_dict(conn.cursor())
  
      If using a large database the resulting dictionary will be very large!
  
      Args:
          c (cursor): SQL database connection cursor
  
      Returns:
         A dictionary with the following keys 'library_spectra', 'library_spectra_meta', 'library_spectra_annotations',
         'library_spectra_source' and 'metab_compound'. Where corresponding values for each key are list of list containing
         all the rows in the database.