This is targeted at Technical Leads and Architects, but Anyone can answer this - all thoughts are welcome - have fun with it.
I want to abstract a large database store (relational, OLTP) from the application layer by having the application consider the database as a service. The natural way of doing this is by calling sprocs, but traditionally these follow CRUD paradigms and in keeping with my abstraction thinking I want to abstract away all knowledge of data structures within the database and concentrate on business process.
So instead of having 'Save Invoice' business process be this....
- Start Transaction
- Create Invoice Header
- For Invoice Line Items
- Create Invoice Line Items
- Commit Transaction
... instead I want to pass into the database structured data representing the invoice.
I can pass down an XML document containing the invoice, but this is what I want to avoid on the Database side:
- Parsing XML
- XML Validation
- Parameter extraction and binding into Oracle PL/SQL objects
Off-course, in all cases, no matter the solution, this must be done. However, I don't want to pay the XML document penalty (the angle bracket tax).
Hence the question - what is the most efficient way to send and receive and structure data into Oracle stored procedures?
I would like to hear from those who want to argue for JSON, ATOM or other formats.
Also consider native or binary mechanisms to achieve this. What about constructing and sending in Oracle tables (memory datasets)? Has anyone done this before? What where your experiences?