2. National Computer Level 3 Database Examination - Fill-in-the-blank questions

Note: The red words are the answers that need to be entered in the Level 3 database exam. There are 15 fill-in-the-blank questions in the exam, each question is worth 2 points, and the total is 30 points.

1. The IDEFO demand modeling method consists of two elements: arrows and activities/boxes/rectangles .
2. From a security perspective, firewall technology is used to ensure the security of the network environment of the database application system.
3. The objects of database integrity constraints are divided into three levels: column, tuple, and relationship/table .
4. The index established on the main key attribute is called the main index.
5. The index established on the primary key/primary code attribute set of the data file is called the primary index.
6. If each search code value in the data file corresponds to an index record in the index file, the index is called a dense index.
7. If the order of the data records in the data file is consistent with the order of the corresponding index codes in the index file, then this index is called a clustered index.
8. If the index file only contains part of the search code in the data file, the index is called a sparse index.
9. In a database application system with a three-tier browser/server architecture, triggers are executed on the database/DB/DATABASE server.
10. In the IDEF1X data modeling method, many-to-many relationships are also called non- deterministic relationships.
11. If a table has very few data stars and its modification operations are frequent, the most suitable file organization structure for the table is a heap file.
12. When analyzing the requirements of the database application system, the maximum number of users allowed for concurrent access needs to be given, which belongs to the performance requirements
analysis of the database application system.
13. When analyzing the requirements of the database application system, it is necessary to estimate the throughput of the system, which belongs to the performance requirements analysis of the database application system.


14. In UML diagrams, the diagram that describes the physical configuration of hardware and software in the system and the system architecture is called a deployment diagram .
15. In UML diagrams, the diagram used to express the relationship between different packages, namespaces or different projects in the system is called a package diagram .
16. In UML, the sequence diagram used to describe the sequence of sending and receiving information between objects within the system is called a sequence diagram .
17. In UML, communication diagram is a type of interaction diagram, also known as collaboration diagram .
  In UML, communication diagrams are mainly used to describe how objects interact in space, that is, in addition to dynamic interactions, it also directly describes how objects are linked together. There is no timeline in the diagram, instead the messages are numbered sequentially.
18. In UML, the diagram used to describe the sequential execution sequence or parallel sequence of logical flows in systems, use cases, and program modules is called an activity diagram .
19. UML diagrams used to describe the execution sequence of logical processes in systems, use cases and program modules are called activity diagrams .
20. In the UML state machine diagram, the transition between states is driven by events .
21. In the process of using UML for system modeling, there may be many use cases in a system, and the relationships that can exist between use cases include extension , use and combination.


22.DFD modeling method consists of four basic elements: data flow, processing, data storage and external items.
23.DFD modeling method consists of four basic elements, among which the data source or data end point is called external . 24. The DFD method consists of four basic elements, of which external
items describe system data providers or users . 25. The sequence diagram has two coordinate axes, the horizontal axis represents the object, and the vertical axis represents the continuous process of time . 26. From a functional perspective, DBAS can be implemented in four levels, among which the function of the presentation layer is responsible for interacting with users . 27. In the database application system with three-tier browser server architecture, the Web browser implements the function of the presentation layer . 28. During the execution of a transaction, the data it is accessing is modified by other transactions, resulting in incorrect processing results. This is caused by the violation of isolation in the nature of the transaction . 29. In the IDEF1X data modeling method, if the unique identification of an entity set depends on the relationship between the entity set and other entity sets, this type of entity set is called a dependent/slave entity set .






30. In a SELECT statement, the logical execution order of the GROUPBY clause is before .
31. In a SELECT statement, the logical execution order of the HAVING clause is after .
32. In the SELECT statement, the clause used for grouping is GROUP BY .
33. In T-SQL language, if you want to copy all the data in the T1 table to the T2 table, and the T2 table already exists, you can use the statement: INSERT T2 SELECT*FROM T1
  In T-SQL, extract the reciprocal of the cur1 cursor The statement of the 5th row of data is: FETCH ABSOLUTE -5 FROM cur1

34. Now we want to query the two rows of data with the smallest value in column C1 in the T1 table. Please complete the following statement: SELECT TOP 2*FROMT1 ORDER BY C1

