Interview Question Collection 2

Sq | Sentence limit query (score greater than 60 and less than 90)

  • select * from students where age >60 and age <90;

Use of Like (Name beginning with Li)

  • like, fuzzy query, wildcards are% and _, underscore is any single character, such as Li _, to find all of Li,
  • % Is a string containing 0 or more arbitrary characters, such as where name like '% 小%' Find a small name anywhere in the name

What are the primary keys and foreign keys, and the difference between left and right

  • The primary key is the identifier that uniquely identifies a record, such as the student number in the student table
  • The foreign key is used to associate with another table. For example, the student number in the score table is not the primary key of the score table (the course number in the score table is the primary key), but this corresponds to the student number in the student table The number is the primary key in the student table and the foreign key in the grade table

The difference between left and right

https://www.cnblogs.com/liandy0906/p/10024776.html

  • The left connection is: based on the data in the left table, if there is no data in the left table and the right table, the data in the left table is displayed as null
  • The right connection is: return the rows of the right table, if a row in the right table has data and there is no data in the left table, the return value of the left table is null

Browser input Baidu, what happened

  1. When the browser enters Baidu, the browser only recognizes the IP address, so this time there will be a DNS domain name resolution service, DNS protocol to find Baidu's IP address through the domain name
  2. Then go to the application layer, the client sends an http request message
  3. The transport layer ensures that packets are reliably transmitted to the TCP protocol. The TCP protocol maintains the connection in the kernel, including the three-way handshake process
  4. The network layer is responsible for the transmission of the IP protocol: the role of the IP protocol is to send the data packets divided by tcp to the receiver, and to ensure that it can be transmitted to the receiver, the mac address of the receiver is also required, which is the physical address. The ARP address resolution protocol can resolve the IP address into the corresponding MAC address.
  5. Link layer transmission data link part: Find the MAC address of the other party in the network, and then send the data to the data link layer transmission. So far, the request message has been sent and the client sends the request.

Long connection and short connection

 

The database finds the names of girls in a class with a score greater than

select name from students stu

inner join score sco on stu.studentNo=sco.studentNo

where score>80 and sex='女'

HTTP request method

There are eight types of HTTP request:

  • post,get,put,delete,head,connect,options,trace,patch

 

UDP and TCP

 

The difference between post and get

  1. In http, GET is used for information acquisition, and it is safe and idempotent. * Note: The meaning of security here refers only to non-modified information
  2. In http, POST is a request for modifying resources on the server.

The difference between GET and POST:

1. get is to get data from the server, post is to transfer data to the server.

Get and post are just a way to transfer data. Get can also transfer data to the server. Their essence is to send requests and receive results. It's just that there is a difference in the format of the organization and the amount of data. There is an introduction in the http protocol

2. get is to add the parameter data queue to the URL pointed to by the ACTION attribute of the submission form, and the value corresponds to each field in the form one by one, which can be seen in the URL. Post is to transmit each field in the form and its content in the HTML HEADER to the URL address pointed by the ACTION attribute through the HTTP post mechanism. The user cannot see this process.

Because get is designed to transmit small data, and it is best not to modify the server's data, browsers are generally visible in the address bar, but posts are generally used to transfer big data, or more private data, so at the address Can't see in the column, can you see that it is not the agreement, but the browser.

3. For the get method, the server uses Request.QueryString to get the value of the variable. For the post method, the server uses Request.Form to get the submitted data.

4. The amount of data transferred by get is small and cannot be larger than 2KB. The amount of data transmitted by post is large, and it is generally defaulted to be unlimited.

5. Get security is very low, post security is high. 

Mysql index, why is B + number fast

 

database. Advantages and disadvantages of indexes

 

tcp handshake three times.

 

The difference between http and https

http: Super Civilization Transmission Protocol, which is clear text transmission

https: encrypted transmission

 

The role of index | group by | aggregation function | connection

Published 29 original articles · Like1 · Visits 588

Guess you like

Origin blog.csdn.net/wennie11/article/details/104982464