中兴笔试

1、 恢复和并发控制的基本单位

事务串行执行:即每个时刻只有一个事务运行,其他事物必须等到这个事务结束以后方能运行。

同时并发方式:在多处理系统中,每个处理机可以运行一个事务,多个处理机可以同时运行多个事务,实现多个事务真正的并行运行,这种并行方式称为同时并发方式。

并发控制是指在多用户的环境下,对数据库进行并发操作进行规范的机制。其目的是为了避免对数据的丢失修改、读脏数据与不可重复读等,从而保证数据的正确性与一致性

大型关系系统都有比较好的并发控制功能。例如可以采用更新游标、显式加锁、更改事务隔离级别等等

事务是数据库中一个重要概念,它是一系列要么都做,要么都不做的程序集合,是数据库并发控制的单位。

(1):事务(Transaction)是并发控制的单位,,是用户定义的一个操作序列。这些操作要么都做,要么都不做,是一个不可分割的工作单位。

(3):事务运行的三种模式:
A:自动提交事务
每条单独的语句都是一个事务。每个语句后都隐含一个COMMIT。
B:显式事务
以BEGIN TRANSACTION显式开始,以COMMIT或ROLLBACK显式结束。
C:隐性事务
在前一个事务完成时,新事务隐式启动,但每个事务仍以COMMIT或ROLLBACK显式结束。
(4):事务的特性(ACID特性)
A:原子性(Atomicity)
事务是数据库的逻辑工作单位,事务中包括的诸操作要么全做,要么全不做。
B:一致性(Consistency)
事务执行的结果必须是使数据库从一个一致性状态变到另一个一致性状态。一致性与原子性是密切相关的。
C:隔离性(Isolation)
一个事务的执行不能被其他事务干扰。
D:持续性/永久性(Durability)
一个事务一旦提交,它对数据库中数据的改变就应该是永久性的。
注:事务是恢复和并发控制的基本单位。

2、 中断的功能



3、 ISO七层结构



4、 给出个IP地址,要划分9个子网,子页掩码——



5、 数据库查询优化问题



6、 编写程序:键盘输入一系列数字(-1结束),输出到aabb.bat文件中



7、 利用1、2、2、3、4这4个数字,组合

package list;

import   java.util.ArrayList;



public   class   Test   {

    public   java.util.ArrayList   r;   //存放排列组合的结果

    public   Test(ArrayList   in)   {    //输入参数 待排列组合的数组

        r   =   new   ArrayList();

        if   (in.size()==1)             //递归终止条件

            r.add(in.get(0));

     

        String temp="";

        for   (int   i=0;i<in.size();i++){

            ArrayList   sub   =   (ArrayList)in.clone(); //

            String   s   =   (String)sub.remove(i);       //输入数组,先提取第i个元素

            if(s.equalsIgnoreCase(temp))

                   continue;

            temp=s;

            Test   other   =   new   Test(sub);           //对剩余的元素递归调用

            for   (int   j=0;j<other.r.size();j++)        //剩余元素排列组合

                r.add(s+(String)other.r.get(j));         // 合并剩余元素排列元素结果

        }

    }

    public   static   void   main(String[]   args)   {

        ArrayList   a   =   new   ArrayList();

        a.add("1");

        a.add("2");

        a.add("3");

        a.add("4");

        Test   test   =   new   Test(a);

        System.out.println("test.size()==="+test.r.size());

        System.out.println("test==="+test.r.toString());

       /* for   (int   i=0;i<test.r.size();i++)

            if   ((i+1)%(a.size()-1)==0)

                System.out.println(test.r.get(i).toString());

            else

                System.out.print(test.r.get(i).toString()+",");   */

    }

8、 进制转换器

   要求:(1)可输入二进制、八进制、十进制、十六进制数;

(2)将已输入的数转换成其余进制的数;

(3)具有输入输出界面

9、 标识符 java

    编写一个程序,检查字符串是否为合法的Java标识符
使用Character.isJavaIdentifierStart()方法和Character.isJavaIdentifierPart()方法,

class JavaIdentifierTest {

    public static boolean isValidJavaIdentifier( String candidate ) {
        if ( candidate.length( ) == 0 ||
             ! Character.isJavaIdentifierStart( candidate.charAt( 0 ) ) )
            return false;

        String tail = candidate.substring( 1 );
        for ( int i = 0; i < tail.length( ); i++ )
            if ( ! Character.isJavaIdentifierPart( tail.charAt( i ) ) )
                return false;

        return true;
    }

    public static void main( String[ ] args ) {
        String[ ] candidates = { "", "9", "36C", "a1", "_pos", "index" };
        for ( int i = 0; i < candidates.length; i++ )
            System.out.println(
                "isValidJavaIdentifier( /"" + candidates[ i ] + "/"/t) --> " +
                isValidJavaIdentifier( candidates[ i ] ) );
    }
}

10、              C#中的访问修饰符

类的每个成员都有特定类型的可访问性。C#中的访问修饰符与Java中的基本对应,但多出了一个internal。简而言之,C#有5种类型的可访问性,如下所示:

    * public:成员可以从任何代码访问。
    * protected:成员只能从派生类访问。
    * internal:成员只能从同一程序集的内部访问。
    * protected internal:成员只能从同一程序集内的派生类访问。
    * private:成员只能在当前类的内部访问。

11从一个或几个基本表(或视图)导出的表,它与基本表不同,是一个虚表。

数据库中只存放视图的定义,而不存放视图对应的数据,这些数据仍存放在原来的基本表中。所有基本表中的数据发生变化,从视图中查询出的数据也随之改变。

视图一经定义,就可以和基本表一样被查询、删除,也可以在一个视图上再定义新的视图,但对视图的更新(增加、修改、删除)操作则有一定的限制。

11、              作业调度程序从处于( )状态的队列中选择适当的作业的作业投入运行

后备

12、              ATM采用的线路复用方式为( )异步时分多路复用

13、              什么是分布式数据库



14、              什么是虚拟设备?为什么在操作系统中引入虚拟设备?

虚拟内存:
由于系统在运行时有很多信息需要处理,内存有时不够用,就在硬盘上开辟一个区域,用来临时存放内存中放不下并不是经常访问的数据,并且和内存一样,关机后虚拟内存中的数据也丢失。
虚拟光驱、光盘、软驱、软盘,虚拟网卡,就是虚拟设备

15、              在一个表里,有很多字段,每个字段的值有很多重复的,让你用写个SQL语句,把每个字段中出现次数最多的值列出来,并在这个值的前面加上一个-1(如果涉及到多张表,请把别的表中的重复数据也一并修改)
比如有年龄和工资两个字段,里面出理次数最多的是18和3000,找出来并改成-118和-13000

16、              TCP为何采用三次握手来建立连接,若采用二次握手可以吗,请说明原因

    TCP 协议栈的弱点:TCP 连接的资源消耗,其中包括:数据包信息、条件状态、序列号等。通过故意不完成建立连接所需要的三次握手过程,造成连接一方的资源耗尽。
通过攻击者有意的不完成建立连接所需要的三次握手的全过程,从而造成了C 机器的
资源耗尽。

17、              简述电路交换和分组交换的区别及优缺点。



18、             

1)Which statement shows the maximum salary paid in each job category of each department?_______W=
A. select dept_id, job_cat,max(salary) from employees where salary > max(salary);l?_[3N
B. select dept_id, job_cat,max(salary) from employees group by dept_id,job_cat;o(hh@Q
C. select dept_id, job_cat,max(salary) from employees;_ZTRH<
D. select dept_id, job_cat,max(salary) from employees group by dept_id;`AA
E. select dept_id, job_cat,max(salary) from employees group by dept_id,job_cat,salary;})X/

2)description of the students table:7
sid_id number-_.
start_date date4
end_date dateF
which two function are valid on the start_date column?_________。L
A. sum(start_date)d=p
B. avg(start_date)]#=w-v
C. count(start_date)%UT "A
D. avg(start_date,end_date)3
E. min(start_date) %
F. maximum(start_date)'5kmwa

3)for which two constraints does the oracle server implicitly create a unique index?______。Yu
A. not nulluy(
B. primary|AG^
C. foreign key
D. check`q
E. uniqueC|*a

4)in a select statement that includes a where clause,where is the group by clause placed in the select statement?______。^IXC^
A. immediately after the select clause@[
B. before the where clauseK
C. before the from clauseM+=m
D. after the order by clauseW0
E. after the where clauseq?&{n

5)in a select statement that includes a where clause,where is the order by clause placed in the select statement?______.'5R6;
A.immediately after the select clausezJ/a5H
B.before the where clause!~
C.after all clauseRAl+K=
D.after the where clauseCRs
E.before the from clauseHVx

6)evaluate there two sql statements______.m lx
Select last_name,salary from employees order by salary;H^SLL
Select last_name,salary from employees order by 2 asc;,:
A.the same result B.different result C.the second statement returns a syntax error)_hO

7) you would like to display the system date in the format“20051110 14:44:17”。Which select statement should you use?______。uRI
A. select to_date(sydate,’yearmmdd hh:mm:ss’)from dual;U--+-
B. select to_char(sydate,’yearmonthday hh:mi:ss’)from dual;J0!D 6
C. select to_date(sydate,’yyyymmdd hh24:mi:ss’)from dual;.
D. select to_char(sydate,’yyyymmdd hh24:mi:ss’)from dual;?
E. select to_char(sydate,’yy-mm-dd hh24:mi:ss’)from dual;_j

8)which select statement will the result ‘ello world’from the string‘Hello world’?______.B=
A. select substr(‘Hello World’,1)from dual;#s)`4M
B. select substr(trim(‘Hello World’,1,1))from dual;wNsi
C. select lower(substr(‘Hello World’,1))from dual;sG9
D. select lower(trim(‘H’from‘Hello World’))from dual;-

9)which are DML statements(choose all that apply)______.
A.commit B.merge    C.update D.delete E.creat F.dropc
10)Select 语句中用来连接字符串的符号是______.
A. “+” B. “&” C.“||” D.“|”Jjl

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值