35. In a T-SQL language, if you want to copy all the data in the T1 table to the T2 table, and the T2 table does not currently exist, you
can use the statement: SELECT* INTO T2 FROM T1
36. In SQL Server, now To query the two rows of data with the largest column C1 value in the T1 table (regardless of parallel situations). Please complete the following statement: SELECT TOP 2* FROM TI
ORDER BY CI DESC
37. Now we want to count the number of different values ​​in the C1 column in the T1 table. Please complete the following statement: SELECT COUNT(DISTINCT C1) FROM T1
38. In SQL Server2008, you want to create a non-clustered unique index on column C of the T1 table. Please complete the following statement CREATE UNIQUE NONCLUSTERED
INDEX idx_t1 ONT1 (C1)
39. In SQL Server2008, a clustered index should be established on the C1 column of the T1 table. Please complete the following statement CREATE CLUSTERED DEXidx_t1 0NT1
(C1)
40. In SQL Server, a clustered index needs to be established on the eid column of the Employee table. Please complete the following statement CREATE CLUSTERED INDEXidX1 ON
Employee (eid)
41. Assume that in SQL Server 2008, a non-clustered index sorted in descending order is to be established on the c1 column of the T1 table. Please complete the following statement;
CREATE INDEX idx_t1 ON T1 ( C1 DESC )


42. In SQL Server 2008, there is a relational table: employees (employee number, name, department). If you want to query the employee's name, department and number of people in the department, please complete the following statement: SELECT name, department,
COUNT (*) OVER (PARTITION BY department) AS department number FROM employees
43. There is a product table (commodity number, product name, category, price) in SQL Server 2008. Now we want to count the two lowest-priced products in each category. The product name and price
. Please complete the following sentences.
Select category, product name, price from product table a Where price in (
select top 2 price from product table b where A. category = B. category order by price asc) order by category, price asc 44.
In SQL Server 2008, Suppose you want to define a post-trigger for an update operation on the sales table. Please complete the following statements: CREATE TRIGGER tri sales ON·Sales table
FOR UPDATE…


