input: Write a function to extract the value of 'name' from query parameters and fetch corresponding records from a database.
  assert search(name='John') == [{'id': 1, 'name': 'John', 'email': 'john@example.com'}]
  assert search(name='Alice') == [{'id': 2, 'name': 'Alice', 'email': 'alice@example.com'}]
  assert search(name='Nonexistent') == []
output: def search(name):
      # Mock database represented as a list of dictionaries
      database = [
          {'id': 1, 'name': 'John', 'email': 'john@example.com'},
          {'id': 2, 'name': 'Alice', 'email': 'alice@example.com'},
          {'id': 3, 'name': 'Bob', 'email': 'bob@example.com'}
      ]
      
      # Filter records where the 'name' matches the given name
      result = [record for record in database if record['name'] == name]
      
      return result