code: def IsDatabaseLink(link):
      
      if not link:
          return False
  
      # trimming the leading and trailing "/" from the input string
      link = TrimBeginningAndEndingSlashes(link)
  
      # Splitting the link(separated by "/") into parts 
      parts = link.split('/')
  
      if len(parts) != 2:
      	return False
  
      # First part should be "dbs" 
      if not parts[0] or not parts[0].lower() == 'dbs':
          return False
  
      # The second part is the database id(ResourceID or Name) and cannot be empty
      if not parts[1]:
      	return False
  
      return True
docs: Finds whether the link is a database Self Link or a database ID based link
  
      :param str link:
          Link to analyze
  
      :return:
          True or False.
      :rtype: boolean