45. There is a table for course selection (student ID, course number, grades). Now we want to query the student ID of students who did not choose the CO1 course. Please complete the following statement: SELECT 2 FROM course selection t1 WHERE
NOT EXISTS
(SELECT FROM course selection t2 WHERE t1 student number = t2.student number and t2. course number = 'CO1)
46. There is a table course selection (student number, course number, Grades), now we want to query the student numbers of students who did not choose the CO1 course. Please complete the following statement: SELECT student number FROM course selection WHERE
student number NOTIN (SELECT student number FROM course selection WHERE course number = 'C01)
47. There is a table course selection (student number, course number, grades) in a database in SQL Server. Now we want to query the course number of the course with the highest exam average score. Please complete the following statement:
SELECT TOP 1 WITH TIES course number FROM course selection GROUP BY course number
ORDER BY AVG (scores) DESC
48. There is a student table (student number, name, age, department) in SQL Server 2008. Now you want to query Names and ages of the two youngest students in each department. Please complete:
SELECT department, name, age FROM student table a WHERE age IN ( SELECTTOP 2 age FROM student table b WHERE a. Department = b. Department / b. Department = a. Department ORDER BY Age ASC ) ORDER BY department, age ASC
49. There is a table Student (Sno, Sname, Sdept), the meaning of each column is: student number, name, department. We now want to count departments with more than 1,000 people. Please complete the following statements:
SELECT Sdept, COUNT (
) FROM Student GROUP BY SDEPT HAVING COUNT () >1000
50. There are tables Student (Sno, Sname), SC (Sno, Cno, Grade), and CO1 is not selected for the query. For the names of students in the course, please complete the following statement: SELECT
Sname FROM Student WHERE NOT EXISTS (
SELECT FROM SC WHERE Cno ='C01'
AND Student.Sno = sC.Sno)
51. Suppose there is a course selection table in a SQL Server database ( student number, course number, grade), now we need to define a front-trigger trigger that limits the total number of courses selected by each student to no more than 10
. Please complete the following statement CREATE TRIGGER tri cnt ON course selection INSTEAD OF INSERT AS...
52. Suppose there is a table for course selection (student number, course number, grade) in a SQL Server database. Now we need to declare a cursor to query the student ID, course ID and grades of students whose grades are greater than or equal to 90
. Please complete the following sentences DECLAREC1 CURSOR
FOR SELECT student number course number, grade FROM course selection WHERE grade >=90
53. In SQL Servert, there is a table course selection ((student number, course number, grade)). Now we need to define a post-trigger trigger that limits the total number of course selections for each student to no more than 10. Please complete the following
statement CREATE TR | GGER tri cnt ON Course selection FOR INSERT AS ... ...
54. In SQL Server, there is a table course selection (student number, course number, grade). Now we need to declare a query of student number and course number for students whose grades are greater than or equal to 90 and grade cursors. Please
complete the following statement DECLARE CI CURSOR FOR SELECT student number, course number, grade FROM course selection WHERE grade >=90
55. There is a table course selection (student number, course number, grade) in a database in SQL Server , now we need to define a trigger that cannot delete the course selection records of students with failing grades. Please complete the following statement
CREATE TR|GGER tri del ON Course selection AFTER DELETEASIF EXISTS ( SELECT
FROM DELETED WHERE Score < 60
ROLLBACK
56. There is a table Student ( Ssno, Sname, Sdept), now we want to query the names of students in the same department as 'Zhang San'. Please complete the following statement: SELECT S2 .Sname FROM Student S1 JOIN Student s2
ON S1.Sdept = s2.Sdept WHERE S1. Sname =Zhang San
57. There is a table Student (sno, Sname, Sdept). Now we want to query the names of students in the same department as Zhang San. Please complete the following statement SELECT S1.Sname fRoM Student S1
JOIN Student S2
ON S1.Sdept= S2 .Sdept WHERE S2 Sname='Zhang San'
58. There is a table Student (sno, Sname,sage), and now we want to query the names of students with the same age as "Zhang San". Please complete the following statement SELECTS1Sname FROM Student S1 JOIN Student s2
ON S1.Sage = S2.Sage WHERE S2 Sname='Zhang San'
59. In SQL Server2008, there is a stored procedure
CREATE PROC P1 defined as follows
@dept varhcar (30) = Department of Computer Science, @xint AS...
Now want Call the stored procedure, and use the default value of the stored procedure for the first parameter. Please complete the following statements:
EXEC P1 DEFAUIT , 20
60. There is a table Student (sno, Sname, Sdept, now you want to count the number of students in each department .Please complete the following statement
SELECT Sdept, count () FROM Student
GROUP BY Sdept
61. In SQL Server208, there is a stored procedure defined as follows: CREATE PROC P1
@dept varhcar (30), @x int OUTPUTA...Now we want to call the stored procedure. Please complete the following statement
DECLARE @i int EXEC P1 Department of Computer Science, @OUTPUT
62. There is the following program code segment that queries and outputs the names of computer science students through cursors. Please complete the following statement.
DECLARE@Sname varchar (20)
DECLARE test cur CURSOR FO SELECT Sname FROM Student WHERE Sdept=Computer Science Department'OPEN test curFETCHNEXT FROM test_cur INTO @SNAME WHILE @@FETCH_STATUS=0
BEGIN PRINT @Shane END CLOSE test cur
63. Set in SQL Server2008 , you want to create a stored procedure with one input parameter and one output parameter. Please complete the following statements:
CREATE PROC P1
@x int,@y int OUTPUT AS … …


64. In the LIKE clause of SQL Server 2008, the wildcard character that can match 0 to more characters is % .
65. In the LIKE clause of SQL Server 2008, the wildcard character that matches one character is - .
66.SQL Server 2008 provides 4 ranking functions, among which the RANK function returns the ranking of each row of data in the result set within each partition, and the ranking within each partition starts from 1, but there may be discontinuities in the intermediate ranking values.
67.SQL Server 2008 provides 4 ranking functions, among which the DENSE_RANK function returns the ranking of each row of data in the result set within each partition, and the ranking of the rows in each partition starts from 1, and the ranking is repeatable and uninterrupted.
68. In the SELECT statement, the option used to remove duplicate rows in the query result set is DISTINCT .
69. In the SELECT statement, the clause used for left outer join is LEFT JOIN
70. In SQL Server 2008, to extract the previous row of data pointed to by the current row pointer of cursor cur1, the option used is: FETCH PRIOR FROM cur171. In SQL Server 2008, the global variable to determine the cursor extraction status is: @@ FETCH_STATUS
72. There is the following code segment for querying the names of computer science students through the cursor. Please complete the following statement.
DECLARE @Sname varchar (20)
DECLARE test cur CURSOR FOR SELECT Sname FROM Student WHERE Sdept="Computer Department" OPEN test cur FETCH NEXTFROM test_cur lINTo @Sname WHILE @@FETCH_STATUS =0 BEGIN PRINT@Sname END CLOSE test cur
73. In SQL Server, suppose that it has been declared Cursor c1, now to extract data from this cursor, please complete the following statement: FETCH NEXT FROM C1


74. In SQL Server2008, if you want to delete the U1 schema, the statement used is SCHEMA U1 DROP SCHEMA U1
75. In SQL Server2008, if you want to delete the U1 user in the DB1 database, please complete the following statement: DROP User U1
76. In SQL Server2008, if you want to delete the U1 user in the DB1 database, please complete the following statement DROP USER U1
77. In SQL Server2008, if you want to delete the U1 login account, please complete the following statement DROP LOGIN U1
78. Set in SQL In Server, create a login account for SQL Server authentication. The login name is: User1 and the password is: a123. Please complete the following statement: CREATE LOGIN User1 WITH PASSWORD= 'a123'
79. Set in SQL Serveri, you need to create a login account for SQL Server authentication. Login name: User1, password: a123. Please complete the following statement CREATE LOGIN User1 WITH PASSWORD='a123'
80. In SQL Server, you need to enable the disabled User1 login account. Please complete the following statement:
ALTER LOGIN User1 ENABLE
81. In SQL Server208, if you want to fully back up the DB1 database to the BK device, please complete the following statement:BACKUP DATABASE DB1TOBK
82. In SQL Server, you need to create a non-clustered index on the sname column of the Student table. Please complete the following statement CREATENONCLUSTERED INDEX idx1
ON STUDENT (SNAME)
83. In SQL Servert, you need to define a schema named saes for U1. Please complete the following statement CREATE SCHEMA Sales AUTHORIZATIONU184. In SQL Server2008, there is the following function to create partitions, which divides the data into 4/ four areas CREATE PARTITION FUNCTION PF1 (nt)
AS RANGE LEFT FOR VALUES (1, 100, 200)
85. There is the following function to create partitions. This function divides the data into 4 partitions. The data range of the leftmost partition is less than or equal to 1/<=1 CREATE PARTION
FUNCTION PF1 (int)
AS RANGELEFT FOR VALUES (1, 100,200)


86.SQL Server2008 has two authentication modes: mixed authentication mode and WINDOWS authentication mode.
87. In SQLServer2008, there are two authentication modes, one is mixed authentication mode and the other is WINDOWS authentication mode.
88. In SQL Server2008, there are two authentication modes: Windows authentication mode and mixed authentication mode.
89. In SQL Server2008, the system administrator role is SYSADMIN .


90. A materialized/indexed view is a database object that contains query results. Its data is not read when the view is used but is pre-calculated.
91. The materialized/indexed view is a database object that saves the query results. The data is pre-calculated and saved in the object.
92. In order to improve the database performance, add the "Total Price" field to the sales document table (determined by the table (Calculated from " Unit
Price " The quantity calculation results are saved in the "Total Price" column to reduce the amount of calculation during the query process. This tuning method is called the added derivation/export method.
94. During the database tuning process, add "Total Price" to the "Student Information Table" "System name" to reduce the number of table connections during the query process. This tuning method is called the method of adding redundant columns/redundant attributes.
95. The tuning method of adding redundant columns is a typical tuning method of exchanging space for time .
96. The tuning method of creating indexes for columns that are often used as query conditions is a typical tuning method that trades space for time .
97. Create indexes on columns that are often used as query criteria. This is a typical tuning method that trades space for time . 98. After vertically
splitting the table , if you need to query all the data in the original table, you need to use the join operation. 99.
After splitting, querying all data requires the use of Union operations.


100. Store data rows in multiple tables that are frequently used together according to their common column values. This table storage method is aggregation .
101.The database storage method of storing data rows together from multiple tables with common column values ​​that are often used together is called aggregation .
102. In database concurrency control, database lock granularity needs to be controlled. The larger the lock granularity, the lower/smaller the degree of concurrent transaction execution .
103. During the database tuning process, the database lock granularity needs to be controlled. The larger the lock granularity, the lower the degree of concurrent transaction execution and the lower /smaller the database system overhead .
104. During the database tuning process, it is sometimes necessary to control the database lock granularity. The larger the lock granularity, the lower the degree of concurrent execution of tasks, and the lower /smaller the database system overhead .
105. In a data warehouse environment, the granular design of data is an important design issue that affects the amount of data in the data warehouse and the types of queries that the system can answer.
106. In database concurrency control, the larger , the smaller the degree of concurrent execution of tasks and the smaller the database system overhead.
107. In multidimensional data analysis, the analysis operation of switching from a high-granularity data view to a low-granularity data view is called a drill/drill-down operation.


108. An exception occurred during the operation of a supermarket management system, causing the update results of the database that had been submitted to the transaction not to be correctly written to the disk. This failure destroyed the durability/ permanence
of
the transaction .
109. When there is a deadlock in the database system, the usual solution is to select one or several deadlock transactions and rollback/undo these transactions.
110. In a distributed database system, in order to ensure the atomicity of global transactions, all sites participating in transaction execution must either commit or rollback /undo .
111. Transaction internal faults can be divided into expected and unexpected transaction internal faults. Concurrent deadlock faults are unexpected internal transaction faults. 112. The tuning method of creating indexes
for columns that are often used as query conditions is a typical tuning method that trades space for time. 113. In the database dynamic dump mechanism, log files are generally needed to restore the database to the correct state at a certain moment. 114. During the database recovery process, checkpoint technology greatly reduces the number of log recovery operations performed during database recovery. 115. In dynamic storage, dump files and log files need to be used together to restore the database to a consistent state. 116. There are three types of transaction log backups in SQL Server 2008. The way to perform log backup for a potentially damaged database is end/tail backup. 117.In SQL Server2008, database mirroring is divided into




High availability operating mode, high protection operating mode and high performance operating mode.
118. In SQL Server2008, database mirroring is divided into high-availability operation mode, high-protection operation mode and high-performance operation mode.
119. In SQL Server2008, database mirroring is divided into high-availability operation mode, high-protection operation mode and high-performance operation mode.
120. In SQL Server2008, when using T-SQL statements to perform database backup operations, you need to use the DIFFERENTIAL
keyword to specify that the backup is a differential backup.


121. The most typical strategy adopted for recovery control of distributed database systems is based on the two/2/two- phase commit protocol.
122. The most typical strategy adopted for recovery control of distributed database systems is based on the two-phase/two-phase/2- phase commit protocol.
123. In a distributed database, a relationship is divided into different fragments from the perspective of rows (tuples) according to certain conditions. This sharding method is called horizontal sharding. 124. In a distributed database, location independence, data shard independence and data replication independence form the distribution transparency
in the distributed database system . 125. A distributed database is a database system that is physically dispersed and logically centralized . 126. In distributed database queries, the main reason for the large amount of data transmission is the connection and union operations between data .    In the data distribution of distributed databases, if there are multiple copies of global data, a complete copy of the data is saved in each physical site. This strategy is full replication .



127. In various parallel database system structures, the hierarchical structure combines the characteristics of shared memory, shared disk and shared nothing structure, and divides the structure into two layers: page layer and bottom layer. The top layer is a shared nothing structure, and the bottom layer is shared memory or shared memory. Disk structure.
128. There are many architectures for parallel databases. The structure in which all processors share a common main memory through the network is called a shared memory structure.
   In parallel databases, the shared-nothing structure is considered the best parallel structure to support parallel database systems and is suitable for applications such as bank tellers. 127. Cloud computing provides users with powerful computing power, storage, broadband and other resources
by concentrating all computing resources and using hardware virtualization technology.
   Cloud computing includes application services on the Internet and the software and hardware facilities that provide these services in data centers, usually including software as a service, platform as a service, and infrastructure as a service. Platform as a Service refers to providing operating systems and related services over the network without downloading or installation.
130. Time series analysis can also be called data evolution analysis, which can describe the rules or trends of objects whose behavior changes over time and model them.
131. In an enterprise data environment, data about data is generally called metadata .
132. In a data warehouse environment, data about data is called metadata.
133. A data warehouse is a subject-oriented, integrated , non-volatile, and time-changing collection of data.
134. In data warehouses, metadata is generally divided into technical metadata and business metadata.
135. In the data warehouse, the method of maintaining data based on the changes in the data source on the basis of the original data of the maintenance object is called the incremental/growth maintenance method.
136. In the process of establishing a data warehouse, ETL is a necessary construction link, where E refers to extraction/extraction/extraction/EXTRACT .
137. In the maintenance strategy of the exported data or materialized view (materialized view) of the data database, the strategy of updating only when the user finds that the data has expired during query is called the delayed/delayed/postponed maintenance strategy .
138. In the enterprise data warehouse architecture, operational data storage ODS is generally used to support real-time OLAP and global OLTP/transaction processing applications.
139. In enterprise data warehouses, the operational data storage layer (ODS) is generally used to support real-time OLAP and global/cross-professional/comprehensive OLTP applications.
140. In enterprise data warehouses, the operational data storage layer (ODS) is generally used to support real-time OLAP/analysis and global OLTP applications.


141. Grouping the data of a data set so that the data in each group is as similar as possible and the data between different groups is as different as possible. This data mining method is called a clustering algorithm .
   Data mining, as a process of knowledge discovery, generally consists of three main stages: data preparation, data mining , and interpretation and evaluation of results.
142. In machine learning, the sample data required for classification algorithms are generally divided into training sets, test sets, and Three types of validation sets.
  Clustering is a common type of machine learning method. The data objects processed by the clustering algorithm are generally unlabeled, so clustering is generally called an unsupervised learning method.
143. In association rule mining, whether the association rule is established or not is generally described by two indicators: support and confidence.
144. In association rule mining, in order to discover meaningful association rules, two thresholds, minimum support and minimum credibility, need to be given. 145. In association rule mining, in order to discover meaningful association rules, two thresholds
need to be given: minimum support and minimum credibility/confidence .
146. According to the continuity and regularity of the development of things, and based on the sequential data at historical time points of variables, the task of inferring the development trend of variables at subsequent time points in the future is called time series/prediction/time series analysis.


  1. From a functional perspective, the database application system can be divided into four layers: presentation layer, business logic layer, data access layer, and data persistence layer. Among them, the business logic layer is responsible for transmitting data directly to the presentation layer .
  2. There is a student table (student number, name, department) and a course selection table (student number, course number, grades). Now we need to use the window function to query each student's name, department and average test score. Please complete the following sentences:
    SELECT DISTINCT name, department, AVG(grade) OVER (PARTITION BY T1.Student ID) AS average grade
    FROM student table T1 JOIN course selection table T2 ON T1.Student ID = T2.Student ID
  3. In database performance optimization, establishing materialized views and aggregation (Cluster) are storage optimization methods.
  4. During the database maintenance process, administrators should regularly reorganize the database , that is, organize and recycle fragments of the database, rearrange data storage, rebuild indexes, and other operations.
  5. Granularity is a concept used to describe the degree of comprehensiveness of data in a data environment. Suppose there is a product sales table (commodity number, store ID, sales volume, unit price, date, time) and a product weekly sales table (commodity number, store ID, weekly sales volume, week) in a system, then the granularity level of the product sales table Below the level of granularity of the product weekly sales table.
  6. Performance tuning of SQL statements is a task in the maintenance phase of the database application system.

Guess you like

Origin blog.csdn.net/weixin_44391817/article/details/132316683