Database Architecture and Enhanced Data Models
Temporal, Multimedia, Deductive and XML/Internet Databases
- Temporal databases track how data changes over TIME rather than storing only the current state — VALID time (when a fact was true in the real world) and TRANSACTION time (when it was recorded in the database) are tracked as separate dimensions, since a correction entered today about a fact that was true last year needs both.
- Multimedia databases store and query images, audio, video and other unstructured/binary content, typically needing CONTENT-BASED retrieval (find images similar to this one) rather than exact-match queries, since a byte-for-byte comparison of media is rarely what a query actually means.
- Deductive databases augment stored FACTS with logical RULES, and answer queries by inferring new facts from the rules (a Prolog-like, logic-programming approach) — this is what distinguishes a deductive database from a plain relational one, which can only return facts already stored, never facts inferred from rules over them.
- XML/Internet databases and mobile databases: XML's self-describing, hierarchical (tree-shaped) structure suits semi-structured web data poorly served by the rigid relational model; mobile databases must additionally handle intermittent connectivity and DISCONNECTED operation, replicating and later synchronising/reconciling data once connectivity resumes.
- Geographic Information Systems (GIS) store spatial data (points, lines, polygons tied to real-world coordinates) alongside conventional attribute data, and need spatial operators and spatial indexes (e.g. R-trees) that a plain relational engine's B+-tree indexes are not built to answer efficiently — 'find all restaurants within 2 km' is a spatial query, not an equality or range query on an ordinary attribute.
Distributed Databases and Client-Server Architectures
A distributed database is a single logical database whose data is physically spread across multiple sites connected by a network, appearing to users as one integrated database (distribution transparency). Data can be FRAGMENTED (a relation split into horizontal fragments — disjoint subsets of rows — or vertical fragments — disjoint subsets of columns — and distributed across sites) and/or REPLICATED (multiple copies of the same data at different sites, trading extra storage and synchronisation cost for availability and faster local reads). A query optimiser for a distributed database must additionally decide WHERE each part of a query should run and how to minimise the volume of data shipped over the network — a cost dimension that a single-site optimiser never has to consider.
Genome Data Management
Genome data management is a specialised application of database technology to biological sequence data (DNA/RNA/protein sequences), which is characterised by very high volume, sequences of variable and sometimes enormous length, and queries that are fundamentally about approximate SIMILARITY (does this sequence resemble a known one, allowing for insertions/deletions/substitutions) rather than exact match — a query shape closer to multimedia content-based retrieval than to conventional relational lookup, and one for which specialised indexing (e.g. suffix trees/arrays over sequence data) is used rather than a plain B+-tree.
Key takeaways
- The three-schema architecture separates external (per-user), conceptual (whole-database logical) and internal (physical storage) levels.
- Logical data independence protects against a conceptual-schema change; physical data independence (easier to achieve) protects against an internal-schema change.
- Temporal databases separate valid time from transaction time; deductive databases answer queries by inferring new facts from stored rules, not just returning stored facts.
- A distributed database can fragment (horizontal/vertical) and/or replicate its data across sites — these are independent design decisions.
- GIS and genome databases both need specialised (spatial or sequence-similarity) indexing that a plain relational B+-tree does not efficiently support.
Practice questions (8)
Attempt each one before opening the answer. Every explanation names the tempting wrong option as well as the right one, because that is where marks are lost.
In the ANSI-SPARC three-schema architecture, the conceptual schema describes:
Show answer
Answer: A — The whole database's logical structure, independent of any one application and independent of physical storage
The conceptual schema is the single, application-independent logical structure (entities, relationships, constraints) that sits between the many external (per-user) schemas and the one internal (physical) schema.Adding a new index to speed up queries, without changing the conceptual schema at all, relies on:
Show answer
Answer: A — Physical data independence
An index change is an internal-schema (physical storage) change; physical data independence is precisely the property that such a change requires no change to the conceptual schema above it.A deductive database differs from a plain relational database chiefly in that it:
Show answer
Answer: A — Can answer queries with facts inferred from stored logical rules, not just facts already stored
A deductive database augments stored facts with logical rules and infers new facts at query time, a Prolog-like capability a plain relational database, which returns only what is explicitly stored, does not have.A temporal database tracking both valid time and transaction time is needed chiefly because:
Show answer
Answer: A — A correction entered today may concern a fact that was true at some earlier point in the real world
Separating valid time (when a fact held in reality) from transaction time (when it was recorded) is what lets a database correctly represent late corrections and retroactive updates without losing the history of what was believed when.A relation split into horizontal fragments distributed across two sites means:
Show answer
Answer: A — Disjoint subsets of ROWS are stored at each site
Horizontal fragmentation splits a relation row-wise; vertical fragmentation would instead split it column-wise, and full copies at both sites would instead be replication rather than fragmentation.Which of the following are true of Geographic Information Systems (GIS) databases? (More than one option may be correct.)
Show answer
Answer: A — They store spatial data such as points, lines and polygons tied to real-world coordinates; B — They typically need spatial indexes such as R-trees for efficient proximity queries; D — 'Find all restaurants within 2 km' is an example of a spatial query
GIS data is fundamentally spatial and needs spatial indexing structures built for proximity/containment queries; a plain B+-tree, built for ordered/equality lookups on a single attribute, does not answer such queries efficiently on its own.Name the term for a database design choice in which the SAME data is stored as multiple copies at different sites, trading extra storage and synchronisation cost for higher availability and faster local reads.
Numerical answer — type the value.
Show answer
Answer: replication
Replication is independent of fragmentation — a relation can be replicated wholesale, fragmented without replication, or both fragmented and replicated.Queries on genome sequence data are fundamentally about:
Show answer
Answer: A — Approximate similarity (allowing insertions, deletions and substitutions), not exact match
A genome query typically asks whether a sequence resembles a known one within some tolerance for insertions/deletions/substitutions, which is why specialised sequence-indexing structures such as suffix trees/arrays are used rather than a plain B+-tree built for exact or ordered lookups.