Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

share|improve this question
1  
Can you show us what one of these statements looks like? I would have thought that DML and DDL would have covered most of it. –  FrustratedWithFormsDesigner Feb 17 '11 at 15:57
    
DAO? ........10 –  Morons Feb 17 '11 at 16:00
1  
DML and DDL covers all of it. I'm just looking for name suggestions that imply a statement that isn't a query. –  Jordan Parmer Feb 17 '11 at 16:00
1  
@j0rd4n: can you give an example of one these statements that's not a query? If you do, we might be able to help you better. –  FrustratedWithFormsDesigner Feb 17 '11 at 16:05
1  
@FrustratedWithFormsDesigner - A simple insert statement. It uses SQL but it isn't a query. –  Jordan Parmer Feb 17 '11 at 17:08

3 Answers 3

up vote 7 down vote accepted

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.

share|improve this answer
    
+1, "statement" would fit the purpose. –  wildpeaks Feb 17 '11 at 16:21
    
+1 this term is used in the book SQL Antipatterns as well. –  Péter Török Feb 17 '11 at 16:23
    
I need to modify my question. I shouldn't have mentioned DDL because we aren't allowing those. OracleDMLStatement works perfectly. –  Jordan Parmer Feb 17 '11 at 17:11

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

share|improve this answer
    
You are correct. I should have not have said DDL because we aren't allowing those. DML is all we are doing. I'll modify my question to exclude DDL. –  Jordan Parmer Feb 17 '11 at 17:09

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.

share|improve this answer
    
Actually, the goal is to create a generic DOA that wraps a nice OOP pattern we are using. This object abstract the database plumbing and will be used by our data tier. –  Jordan Parmer Feb 17 '11 at 23:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.