def METHOD_NAME(self, placement_order=None):
    """
    :param list(~pacman.model.placements.Placement) placement_order:
        the optional order in which placements should be examined
    :return: DSG targets
    :rtype: DsSqlliteDatabase
    :raises ConfigurationException:
        If the DSG asks to use more SDRAM than is available.
    """
    # iterate though vertices and call generate_data_spec for each
    # vertex
    ds_db = DsSqlliteDatabase()
    ds_db.write_session_credentials_to_db()
    ds_db. set_app_id()
    if placement_order is None:
        placement_order = FecDataView.iterate_placemements()
        n_placements = FecDataView.get_n_placements()
    else:
        n_placements = len(placement_order)
    progress = ProgressBar(n_placements, "Generating data specifications")
    vertices_to_reset = list()
    for placement in progress.over(placement_order):
        # Try to generate the data spec for the placement
        vertex = placement.vertex
        generated = self.__generate_data_spec_for_vertices(
            placement, vertex, ds_db)
        if generated and isinstance(
                vertex, AbstractRewritesDataSpecification):
            vertices_to_reset.append(vertex)
        # If the spec wasn't generated directly, and there is an
        # application vertex, try with that
        if not generated and vertex.app_vertex is not None:
            generated = self.__generate_data_spec_for_vertices(
                placement, vertex.app_vertex, ds_db)
            if generated and isinstance(
                    vertex.app_vertex,
                    AbstractRewritesDataSpecification):
                vertices_to_reset.append(vertex.app_vertex)
    # Ensure that the vertices know their regions have been reloaded
    for vertex in vertices_to_reset:
        vertex.set_reload_required(False)
    self._run_check_queries(ds_db)
    return ds_db