Linux interview questions (database, shell, operating system, etc.)

1. Which of the following Transact-SQL statements can be used to recover user2's permission to query the basic table T (D).
A. REVOKE UPDATE ON T
B. GRANT SELECT ON T TO user2
C. DENY SELECT ON T TO user2
D. REVOKE SELECT ON T FROM user2
2.__ C___ is an organized and shareable data collection stored in the computer for a long time.
Database Management System
Database System
Database
File Organization
3. In order to make the value of the index key unique in the basic table, reserved words (A) should be used in the indexing statement.
UNIQUE
COUNT
DISTINCT
UNION
4. The database type is divided according to (C).
Data description function
Record form
Data model
Access data method
5. Which of the following does not belong to the nature of the conceptual model (D)
Has rich semantic expression ability,
easy to communicate and understand,
easy to change
, high efficiency in computer implementation
6. In (A)
Multiple ordinary indexes, multiple unique indexes, multiple candidate indexes, one main
index, one ordinary index, multiple unique indexes, multiple candidate indexes, multiple main indexes can be established in one table
Multiple ordinary indexes, one unique index, multiple candidate indexes, multiple main indexes
Multiple ordinary indexes, multiple unique indexes, one candidate index, multiple main indexes
7. In database design, convert ER diagrams into relational data The process of the model belongs to the (B)
requirement analysis stage, the
logical design stage, the
conceptual design stage, and the
physical design stage.
8. Please take out the date (RDATE field) in the BORROW table as all the records of the day? (The RDATE field is datetime type, including date and time). The correct implementation of the SQL statement is: (A)
select * from BORROW where datediff(dd,RDATE,getdate())=0
select * from BORROW where RDATE=getdate()
select * from BORROW where RDATE-getdate()=0
select * from BORROW where RDATE>getdate()
8. Which of the following commands is to delete the tb_ame table of the sample database (D)
delete from tb_ame
delete from sample.tb_ame
drop table tb_ame
drop table sample.tb_ame
9. Different columns in the basic relationship cannot Come from the same domain. (Error)
10. Among the following descriptions about the characteristics of the database system, the correct one is that
all kinds of user programs of C can freely use various data in the database
If the conceptual mode of the database system changes, the related sub-modes need to be changed accordingly, otherwise the user program needs to be rewritten.
If the storage mode of the database system is changed, the conceptual mode does not need to be changed.
Data consistency refers to the consistency of the data types in the database
11. Suppose the relational model R(A, B, C), F is the FD set established on R, F={A→B, C→B}, ρ={AB, AC} is a decomposition of R, then decomposition ρ( C)?
Keep the functional dependency set F
lost A→B
lost C→B
lost B→C
12. A file named rr.Z, which command can be used to decompress? D
tar
gzip
compress
uncompress
13. Among the following functions, the one that does not belong to the same category as other functions is ___E_.
read
pread
write
pwrite
fseek
lseek
14. The result set returned after a query statement is run is: C
1 class 72
2 class 75
3 class NULL

