Oddity database catalog

Local data built for real projects

Launch directories, location tools, research products, and business applications with structured data you can actually use.

Browse recent data
Modern connected city and location data visualization
Secure downloadable data product moving through entitlement and verified delivery checkpoints

Designing Downloadable Data Products for Secure, Reliable Delivery

A downloadable data product is not simply a file behind a payment button. It is a promise that the buyer will receive the correct data, in the expected format, under understandable rights, through a delivery path that can prove what happened and recover cleanly when something fails.

Design the product before packaging the file

Secure delivery begins with a precise product definition. A buyer needs to know what the dataset covers, which fields are included, how current it is, what formats are available, and which uses the license permits. If those details are vague, even flawless delivery can produce a dissatisfied customer.

Create a product manifest that separates identity from presentation. Give the product a stable internal ID, a version, a release date, a record count, supported formats, a schema reference, and a content checksum. Keep marketing copy and visual assets connected to that identity, but do not use a filename or page title as the only link between the product and its fulfillment records.

The manifest should also define what changes constitute a new version. A refreshed record set, revised schema, corrected file, or new format may require different treatment. Buyers and support staff should be able to determine which release was purchased and which exact file was delivered.

Package data for people who must actually use it

A download can be technically valid and still be frustrating. CSV files may open differently across spreadsheet tools. Database exports may require a specific server version or character set. Compressed archives may hide the real file behind unnecessary folders. Large files may exceed common desktop application limits.

Package each format deliberately. Use predictable names, include the product and version without exposing internal storage paths, and provide a short readme that explains encoding, delimiters, date formats, null values, field definitions, and import considerations. When a product includes multiple files, document their relationships and join keys.

  • CSV and delimited files: specify UTF-8 encoding, delimiter, quoting rules, line endings, and whether a header row is included.
  • SQL exports: identify the database family and compatible version, character set, table names, and whether schema creation is included.
  • Spreadsheet formats: disclose row or column limits and avoid presenting a truncated workbook as the complete dataset.
  • Compressed archives: use a consistent root folder, exclude temporary files, and verify extraction before release.

A sample should reflect the real structure without exposing licensed volume or sensitive records. The sample, schema, product page, and delivered file should agree. Differences between them create support work and reduce trust.

Make licensing part of the entitlement

Payment proves that money moved. It does not, by itself, define what the buyer may download or do with the data. The order item should preserve the selected product, version, license level, download allowance, and any update entitlement at the moment of purchase.

This item-level record matters when one order contains several products or when a customer buys the same dataset more than once. Counting downloads only by customer and product can incorrectly consume a new purchase with activity from an older order. The allowance belongs to a specific entitlement, not to the customer's lifetime relationship with the product.

License language should be consistent from the product page through checkout, invoice, customer portal, and downloaded documentation. If usage rights, publication rights, and broader master rights are different products, the interface should explain the meaningful difference before purchase and preserve the chosen level afterward.

Keep commerce, entitlement, and delivery as separate states

A dependable system does not collapse “ordered,” “paid,” “eligible,” and “downloaded” into one status. Each answers a different question.

  1. The order records the commercial commitment and its line items.
  2. The payment record stores provider references, environment, amount, currency, and reconciliation evidence.
  3. The entitlement determines whether a particular customer may access a particular order item.
  4. The file definition identifies the active release and storage object.
  5. The delivery attempt records reservation, streaming, completion, or failure.

Separating these states makes recovery possible. A payment-provider timeout can leave a recoverable invoice without falsely granting access. A storage problem can fail delivery without changing a paid order. A refund or dispute can suspend an entitlement while preserving financial and audit history.

One operational rule

Never infer successful delivery from a generated link, a started response, or a provider redirect. Record completion only after the authorized stream finishes successfully.

Authorize every request from current evidence

A download URL should not be a permanent key to a file. At request time, the system should verify the signed-in customer, order ownership, order state, item identity, product identity, license options, active file definition, and remaining allowance. Request parameters are claims to validate, not facts to trust.

Use positive integer identifiers and parameterized queries. Confirm that the requested database ID matches the order item's stored options. Reject inactive files, unpaid or reversed orders, mismatched customers, invalid product types, and paths that resolve outside approved storage.

Short-lived signed links can be useful when a storage provider serves the bytes, but the signature should be bound to the customer, entitlement, file, expiration, and a single intended action. Avoid placing credentials, raw storage locations, or sensitive customer data in the URL.

Prevent simultaneous requests from exceeding the allowance

A simple “count completed downloads, then start another” query is vulnerable to concurrency. Two browser requests can both observe one remaining use and both proceed. The fix is an atomic reservation.

Before streaming, lock or transactionally reserve capacity for the specific order item. Count completed deliveries plus active, non-expired reservations. If capacity remains, create a unique attempt record and move it through explicit states such as reserved, streaming, completed, failed, expired, or revoked. If the stream fails, release the reservation while preserving failure evidence.

Reservations should expire after a bounded period so an abandoned connection does not permanently consume access. Repeated requests with the same idempotency key should return the same attempt rather than creating additional allowance.

