SQLTeam.com | Weblogs | Forums

Proposed standard for all data access: RFC

#1

All external commands to databases are reduced to:
Database.Load(item)
Database.Store(item)
Database.Delete(item)
Database.LoadList(list)

//more parameters can be added, up to the vendor.

Thoughts?

0 Likes

#2

sure sounds good to me

0 Likes

#3

Sounds terrible. What if i need to find all items that meet given criteria? What if i want aggregate calculations of some metric?

I will never understand the thinking that you should invest in an RDBMS solution and then dumb it down to something barely better than flat files.

0 Likes

#5

Those commands map stored procedures to an object (or JSON).

You can have aggregate calculations and parameters.

It prevents SQL injection.

It supports all RDBMS features. EDIT: it doesn't support views or returning multiple result sets.

0 Likes

#6

We need data security and standards. Reducing all database commands to Load, Store, Delete & LoadList, allows a DBA to expose a stored procedure interface ONLY.

Eventually, those commands could be implemented as an interface to SQL Server, but in the meantime we increase security and accountability. No one can get through without detection.

//parameters share the same name and data type:
Person p = new Person();
p.ID = 1;
Database.Load(p);

PersonList list = new PersonList();
list.LastName = "Smith";
Database.LoadList(list);
0 Likes

#7

How is that better than just exposing the required functionality you need, with exactly the parameters you need and appropriate function names, through stored procedures?

0 Likes

#8

Load/Store/Delete maps that interface to objects.

Advantages:
One line of code.
Strongly types database to objects.

0 Likes