SELECT class, AVG(score) FROM test WHERE class<3
SELECT class, AVG(score) FROM test WHERE class<3 GROUP BY class
SELECT class, AVG(score) FROM test WHERE class<3 GROUP BY ALL class
SELECT class, AVG (score) FROM test GROUP BY class HAVING class<3
15. Regarding the nature of the relationship, the following statement is correct is ______B____.
The value of a column in the relationship can take a certain value in the same field, or it can take a value in different fields;
the two columns in the relationship can take the value in the same field;
the number of column values ​​in the relationship is its corresponding The number of domain values;
the two tuples in the relationship can be exactly the same, but the two rows in a Table in the actual database cannot be exactly the same;
the two tuples in the relationship cannot be exactly the same, but in the actual database The two rows in a Table can have exactly the same situation under any circumstances;
16. Which of the following storage engines has these characteristics: support index, support data persistence, support transaction, support data compression, support Online DDL, Support one or more indexes containing non-indexed column data (D)
myisam
memory
innodb
tokudb
17. Yueyang Hotel newly hired a computer room manager, the user can and can only perform SELECT operations on any table in the background database HOTEL, The following operation is reasonable: (B)
A. USE HOTEL
EXEC SP_ADDLOGIN'HOTEL','W'
EXEC SP_GRANTDBACCESS'AK','W'
EXEC SP_ADDROLEMEMBER'DB_DATAREADER','W'
B. USE HOTEL
SP_GRANTDBACCESS'AK','W'
EXEC SP_ADDROLEMEMBER'DB_DATAREADER',' W is'
C. the USE HOTEL
EXEC SP_ADDLOGIN 'W is',' 123 ',' HOTEL '
EXEC sp_addrolemember' db_datareader ',' W is'
D. the USE HOTEL
EXEC SP_ADDLOGIN 'W is',' 123 ',' HOTEL '
EXEC sp_grantdbaccess' the AK' ,'W'
EXEC SP_ADDROLEMEMBER'DB_DATAREADER','W'
18. The atomicity of transactions refers to (A).
All operations included in the transaction are either done or not done.
Once the transaction is committed, the changes to the database are permanent. The
internal operations and data used by a transaction are isolated from other concurrent transactions. The
transaction must be a consistent database. The sexual state changes to another consistency state.
19. The partition of the database three-level model architecture is conducive to maintaining the database (A).
Data independence
Data security
Structure standardization
Operational feasibility
20. The (B) of the database refers to the correctness and compatibility of the data.
Security,
integrity,
concurrency control.
Restoring the
21.2NF two-dimensional table eliminates the transfer function dependency, so it must be? ©
1NF
2NF
3NF
BCNF
22. Among the following functions, the one that does not belong to the same category as other functions is __C__.
strcpy
strncpy
snprintf
strcat
strtok
strncat
23. In database design, the process of converting the ER diagram into a relational data model belongs to (B).
Requirements analysis stage
Logical design stage
Conceptual design stage
Physical design stage
24. A relationship can have multiple main attributes. (Correct)
25. Regarding the database index, which of the following options is correct? D
Establishing indexes for certain fields can effectively reduce the disk space occupation of related database tables;
establishing indexes for certain fields can effectively improve the efficiency of reading and writing related fields;
common database management systems usually use hash tables to Storage index;
the existence of database index may reduce the efficiency of deleting related fields;
26. The private network address is used to configure the company's internal network. In the following options, (B) belongs to the private network address.
128.168.10.1
10.128.10.1
127.10.0.1
172.15.0.1
27. In the following description of database design, the correct one is (A).
Establish a data dictionary in the requirement analysis stage. Establish a data dictionary
in the conceptual design stage. Establish a data dictionary
in the logical design stage. Establish a data dictionary
in the physical design stage.
28. There are two types of links in Linux: Hard Link and Soft Link the following statement is correct (a)
soft link across file systems to connect, not hard links
when you delete the original file when the soft link file still exists, and the content they point to the same
hard link is deleted, the data files on disk Will be deleted at the same time. The
hard link will re-create an inode, but the soft link will not.
29. Use PL/SQL statements to assign credits from the "Database Principles" course to variables: (A)
select xuefen into @xuefen from course where cname= 'Database principle'
select xuefen from course where cname='Database principle' and xuefen=@xuefen
select @xuefen=xuefen from course where cname='Database principle'
select xuefen=@xuefen from course where cname='Database principle'
30. The database management system is (C).
A complete database application system
A group of hardware,
a group of software,
both hardware and software.
31. Is the description of the role of the group by clause correct? BCD
can be used to filter data
can be used in sum
can be used in avg
can be used in the having clause
32. The network administrator is in /opt The shell program for installing office application software is written under the directory of setup.sh. The way to directly execute setup.sh without specifying the path is (AB)
PATH=".: PATH "export PATH =" PATH" export PATH="PATH"exportPATH=" PATH:/opt"
PATH="PATH:/opt"
path="path:." 33. Which of the following methods can be used to diagnose oracle IO, CPU, and performance status. ABCD v path:." 33. Which of the following methods can be used to diagnose oracle IO, CPU, performance status. ABCD vpath:. " . 3 . 3 . Under surface which some square method may be to use for diagnosis broken O R & lt A C L E the I O , C P the U- , properties can state conditions . A B C D V SQLAREA (DISK_READS)
Statspack
SQL_TRACE
V $ SESSION_WAIT
34 is There are four columns ABCD in the integral result table. The requirements:
1) When the value of column A is greater than or equal to column B, select column A, otherwise select column B.
2) When the value of column C is greater than or equal to column D, select column C, otherwise select column D
The correct implementation of the SQL statement is: (C)
A. select (when A>=B then A else B) MAX_AB, (when C>=D then C else D) MAX_CD from result
B. select (case when A>=B then A else B) MAX_AB, (case when C>=D then C else D) MAX_CD from result
C. select (case when A>=B then A else B end) MAX_AB, (case when C>=D then C else D end) MAX_CD from result
D. select case when A>=B then A else B end MAX_AB, case when C>=D then C else D end MAX_CD from result
35. In database design, the process of converting E-R diagrams into relational data models belongs to (C).
Requirement analysis stage,
physical design stage,
logical design stage,
conceptual design stage
36. Relational database creation tables have primary keys. The following description of the primary key is correct: The C
primary key is a unique index, and the unique index is also the primary key. The
primary key is a special unique index, which can only be a clustered index. The
primary key is the only column that is not null.
For a clustered index, create When the primary key is used, the clustered index of the primary key will not be created automatically.
37. How to view the SQL execution plan without the help of third-party tools? (B)
explain query
explain plan
explain rows
explain tables
38. The way SQL and C language process records are different. When embedding SQL statements into C language programs, (C) is introduced to coordinate the two.
Heap
Stack
Cursor
Buffer
39. When using vi to edit files in RHEL5 system, copy the contents of lines 1 to 5 of a text file to the specified location in the file. The following (BD) operation can achieve this function. (Choose two items)
Move the cursor to line 1, enter yy5 in vi command mode, then move the cursor to the specified position, press p to
move the cursor to line 1, enter 5yy in vi command mode, and then
Move the cursor to the designated position, press the p key to use the last command 1,5yy, and then move the cursor to the designated position, press the p key to
use the last command 1,5y, and then move the cursor to the designated position, press the p key
40. What is correct about the makefile description? The ABC
makefile file saves the parameter options of the compiler and the linker. It
mainly contains five things: explicit rules, obscure rules, variable definitions, file instructions and comments.
By default, the make command will find files in the current directory in order. The files named "GNUmakefile", "makefile", and "Makefile" have been found to explain this file. You
cannot use the include keyword to include other Makefiles in the Makefile.
41. In the Linux system, the DHCP server has been set up, and the client's The network interface eth0 can obtain the IP address assigned by the server through the (ABD) command.
dhclient
ifdown eth0; ifup eth0
ifconfig
service network stop; service network start
42. The rule of linux firewall iptabls to reject all client ping packets is (AC).
iptables -A INPUT -s! 127.0.0.1 -p icmp -j DROP
iptables -A INPUT -s 127.0.0.1 -p icmp -j DROP
iptables -A INPUT -s 0.0.0.0 -p icmp -j DROP
iptables -A INPUT -s 0.0.0.0 -p icmp -j DENY
43. The composition of the table includes (B).
Query and fields
Fields and records
Records and forms
Reports and fields
44. In the relational mode R, the Y function depends on the semantics of X: (B).
In a relationship of R, if the X values ​​of two tuples are equal, the Y values ​​are also equal.
In each relation of R, if the X values ​​of two tuples are equal, the Y values ​​are also equal.
In a certain relationship of R, the value of Y should be equal to the value of X.
In each relationship of R, the value of Y should be equal to the value of X.
45. In the following Visual FoxPro expression, the result of the operation is logically true (D)
EMPTY(.NULL.)
ISNULL(SPACE(0))
AT('xy','abcxyz')
LIKE('xy?','xyz')
46. ​​Which of the following is not a communication protocol that interacts with the Mysql server (B)
TCP/IP
UDP
shared memory
Socket

Guess you like

Origin blog.csdn.net/weixin_45961525/article/details/108296508