input: Write a python function to extract titles and contents from a given URL and store them in a SQLite database.
  assert extract_and_store('https://example.com') == [(<title1>, <content1>), (<title2>, <content2>)]
  assert extract_and_store('https://anotherexample.com') == [(<titleA>, <contentA>), (<titleB>, <contentB>)]
output: import requests
  from bs4 import BeautifulSoup
  import sqlite3
  
  def extract_and_store(url):
      # Make a request to the given URL
      response = requests.get(url)
      response.raise_for_status()  # Raise an error for bad status codes
      
      # Parse the HTML content using BeautifulSoup
      soup = BeautifulSoup(response.content, 'html.parser')
      
      # Extract titles and contents
      titles_contents = []
      articles = soup.find_all('article')
      for article in articles:
          title = article.find('h1') or article.find('h2') or article.find('h3')
          content = article.find('p')
          if title and content:
              titles_contents.append((title.get_text(strip=True), content.get_text(strip=True)))
      
      # Connect to SQLite database
      conn = sqlite3.connect(':memory:')
      cursor = conn.cursor()
      
      # Create table
      cursor.execute('''
          CREATE TABLE articles (
              id INTEGER PRIMARY KEY AUTOINCREMENT,
              title TEXT NOT NULL,
              content TEXT NOT NULL
          )
      ''')
      
      # Insert data
      cursor.executemany('INSERT INTO articles (title, content) VALUES (?, ?)', titles_contents)
      
      # Commit and close
      conn.commit()
      cursor.execute('SELECT title, content FROM articles')
      result = cursor.fetchall()
      conn.close()
      
      return result