Next introduction to ORM Query Language (oql)-instanceI. SQL and ORM
Relational Database Service (RDBMS) queries are structured query languages (Structured Query Language). Compared with advanced programming languages (imperative languages), SQL mainly describes what to do,
SQL language query basics: Connection QueryYou can use the join operator to query multiple tables. Connection is the main feature of the relational database model and a symbol that distinguishes it from other types of database management systems.In the relational database management system, the relationship between data does not have to be determined when a table
SQL language Query Basics: Connection queries
Multiple table queries can be implemented by connecting operators. Connection is the main feature of relational database model, and it is also a symbol distinguishing from other types of database management system.
In the relational database management system, the relationship between the data in the table is not determined, and all the information of an entity
The content of this section
Query methods in the NHibernate
NHibernate Query Language (HQL)
1.from clause
2.select clause
3.where clause
4.order BY clause
5.group BY clause
Example analysis
Conclusion
In the previous section, we initially set up a nhibernate program, completed mapping the Customer
The content of this section
Query methods in the NHibernate
NHibernate Query Language (HQL)
1.from clause
2.select clause
3.where clause
4.order BY clause
5.group BY clause
Example analysis
Conclusion
In the previous section, we initially set up a nhibernate program, completed mapping the Customer table and read
have an * number, and if you do not add a where condition, all records in the entire table are deleted.Example:DELETE from student WHERE sid= ' s0002 ';INSERT into Course VALUES (' c0001 ', ' Oracle ', ' Teacher 1 ', 32);INSERT into score VALUES (' sc0001 ', ' s0001 ', ' c0001 ', 100);SELECT * from student;SELECT * from course;SELECT * from score;4.truncate: is a DDL statement, but can also achieve the effect of deleting data from an entire tableSyntax format: TRUNCATE TABLE nameExample: trunca
(the value of S.sname,c.courseid,c.score), and if no matching record is found, a null value is populated to populate the recordset.Some of the students did not take any course exams, so there is no relevant Test record in the score table, the corresponding account number and scores are filled with null (null value).B, right outer connection queryA right outer join query is similar to a left OUTER join query
Jpql: Java persistent Query Language, which constructs query statements with object-oriented query syntax.
JPA uses the javax. Persistence. query interface to represent a query instance. The
(NULL)Criteria Criertia = Session.createcriteria (Student. Class); Criteria.add (Restrictions.eq (new Integer)); Criteria.add (Restrictions.isnull ("age")); = criteria.list (); = (Student) list.get (0);Query all student objects with student names beginning with the letter F and Sort by name in ascending orderCriteria Criertia = Session.createcriteria (Student. Class); Criteria.add (Restrictions.like ("name", "f%")); Criteria.addorder (ORDER
Specification
Original: "C # Version 3.0 Specification", MicrosoftTranslation: Lover_pQuery Expression provides a language-integrated syntax for queries that resemble relational and hierarchical query languages, such as SQL and XQuery.
Query-expression:From-clause Query-body
From-clause:From From-generators
From-genera
Ask how to use thinkphp query language to do the following query:
Table A (classification table)ID Name1 L2 LL3 lll
Table B (Table of Contents)ID CID XName1 2 x2 1 XX3 2 XXX4 1 xxxxx5 1 xxxxxxx
select a.id,a.name,(select count(id) as counts from b where b.cid=a.id) from a//查询分类下的项目数,没有的显示0,及分类id,名称
return:ID name counts1 L 32 LL 23 LLL 0
Reply content:
Ask h
Similar to SQL (Structured Query Language), Cassandra will also provide Cassandra query statements (cql) in future releases ).
For example, if the keyspace name is websiteks and cql is used:
Use websiteks;
Query the value of column family with standard1 and key as K:
Select from standard1 where
The contents of this section
The Query method in NHibernate
NHibernate Query Language (HQL)
1.from clause
2.select clause
3.where clause
4.order BY clause
5.group BY clause
Example analysis
Conclusion
In the previous section, we initially set up a nhibernate program to map the Customer table and read the data function, which is a preliminary discussion
--Internal connection two kinds of equivalent connectionSelect R.*,b.bummc from T_hq_ryxx R, t_hq_bm b where R.BUMBM = B.BUMBMSelect R.*,b.bummc from T_hq_ryxx r Inner joins T_HQ_BM B on r.bumbm = B.BUMBM--No equivalent connectionSelect R.*,b.bummc from T_hq_ryxx R, t_hq_bm b where R.BUMBM > B.BUMBMSelect R.*,b.bummc from T_hq_ryxx r Inner joins T_HQ_BM B on R.BUMBM --Self-connectedSELECT * from T_hq_ryxx A, t_hq_ryxx b where A.BUMBM = B.BUMBM--Outer connection left connection to ensure the inte
C language Sigprocmask () function: query or set a signal maskheader file:
#include
To define a function:
int sigprocmask (int how, const sigset_t *set, sigset_t * oldset);
Function Description: Sigprocmask () can be used to change the current signal mask, the operation depends on the parameters how to determine:1, Sig_block new signal mask by the current signal mask and parameter set spec
thinkphp query Language with coherent operation can be very good to solve the complex business logic requirements, this article we first to in-depth understanding of the framework of the query language.
1. Query Language Introduc
In the previous article, we learned the basic data CURD method, but in more cases, due to the difference in business logic, CURD operations are often not that simple, especially under complicated business logic, this is also a shortcoming of the ActiveRecord mode. ThinkPHP query language with coherent operation can... "> In the previous article, we learned the basic data CURD method, but in more cases, due
In the previous article we have mastered the basic data curd method, but in more cases, due to the differences in business logic, curd operations are often not so simple, especially complex business logic below, this is the ActiveRecord mode of deficiencies. thinkphp query Language with coherent operation can be very good to solve the complex business logic requirements, this article we first to in-depth un
New Orcas language features-query syntax
New Orcas language features-query syntax
[Original address][Original article publication date] Saturday, 2017l 21,200
Last month I started a post series to discuss some new VB and C # language features released as part of Visual St
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.