当只需要对数据库进行一次查询或简单的更新时,让会话bean直接访问数据库是正确的选择。
When just a query or a simple update to a database is needed, a session bean directly accessing the database is the right choice.
对于该场景,假定用户保留所选择的默认集合,输入一个简单的查询字符串,然后单击Search按钮。
For this scenario, assume that the user leaves the default collection selected, enters a simple query string, and then clicks the Search button.
如果您的服务是对一个具有良好索引的数据库的简单查询,花费少于100毫秒的时间,那么您将看到这两个选择之间巨大的差异。
If your services are doing simple inquiries into a well-indexed database that take less than 100 milliseconds, then you will see a big difference between the two choices.
即使是只从视图中选择列的一个子集,也能用一个简单的SQL查询实现。
Even choosing only a subset of the columns from the view would be a simple SQL query.
到目前为止使用的选择器是简单的标记名查询。
这些查询本身都很简单,只不过从另一个方面证明了XQuery从XML选择和返回数据的灵活性。
None of these on their own are difficult, but they are just additional ways that XQuery provides flexibility in selecting and returning data from XML.
这些查询本身都很简单,只不过从另一个方面证明了XQuery从XML选择和返回数据的灵活性。
None of these on their own are difficult, but they are just additional ways that XQuery provides flexibility in selecting and returning data from XML.
应用推荐