开发者

DB URL to a Record? How-to?

Is it plausible to think we can access the contents of a database field or fields via a URL? For ie, can "http://dbms_node:port/database/tablename?query" work? I guess the limitation may be where we can specify the selectors? Can that be done via url fragme开发者_Go百科nts?


If I am right in thinking you are suggesting querying over a get this is a really bad idea due to the fact you would be opening up your database to malicious attack I could executet any query I liked upon your database. I really recommend not using this.


While I am not aware of any DB offering such a service, the way of accessing content you describe is actually close to a web standard called "REST". (Wikipedia).

Please pay attention to the answer by Deviland that this may be a huge security hole if not thought carefully.


Unless whichever database software you're using comes with a service layer like this already, you could write some kind of a service that sits in front of that database to accomplish something similar. Of course you'd want to be careful with regards to the security implications of allowing queries against your database through URL parameters and the like. (that's what the similar is for - and what Deviland is referencing)


sounds like kind of couch db. http://couchdb.apache.org

googling RESTful db connector gives also some nice hints

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