1

I'm trying to come up with a good name for a data access object that executes non-query SQL statements. I know DML is a valid term, but I wanted to make sure it is the best.

Right now we have OracleNonQuery, but I'm hoping to find something better.

UPDATE: OracleDML or OracleDMLStatement are good suggestions. I'll probably go with one of those unless someone has a better term.

3 Answers3

7

Just call it a statement. Then you can have an enumeration of statement types: OracleDMLStatement, OracleDDLStatement, and just OracleStatement. If it's an actual piece of PL/SQL you could have OraclePLSQLStatement, but without an example, it's hard to suggest much else.

1

DML and DDL covers all of it. I'm just looking for name suggestions that imply a statement that isn't a query.

I wouldn't conflate DML and DDL into "Statement" or some other single term.

I'd keep things separate and call non-query DML "DML".

There are three sublanguages of SQL that have separate purposes and conflation is a potential issue.

No end-user-oriented application should execute DDL (or DCL) for that matter.

It should be doing DML Statements only. And non-query DML is -- well -- still DML.

Other admin applications may do DDL or even DCL. Because that's so very separate, I'd stay away from "Statement" and use DDL or DCL.

I think the tree looks like this.

  • DML insert, update, delete

    • Query, i.e., the SELECT statement, a subclass of DML.
  • DDL create, drop

  • DCL grant, revoke

S.Lott
  • 45,522
  • 6
  • 93
  • 155
0

You are not creating a DAO to access an oracle database. You are creating a DAO that accesses an Oracle database to solve a problem. Describe the probelem in the name of the DAO. For example, you might create a TpsReportReaderDAO to read TPS reports. Another example is, FlammyJammyHootyDAO might be used to apply Flammy Jammy to Hooty.

Summary: Use meaningful names; Oracle is the tool not the purpose. I don't use a Metal headed, wood handled tool to drive nails, I use a Hammer.

DwB
  • 672