AAmit’s LibraryLEARN · PRACTISE · REFLECT

Markets and opportunities × Databases

Business lens: Markets and opportunities · Technology lens: Databases

Reading scope: Original synthetic teaching. Primary links support selected background, not invented business outcomes or implemented organisational systems.

A market register is a model of evidence

A database helps an organisation distinguish an account, an enquiry, a need and an opportunity. These are related objects, but they are not interchangeable rows. One account can make several enquiries, while one enquiry may concern several products. If a market report counts every join result as a new opportunity, the business can mistake record multiplication for growth. Define the reporting object before designing the query. Record stable identifiers, the status of the enquiry and the evidence behind the classification. A database is useful because it can preserve distinctions and relationships that a loosely maintained spreadsheet may blur, not because storage itself establishes demand.

Agree on definitions across departments

Sales owns opportunity stages and the evidence required to change them. Marketing records the source and campaign context. Finance distinguishes a tentative commercial discussion from recognised revenue. Operations assesses whether the requested service is deliverable. Data stewards define ownership, corrections and retention for the register. Consultation should resolve whether an account is a legal entity, a site or a purchasing group, because each definition changes the denominator. Keep historical stage changes rather than silently replacing yesterday's evidence. Access should support each department's work without exposing every free-text note to every user. The schema is therefore also an agreement about organisational responsibility.

See the distortion caused by a join

In the invented worksheet, there are twenty distinct enquiries linked to thirty-two product-interest rows. A report that counts joined rows displays thirty-two enquiries, overstating the distinct-enquiry count by twelve. The inflation relative to twenty is 12/20 = 60%. The average number of interest rows per enquiry is 32/20 = 1.6. These quantities describe the fixture, not the number of interested people or the size of a market. A distinct count may fix this particular report, but it does not repair ambiguous identifiers, duplicated source records or an incorrect relationship. Inspect the intended grain and join keys before selecting an aggregation.

Preserve uncertainty and corrections

An incomplete record should not disappear merely because a query uses an inner join to a classification table. Such filtering can hide precisely the enquiries that need review. Conversely, a missing classification is not automatically a valid opportunity. Use an explicit unresolved state and a review owner. Corrections should retain enough provenance to explain why a market estimate changed. Consider a customer merge: two account identifiers may describe one organisation, but their separate sites or contracts may still matter. The reporting question decides which distinctions are relevant. Database design and managerial judgement must cooperate; neither a clever query nor a business intuition can substitute for clear evidence definitions.

Practise grain before writing a forecast

Use the SQL-joins lesson to sketch account, enquiry and product-interest tables with declared keys. Create a tiny invented dataset in which one enquiry has two interests and another has no classified interest. Predict the joined rows before executing any query. Compare row count, distinct enquiry count and the unresolved count. The supplied arithmetic fixture does not execute SQL; it checks the stated inflation calculation. For the portfolio, include a query proposal, a grain diagram and a reconciliation note. Explain which report should be used for workload, which might support product-interest analysis and why neither alone is a forecast of revenue or market demand.

Question words and learning depth

Who changes an opportunity stage? Whom does a duplicate account represent? Whose correction is authoritative? What does one row mean? Where is source evidence retained? When is a merge reviewed? Why count distinct enquiries? Which join preserves unresolved records? How is the report reconciled? Foundation study distinguishes the objects. Undergraduate study reconstructs join multiplication. Postgraduate study critiques alternative grains and stage histories. Research study proposes a bounded comparison of data-quality policies and their effect on reported opportunity counts. A credible conclusion states the reporting object, unresolved records and limitations before presenting a number that managers may treat as evidence for investment.

Study questions and answers

How much does thirty-two joined rows overstate twenty enquiries?

Twelve rows; 12/20 = 60% relative inflation.

Marking guide: Credit joined-row excess twelve and relative inflation 12/20 = 60%.

What is the average number of interest rows per enquiry?

32/20 = 1.6; it is a relationship density, not a market size.

Marking guide: Credit 32/20 = 1.6 interest rows per inquiry as relationship density, not market size.

Does DISTINCT fix every opportunity-register problem?

No. Identity, grain, missing classifications and source duplicates still need review.

Marking guide: DISTINCT does not resolve all identity, grain, missing classification or source-duplicate issues.

Practice task

Draft an enquiry schema, join-grain diagram and reconciled opportunity report.

Practice bridge

  1. Draft an enquiry schema, join-grain diagram and reconciled opportunity report.
  2. Reproduce the stated numerical example, change one valid assumption, and explain the new result and its departmental consequence.

Open connected lab

Boundary: Supplemental invented worksheet and an existing lesson connection. No real systems, user study, market survey, model training, security audit or hosted service is executed. The case-specific boundaries in the full reading still apply.

Sources and further reading

  • PostgreSQL — Aggregate functions
    Scope: Selected grouping and aggregation background; not executed SQL, verified register content or a physical inventory.
    Access: Selected public reading without an account; certificates, paid service entitlements and hosted execution not checked.
  • Python — sqlite3
    Scope: Selected local database background; the worksheet does not implement a prospect or learning database.
    Access: Selected public reading without an account; certificates, paid service entitlements and hosted execution not checked.
  • PostgreSQL — Joins between tables
    Scope: Inner pairing and preserved unmatched left rows.
    Access: Public selected reading; no hosted execution, certificates or account entitlements verified.

Related chapters

Interactive practice

Open workshop · Open runnable practice · Open lab lab-13

Open interactive matrix reading