A small view has big secrets and a view has big secrets.
View, what is it, nie? When we were in elementary school, we were touched by the concept of view. At that time, the sky was always so blue, and the cloud was always so chic. Given a three-dimensional image, let her friends draw the three views of this image, namely, the main view, the top view, the Left view, and the time-frame migration. She once again appears in front of me, this time, she meets me in another identity. net version of the data center charging system, now let's look at what kind of knowledge is behind her mysterious veil?
View: Baidu encyclopedia elaborated on her. In SQL, the view is a virtual table, which is a table exported from one or more basic tables or views, in the system data dictionary, only the view definition is stored, and the View data is not stored. The view is a change of the original database data and another way to view the table data, we can think of a view as a moving window. We can see the data we want through it. The view is obtained from one or more actual tables, and the data of these tables is stored in the database, the tables used to generate a view are called the base table of this view. Next, we will take the view balance in the data room charging system as an example to see how the view is played on her stage in our practical application.
First, let's take a look at the logic in the student's balance:
1. Determine whether the card number exists;
2. Read the corresponding information from the student table and card table;
Next, let's see how to create a view, as shown in:
A. Right-click to create a view;
B. Select the tables or views involved, and check the cards and student tables involved in the balance;
C. Select the fields we need. Here, you can also write all the fields. If there is a type of reading information from the card table and student table in subsequent functions, directly call this view.
D. Save it. The view name must be V + "_" + name.
So how do we write the code on the D-Layer? What is the difference with the previous direct look-up method? The Code is as follows:
<Span style = "font-size: 18px; "> '************************************* * ******** 'file Name: v_StuCardViewDAL 'namespace: DAL 'content: Students can view the balance and read the relevant information from the card table and student table.' function: Students can view the balance 'file relationship:' OPERATOR: ding Guohua 'group: Baby plan' generation Date: 11:30:16 'version: V2.0 'modify log:' copyright description: '*************************************** * ****** Imports System. data. sqlClientPublic Class V_StuCardViewDAL: Implements IDAL. IStuCardView ''' <summary> ''' students can view the balance, '''' </summary> ''' <param name = "cardNo"> </param> ''' <returns> </returns> ''' <remarks> </remarks> Public Function ReadStuCardinfo (cardNo As String) as List (Of Entity. stuCardViewEntity) Implements IDAL. IStuCardView. readStuCardinfo Dim strText As String = "select * from V_StuCardView where cardNo = @ cardNo" 'read the relevant information from the virtual table V_StuCardView Dim primitive type As CommandType = CommandType. text 'COMMAND type Dim parameter As SqlParameter () 'parameter = {New SqlParameter ("@ cardNo", cardNo )} dim sqlHelper As New SqlHelper Dim dt As New DataTable Dim myList As List (Of Entity. stuCardViewEntity) dt = sqlHelper. executeReaderTable (strText, struct type, parameter) myList = EntityHelper. convertToList (Of Entity. stuCardViewEntity) (dt) Return myList End FunctionEnd Class </span>
As we can see, the use of views has simple features. for students to view the balance, we need to query the corresponding information from the card table and the student table before using the view, after using a view, you can directly query the view, which simplifies our understanding of the data and its operations. Frequently Used queries can be defined as views, so that you do not have to specify all the conditions for each subsequent operation. Another benefit of using a view is security. Users can only query and modify the data they can see through the view. Other data in the database is neither visible nor accessible. Database authorization commands allow each user to restrict the retrieval of a database to a specific database object, but cannot authorize the database to a specific row or column.
Fee System for the second version of the IDC, not complete, to be continued ......
The excel view is too large and the drag and drop entries become very small. How can I make the view display only the content?
There is a small square in the bottom right corner of EXCEL.
How can the webpage view become larger when it is too small?
If the window is too small, click maximize. In the upper right corner of the browser, close the button.
If the font size is too small, choose "View"> "text size"> "large" from the browser menu. However, this method is not useful for webpages with CSS settings.
If the font size and image size are small, you can zoom in the view by reducing the resolution. Right-click the blank desktop and choose "properties"> "Settings" to adjust the resolution slider, and then click OK.