Treat storage as a managed inventory

The catalog database can remain the source of truth for product and file definitions while the bytes live in object storage, local protected storage, or both. Add a storage manifest that records the object key, provider, byte size, content type, checksum, provider modification time, verification time, and operational state.

Object keys must be validated. Reject absolute paths, null bytes, parent-directory traversal, and ambiguous case changes. For local files, resolve the real path and prove it remains beneath the configured storage root. For remote objects, compare metadata without exposing credentials or downloading licensed content merely for an admin preview.

A migration between storage providers should happen per object. Copy to a temporary target, compare size and SHA-256 checksum, promote atomically, and activate only the verified record. Keep the former provider as a read-only fallback during a defined rollback window. Do not flip the entire library based only on a successful test file.

Stream large files without weakening evidence

Large datasets should not be loaded fully into PHP memory or application buffers. Use a streaming response with the correct content type, a safe customer-facing filename, and headers that discourage intermediary caching of protected material. Disable accidental output before headers and avoid debug messages that corrupt the archive.

The audit sequence should distinguish started from completed. Create the attempt before transfer, record the file and entitlement selected, begin streaming, and mark completion only when the transfer method reports success. Network disconnects are difficult to prove perfectly from the server alone, so support evidence should be honest about what the system observed.

Where resume support is offered, validate range requests carefully and ensure one logical delivery does not consume multiple allowances. Where resume is not supported, say so and provide a recovery route for legitimate failures.

Give customers a useful delivery workspace

The customer portal should show purchased products, license type, version, order reference, remaining allowance, active formats, and recent delivery outcomes. The primary action should be obvious, but the page should also explain why a download is unavailable and what the customer can do next.

Do not expose internal outcome codes such as “5” without a label. Use language like Completed, Started, Failed authorization, File unavailable, or Quota reached. Show timestamps in readable local context and link support requests to the order item and attempt evidence automatically.

A failed download should not force the customer to explain the entire purchase from scratch. Support staff should see the customer, order, product, file type, storage evidence, attempt state, and allowance in one connected workspace. A protected reissue can increase an allowance or create a replacement entitlement, but it should require a reason and leave an audit trail.

Monitor the fulfillment chain, not just the file server

Useful monitoring follows the complete path. Track paid orders without entitlements, active entitlements without available files, file definitions missing from storage, started attempts that never complete, repeated failures, quota anomalies, checksum changes, and provider outages.

Separate production and test activity so synthetic orders do not inflate revenue or delivery metrics. Test files should be harmless fixtures stored in a dedicated location. A test run should register every artifact it creates and clean up only those exact records after verifying ownership and fingerprints.

Dashboard counts should link to the records behind them. A “delivery failures” number is useful only when an operator can open the affected attempts and see whether the cause was authorization, quota, storage, streaming, or customer interruption.

Plan customer-safe recovery

Recovery rules should be designed before the first failure. Decide when a customer may retry automatically, when a stale reservation expires, when support can reissue access, and when a file problem should disable delivery for everyone.

Never delete financial or fulfillment history merely to make a test or mistake disappear. Preserve orders, provider evidence, administrative audits, and completed delivery records where business or accounting history requires them. Correct bad state with explicit reversal, revocation, replacement, or annotation.

Backups must include more than the files. Preserve catalog definitions, entitlement options, manifests, checksums, provider references, and restoration instructions. Periodically verify that a restored object still matches its manifest and can be served through the authorized path.

Release checklist for a downloadable data product

  • The product page, schema, sample, and packaged files describe the same release.
  • Every format has documented encoding, structure, and compatibility.
  • The selected license and allowance are preserved on the order item.
  • Paid state is reconciled to an authoritative provider or approved local record.
  • Authorization is item-scoped and rechecked on every request.
  • Concurrent final-allowance requests produce only one reservation.
  • Each active file has verified size, type, location, and checksum evidence.
  • Paths cannot escape approved storage and credentials remain outside source code.
  • Completion is recorded after streaming, not before it.
  • Customers and staff see human-readable outcomes and connected evidence.
  • Failure, reissue, refund, revocation, migration, and rollback paths are tested.
  • Production logs and fulfillment health are reviewed after release.

Sell confidence along with the data

A reliable download experience makes several promises at once: the description is accurate, the rights are understandable, the payment is recognized, the correct customer receives the correct file, the allowance is fair, and support can explain what happened.

When product identity, licensing, entitlement, storage, and delivery evidence remain connected, fulfillment becomes easier to operate and easier to trust. Buyers receive a usable product instead of a mysterious file link, and the business gains a system that can recover from failure without guessing or rewriting history.

Community discussion

0 approved comments

Account-linked contributions reviewed by Oddity staff.

No approved comments yet

Start a useful discussion below. Your contribution will appear after staff review.

Oddity Data Updates

Know when fresh data arrives.

Receive occasional notices about new and substantially updated database releases. No third-party mailing list.

Oddity Software

Details