Application, database and schema?

From: JMF (jfavaro_at_tin.it)
Date: 01/11/05


Date: Tue, 11 Jan 2005 11:36:21 GMT

While we're sort of on the topic of O-O and databases: a colleague has been
drawing a class diagram for a system where there's also an RDB (I think it's
MySQL) that does something simple like store the log, the list of events.
But the way he depicted this situation I found puzzling.

           <<protocol>>
Application-----------> Schema
    | / \
    | ___
    | |
    V |
  MySQL ---------->ApplicationDatabase

Since that probably doesn't print well, here's how he described it: "The
application has an association with the MySQL RDB. It in turn has an
association to the actual database containing the data."

That part makes sense to me. But then he shows the ApplicationDatabase
(containing the user's data) realizing an interface, which is its schema. He
explained this saying "The way I see it, a database's schema is effectively
its interface, because that's how you access it."

Then he put a dependency from the Application to the Schema, stereotyped
with <<protocol>>. His explanation: "The Application depends on the Schema
of my database, because if I change the schema, that affects my application.
The protocol is SQL."

Well, that part about the schema being the interface to the database doesn't
make much sense to me. Yet I do get his point about how the application does
have some kind of dependency on the schema.

But I'm not sure how to get this untangled. How would you express all this?

John



Relevant Pages

  • Re: in need of a pattern
    ... over to a relational database. ... To deal with RDB access one just needs to raise the level of abstraction. ... That's how GUI builder tools exist; they provide identity mapping and external configuration data that allows the GUI screens to be initialized properly using data from the problem solution. ... If the interface is designed around the problem solution's needs for data, then changing the persistence mechanisms will not affect the problem solution because the interface will stay the same. ...
    (comp.object)
  • Re: Application, database and schema?
    ... Specific data storage paradigms like RDB schemas and SQL ... >> should be hidden from the problem solution. ... Do you think you will change from RDB to some other type of database? ... an interface is the set of operations ...
    (comp.object)
  • Re: Decouple SQL queries from class in OOP design
    ... asserting that a database instance should have only one client? ... Why would you change the schema if it ... better support a planned system that could benefit from inheritance ... > schema is an interface. ...
    (comp.object)
  • Re: Java is becoming the new Cobol
    ... In the Unisys 2200 environment using their Network Database Server, you get a schema work area depending on how you invoke the schema. ... However, it not only copies the schema area into the program, but the "DMCA" (Database Management Communication Area - basically, the block of information that holds your connection state) is copied in too. ... So, you're left with working-storage, which makes it visible to your program only, or common-storage, which makes it visible to programs linked in. ...
    (comp.lang.cobol)
  • Re: Application, database and schema?
    ... Subject: Application, database and schema? ... application of an RDB. ... is solving is "monitor the safety-related equipment," and the data storage ...
    (comp.object)