A digital object identifier (DOI) is a "permanent identifier that can be used to find a book or other resource in any of its available formats, either as a link (in the form of a URL that begins with https://doi.org/) or using a metadata search tool like the one available at Crossref.org)" (Chicago Manual of Style, 18th ed., 1.37).
When a DOI is provided, you should provide it at the end of your reference. Items with a DOI do not include the database name in the citation.
For articles from a library database, without a DOI, "it may be preferable to list the name of the database rather than a URL" (Chicago Manual of Style, 18th ed., 14.72).