武汉轻工大学数据库选修期末作业终审稿)

合集下载

2022年武汉轻工大学数据科学与大数据技术专业《操作系统》科目期末试卷A(有答案)

2022年武汉轻工大学数据科学与大数据技术专业《操作系统》科目期末试卷A(有答案)

2022年武汉轻工大学数据科学与大数据技术专业《操作系统》科目期末试卷A(有答案)一、选择题1、下面叙述中,错误的是()A.操作系统既能进行多任务处理,又能进行多重处理B.多重处理是多任务处理的子集,C.多任务是指同一时间内在同一系统中同时运行多个进程D.一个CPU的计算机上也可以进行多重处理2、在中断发生后,进入中断处理的程序属于()。

A.用户程序B.可能是应用程序,也可能是操作系统程序C.操作系统程序D.既不是应用程序,也不是操作系统程序3、若某单处理器多进程系统中有多个就绪进程,则下列关于处理器调度的叙述中,错误的是()。

A.在进程结束时能进行处理器调度B.创建新进程后能进行处理器调度C.在进程处于临界区时不能进行处理器调度D.在系统调用完成并返回用户态时能进行处理器调度4、关于临界问题的一个算法(假设只有进程P0和P1,能会进入临界区)如下(i为0或1代表进程P0或者P1):Repeatretry:if(turn!=-1)turn=i;if(turn!=i)go to retry;turn=-1;临界区:turn=0;其他区域;until false;该算法()。

A.不能保持进程互斥进入临界区,且会出现“饥饿”B.不能保持进程互斥进入临界区,但不会出现“饥饿”C.保证进程互斥进入临界区,但会出现“饥饿”D.保证进程互斥进入临界区,不会出现“饥饿”5、下列关于线程的叙述中,正确的是()。

I.在采用轮转调度算法时,一进程拥有10个用户级线程,则在系统调度执行时间上占用10个时间片II.属于同·个进程的各个线程共享栈空间III.同一进程中的线程可以并发执行,但不同进程内的线程不可以并发执行IV.线程的切换,不会引起进程的切换A. 仅I、II、IIIB. 仅II、IVD.全错6、下列关于SPOOLing的叙述中,不正确的是()A.SPOOLing系统中必须使用独占设备B.SPOOLing系统加快了作业执行的速度C.SPOOLing系统使独占设备变成了共享设备D.SPOOLing系统利用了处理器与通道并行上作的能力7、下列关于设备驱动程序的叙述中,正确的是()。

数字信号处理(专升本)期末考试

数字信号处理(专升本)期末考试

武汉轻工大学继续教育学习平台数字信号处理(专升本)期末考试课程名称:数字信号处理(专升本)1.(单选题)对连续信号均匀采样时,采样角频率为Ωs,信号最高截止频率为Ωc,折叠频率为( )。

(本题2.0分)A.ΩsB.ΩcC.Ωc/2D.Ωs/2答案:D.解析:无.2.(单选题)序列x(m),h(m)分别如图所示,y(n)=x(n)*h(n),则y(4)为( )(本题2.0分) A.B.C.3D.5答案:C.解析:无.3.(单选题)序列u (n)的Z变换及收敛域为( )(本题2.0分)A.,1<|z|≤∞B.,1< |Z|<∞C.1,0≤|z|≤∞D.1, 0≤| z|<∞答案:A.解析:无.4.(单选题)设系统的单位抽样响应为h(n),则系统因果的充要条件为( )(本题2.0分)A.当n>0时,h(n)=0B.当n>0时,h(n)≠0C.当n<0时,h(n)=0D.当n<0时,h(n)≠0答案:C.解析:无.5.(单选题)LTI系统,输入x(n)时,输出y(n);输入为3x(n-2),输出为( )(本题2.0分)A.y(n-2)B.3y(n-2)C.3y(n)D.y(n)答案:B.解析:无.6.(单选题)已知x(n)=δ(n),N点的DFT[x(n)]=X(k),则X(5)=( )。

(本题2.0分)A.NB.1C.0D.- N答案:B.解析:无.7.(单选题)设因果稳定的LTI系统的单位抽样响应h(n),在n<0时,h(n)= ( )(本题2.0分)A.0B.∞C.-∞D.1答案:A.解析:无.8.(单选题)对于N=8点的基IFFT运算,在进行位倒序后,地址单元A(4)中存放的是输入序列x(n)中的哪一个值( )(本题2.0分)A.x(1)B.x(2)C.x(4)D.x(0)答案:A.解析:无.9.(单选题)计算两个N1点和N2点序列的线性卷积,其中N1>N2,至少要做( )点的DFT。

2022年湖北经济学院法商学院计算机应用技术专业《数据库概论》科目期末试卷A(有答案)

2022年湖北经济学院法商学院计算机应用技术专业《数据库概论》科目期末试卷A(有答案)

2022年湖北经济学院法商学院计算机应用技术专业《数据库概论》科目期末试卷A(有答案)一、填空题1、在关系数据库的规范化理论中,在执行“分解”时,必须遵守规范化原则:保持原有的依赖关系和______。

2、数据仓库主要是供决策分析用的______,所涉及的数据操作主要是______,一般情况下不进行。

3、数据库系统是利用存储在外存上其他地方的______来重建被破坏的数据库。

方法主要有两种:______和______。

4、若事务T对数据对象A加了S锁,则其他事务只能对数据A再加______,不能加______,直到事务T释放A上的锁。

5、DBMS的完整性控制机制应具备三个功能:定义功能,即______;检查功能,即______;最后若发现用户的操作请求使数据违背了完整性约束条件,则采取一定的动作来保证数据的完整性。

6、数据库恢复是将数据库从______状态恢复到______的功能。

7、在SQL Server 2000中,新建了一个SQL Server身份验证模式的登录账户LOG,现希望LOG在数据库服务器上具有全部的操作权限,下述语句是为LOG授权的语句,请补全该语句。

EXEC sp_addsrvrolemember‘LOG’,_____;8、设某数据库中有作者表(作者号,城市)和出版商表(出版商号,城市),请补全如下查询语句,使该查询语句能查询作者和出版商所在的全部不重复的城市。

SELECT城市FROM作者表_____SELECT城市FROM出版商表;9、使某个事务永远处于等待状态,得不到执行的现象称为______。

有两个或两个以上的事务处于等待状态,每个事务都在等待其中另一个事务解除封锁,它才能继续下去,结果任何一个事务都无法执行,这种现象称为______。

10、事务故障、系统故障的恢复是由______完成的,介质故障是由______完成的。

二、判断题11、在SELECT语句中,需要对分组情况满足的条件进行判断时,应使用WHERE子句。

2022年武汉工程大学计算机科学与技术专业《数据库原理》科目期末试卷A(有答案)

2022年武汉工程大学计算机科学与技术专业《数据库原理》科目期末试卷A(有答案)

2022年武汉工程大学计算机科学与技术专业《数据库原理》科目期末试卷A(有答案)一、填空题1、数据库系统是利用存储在外存上其他地方的______来重建被破坏的数据库。

方法主要有两种:______和______。

2、设某数据库中有作者表(作者号,城市)和出版商表(出版商号,城市),请补全如下查询语句,使该查询语句能查询作者和出版商所在的全部不重复的城市。

SELECT城市FROM作者表_____SELECT城市FROM出版商表;3、数据仓库创建后,首先从______中抽取所需要的数据到数据准备区,在数据准备区中经过净化处理______,再加载到数据仓库中,最后根据用户的需求将数据发布到______。

4、数据库系统在运行过程中,可能会发生各种故障,其故障对数据库的影响总结起来有两类:______和______。

5、____________、____________、____________和是计算机系统中的三类安全性。

6、关系系统的查询优化既是关系数据库管理系统实现的关键技术,又是关系系统的优点。

因为,用户只要提出______,不必指出 ______。

7、在SELECT命令中进行查询,若希望查询的结果不出现重复元组,应在SEL ECT语句中使用______保留字。

8、事务故障、系统故障的恢复是由______完成的,介质故障是由______完成的。

9、主题在数据仓库中由一系列实现。

一个主题之下表的划分可按______、______数据所属时间段进行划分,主题在数据仓库中可用______方式进行存储,如果主题存储量大,为了提高处理效率可采用______方式进行存储。

10、在SQL Server 2000中,数据页的大小是8KB。

某数据库表有1000行数据,每行需要5000字节空间,则此数据库表需要占用的数据页数为_____页。

二、判断题11、机制虽然有一定的安全保护功能,但不精细,往往不能达到应用系统的要求。

2022年武汉轻工大学数据科学与大数据技术专业《计算机组成原理》科目期末试卷A(有答案)

2022年武汉轻工大学数据科学与大数据技术专业《计算机组成原理》科目期末试卷A(有答案)

2022年武汉轻工大学数据科学与大数据技术专业《计算机组成原理》科目期末试卷A(有答案)一、选择题1、下列关于虚拟存储器的说法,错误的是()。

A.虚拟存储器利用了局部性原理B.页式虚拟存储器的页面如果很小,主存中存放的页面数较多,导致缺页频率较低,换页次数减少,可以提升操作速度C.页式虚拟存储器的页面如果很大,主存中存放的页面数较少,导致页面调度频率较高,换页次数增加,降低操作速度D.段式虚拟存储器中,段具有逻辑独立性,易于实现程序的编译、管理和保护,也便于多道程序共享2、一个存储器的容量假定为M×N,若要使用I×k的芯片(I<M,k<N),需要在字和位方向上同时扩展,此时共需要()个存储芯片。

A.M×NB.(M/I)×(N/k)C.M/I×M/ID.M/I×N/k3、串行运算器结构简单,其运算规律是()。

A.由低位到高位先行进行进位运算B.由低位到高位先行进行借位运算C.由低位到高位逐位运算D.由高位到低位逐位运算4、常用的(n,k)海明码中,冗余位的位数为()。

A.n+kB.n-kC.nD.k5、下列关于浮点数加减法运算的叙述中,正确的是()。

I.对阶操作不会引起阶码上溢或下溢Ⅱ.右归和尾数舍入都可能引起阶码上溢Ⅲ.左归时可能引起阶码下溢IV.尾数溢出时结果不一定溢出A.仅Ⅱ、ⅢB. 仅I、Ⅱ、ⅢC.仅I、Ⅲ、IⅣD. I、Ⅱ、Ⅲ、Ⅳ6、一次总线事务中,主设备只需给出一个首地址,从设备就能从首地址开始的若干连续单元读出或写入多个数据。

这种总线事务方式称为()。

A.并行传输B.串行传输C.突发传输D.同步传输7、内部总线(又称片内总线)是指()。

A.CPU内部连接各寄存器及运算部件之间的总线B.CPU和计算机系统的其他高速功能部件之间互相连接的总线C.多个计算机系统之间互相连接的总线D.计算机系统和其他系统之间互相连接的总线8、计算机硬件能够直接执行的是()。

武汉轻工大学数据库1508090003实验3报告

武汉轻工大学数据库1508090003实验3报告

武汉轻工大学经济与管理学院实验报告实验课程名称实验起止日期至实验指导教师程红莉实验学生姓名郑万芳学生班级学号物流管理1501 1508090003实验评语实验评分教师签名年月日实验项目名称数据安全性实验日期2017.12.5 学生姓名班级学号一、预习报告(请阐述本次实验的目的及意义)1.通过实验使学生加深对数据安全性的理解,并熟悉通过SQL对数据进行安全性控制。

2.掌握SQL Server中有关用户,角色及操作权限的管理方法。

3.完成书本上习题的上机练习。

4.使用SQL对数据进行安全性控制,包括:4.1在SQL Server企业管理器中,设置SQL Server的安全认证模式;4.2通过SQL Server企业管理器,实现对SQL Server的用户和角色管理;4.3分别通过SQL Server企业管理器和SQL的数据控制功能,设置和管理数据操作权限;授权和权力回收。

4.4操作完成后看看已授权的用户是否真正具有授予的数据操作的权力了;权力收回操作之后的用户是否确实丧失了收回的数据操作的权力)。

二、实验方案(请说明本次实验的步骤和进程)1以自己的名字(郑万芳)登陆服务器,在自己建的数据库下面选择“用户”,新建用户,在登录名里选择“吴凯丽”的登录名,数据库角色选择默认的“PUBLIC”2.新建SQL查询,输入授权语句Grant select on student to 吴凯丽3.以sa的身份登录5105,在自己的数据库下观察各用户的权限(只有SA身份能观察各用户的权限)4.以刚才新建的用户名对应的登录名(默认的登录名和用户名相同)“吴凯丽”重新登录5105服务器,新建查询,进行对刚才授权的数据库表进行查询操作(注意:表名前面的用户名——即SCHEMA名要完整Select sno from 郑万芳.student5.新以自己的登录名(如我的登录名chenghongli)连接5105服务器,将刚才授予出去的权限收回Revoke select on student from 吴凯丽6.再以被授权并被回收的登录名登录服务器5105(如吴凯丽),执行刚才的查询操作Select sno from 郑万芳.student7.以SA身份登录5105,可在自己的数据库下查阅数据库用户的权限三、实验结果分析、改进建议出现的问题及解决方案:1.问题:在更改连接的时候使用SQL server身份验证登陆,用新建的用户名登陆失败,显示该用户与可信SQL server无关联解决方案:启用SQL Server身份验证SQL Server Management Studio -- 对象资源管理器-- 右键你的服务器(.\SQLExpress或者localhost) -- 属性-- 安全性-- 服务器身份验证-- SQL Server和Windows身份验证模式,最后重启一下数据库2.问题:在做管理用户权限的实验时,不明白怎样给用户授权。

数据库系统基础教程第二章答案终审稿)

数据库系统基础教程第二章答案终审稿)

数据库系统基础教程第二章答案文稿归稿存档编号:[KKUY-KKIO69-OTM243-OLUI129-G00I-FDQS58-For relation Accounts, the attributes are:acctNo, type, balanceFor relation Customers, the attributes are:firstName, lastName, idNo, accountFor relation Accounts, the tuples are:(12345, savings, 12000),(23456, checking, 1000),(34567, savings, 25)For relation Customers, the tuples are:(Robbie, Banks, 901-222, 12345),(Lena, Hand, 805-333, 12345),(Lena, Hand, 805-333, 23456)For relation Accounts and the first tuple, the components are: 123456 acctNosavings type12000 balanceFor relation Customers and the first tuple, the components are: Robbie firstNameBanks lastName901-222 idNo12345 accountFor relation Accounts, a relation schema is:Accounts(acctNo, type, balance)For relation Customers, a relation schema is:Customers(firstName, lastName, idNo, account)An example database schema is:Accounts (acctNo,type,balance)Customers (firstName,lastName,idNo,account)A suitable domain for each attribute:acctNo Integertype Stringbalance IntegerfirstName StringlastName StringidNo String (because there is a hyphen we cannot use Integer)account IntegerExamples of attributes that are created for primarily serving as keys in a relation:Universal Product Code (UPC) used widely in United States and Canada to track products in stores.Serial Numbers on a wide variety of products to allow the manufacturer to individually track each product.Vehicle Identification Numbers (VIN), a unique serial number used by the automotive industry to identify vehicles.We can order the three tuples in any of 3! = 6 ways. Also, the columns can be ordered in any of 3! = 6 ways. Thus, the number of presentations is 6*6 = 36. We can order the three tuples in any of 5! = 120 ways. Also, the columns can be ordered in any of 4! = 24 ways. Thus, the number of presentations is 120*24 = 2880We can order the three tuples in any of m! ways. Also, the columns can be ordered in any of n! ways. Thus, the number of presentations is n!m!CREATE TABLE Product (maker CHAR(30),model CHAR(10) PRIMARY KEY,type CHAR(15));CREATE TABLE PC (model CHAR(30),speed DECIMAL(4,2),ram INTEGER,hd INTEGER,price DECIMAL(7,2));CREATE TABLE Laptop (model CHAR(30),speed DECIMAL(4,2),ram INTEGER,hd INTEGER,screen DECIMAL(3,1),price DECIMAL(7,2));CREATE TABLE Printer (model CHAR(30),color BOOLEAN,type CHAR (10),price DECIMAL(7,2));ALTER TABLE Printer DROP color;ALTER TABLE Laptop ADD od CHAR (10) DEFAULT ‘none’; CREATE TABLE Classes (class CHAR(20),type CHAR(5),country CHAR(20),numGuns INTEGER,bore DECIMAL(3,1),displacement INTEGER);CREATE TABLE Ships (name CHAR(30),class CHAR(20),launched INTEGER);CREATE TABLE Battles (name CHAR(30),date DATE);CREATE TABLE Outcomes (ship CHAR(30),battle CHAR(30),result CHAR(10));ALTER TABLE Classes DROP bore;ALTER TABLE Ships ADD yard CHAR(30);R1 := σspeed ≥ 3.00(PC)R2 := πmodel(R1)R1 := σhd ≥ 100(Laptop)R2 := Product (R1)R3 := πmaker (R2)model100510061013 makerEAR1 := σmaker=B(Product PC)R2 := σmaker=B(Product Laptop)R3 := σmaker=B(Product Printer)model,priceR5 := πmodel,price(R2)R6: = πmodel,price(R3)R7 := R4 R5 R6model price100464910056301006104920071429R1 := σcolor = true AND type = laser(Printer)R2 := πmodel(R1)R1 := σtype=laptop(Product)R2 := σtype=PC(Product)R3 := πmaker(R1)R4 := πmaker(R2)R5 := R3 – R4R1 := ρPC1(PC)R2 := ρPC2(PC)R3 := R1(PC1.hd = PC2.hd AND PC1.model <> PC2.model)R2R4 := πhd(R3)R1 := ρPC1(PC)R2 := ρPC2(PC)R3 := R1(PC1.speed = PC2.speed AND PC1.ram = PC2.ram AND PC1.model < PC2.model)R2R4 := πPC1.model,PC2.model(R3)R1 := πmodel (σspeed ≥ 2.80(PC)) πmodel(σspeed≥ 2.80(Laptop))R2 := πmaker,model(R1 Product)R3 := ρR3(maker2,model2)(R2)R4 := R2(maker = maker2 AND model <> model2)R3R5 := πmaker(R4)R1 := πmodel,speed(PC)R2 := πmodel,speed(Laptop)R3 := R1 R2R4 := ρR4(model2,speed2)(R3)R5 := πmodel,speed (R3(speed < speed2 )R4)R6 := R3 – R5(R6 Product) makerBmaker,speed (Product PC)BFGmodel30033007makerFGhd25080160PC1.model PC2.model 10041012makerBER2 := ρR2(maker2,speed2)(R1) R3 := ρR3(maker3,speed3)(R1)R4 := R1 (maker = maker2 AND speed <> speed2) R2R5 := R4 (maker3 = maker AND speed3 <> speed2 AND speed3 <> speed) R3 R6 := πmaker (R5)R1 := πmaker,model (Product PC)R2 := ρR2(maker2,model2)(R1)R3 := ρR3(maker3,model3)(R1)R4 := ρR4(maker4,model4)(R1)R5 := R1 (maker = maker2 AND model <> model2) R2R6 := R3 (maker3 = maker AND model3 <> model2 AND model3 <> model) R5R7 := R4 (maker4 = maker AND (model4=model OR model4=model2 OR model4=model3)) R6R8 := πmaker (R7)R1 := σbore ≥ 16 (Classes)R2 := πclass,country (R1)class countryIowa USA North Carolina USA Yamato Japanlaunched < 1921nameHaruna HieiKirishima KongoRamillies Renown RepulseResolution Revenge Royal Oak Royal Sovereign Tennesseebattle=Denmark Strait AND result=sunk (Outcomes)ship Bismarck HoodmakerADEmakerA B D ER1 := Classes Ships(R1) R2 := σlaunched > 1921 AND displacement > 35000(R2)R3 := πnamenameIowaMissouriMusashiNew JerseyNorthCarolinaWashingtonWisconsinYamato(Outcomes)R1 := σbattle=GuadalcanalR1R2 := Ships(ship=name)R3 := Classes R2numGuns name displacementKirishima320008 Washingto370009nname(Outcomes)R2 := πshipR3 := ρ(R2)R3(name)R4 := R1 R3nameCaliforniaHarunaHieiIowaKirishimaKongoMissouriMusashiNew JerseyNorth CarolinaRamilliesRenownRepulseResolutionRevengeFrom 2.3.2, assuming that every class has one ship named after the class. R1 := πclass (Classes) R2 := πclass (σname <> class (Ships)) R3 := R1 – R2 R1 := πcountry (σtype=bb (Classes)) R2 := πcountry (σtype=bc (Classes)) R3 := R1 ∩ R2 R1 := πship,result,date (Battles (battle=name) Outcomes)R2 := ρR2(ship2,result2,date2)(R1)R3 := R1 (ship=ship2 AND result=damaged AND date < date2) R2R4 := πship (R3)No results from sample data. Exercise 2.4.5 The result of the natural join has only one attributefrom each pair of equated attributes. On the other hand,the result of the theta-join has both columns of theattributes and their values are identical.Exercise 2.4.6UnionIf we add a tuple to the arguments of the unionoperator, we will get all of the tuples of the original result and maybe the added tuple. If the added tuple is a duplicate tuple, then the set behavior will eliminate that tuple. Thus the union operator is monotone.IntersectionIf we add a tuple to the arguments of the intersection operator, we will get all of the tuples of the original result and maybe the added tuple. If the added tuple does not exist in the relation that it is added but does exist in the other relation, then the result set will include the added tuple. Thus the intersection operator is monotone.DifferenceIf we add a tuple to the arguments of the difference operator, we may not get all of the tuples of the original result. Suppose we haverelations R and S and we are computing R – S. Suppose also that tuple t is in R but not in S. The result of R – S would include tuple t .However, if we add tuple t to S, then the new result will not have tuple t . Thus the difference operator is not monotone.ProjectionIf we add a tuple to the arguments of the projection operator, we will get all of the tuples of the original result and the projection of the added tuple. The projection operator only selects columns from the relation and does not affect the rows that are selected. Thus the projection operator is monotone.SelectionRoyal OakRoyalSovereignTennesseeWashingtonWisconsin Yamato ArizonaBismarck Duke of York FusoHoodKing George V Prince of WalesRodneyScharnhorstSouth DakotaWest VirginiaYamashiroclassBismarck countryJapanGt. BritainIf we add a tuple to the arguments of the selection operator, we willget all of the tuples of the original result and maybe the added tuple.If the added tuple satisfies the select condition, then it will be added to the new result. The original tuples are included in the new resultbecause they still satisfy the select condition. Thus the selectionoperator is monotone.Cartesian ProductIf we add a tuple to the arguments of the Cartesian product operator, we will get all of the tuples of the original result and possiblyadditional tuples. The Cartesian product pairs the tuples of onerelation with the tuples of another relation. Suppose that we arecalculating R x S where R has m tuples and S has n tuples. If we add atuple to R that is not already in R, then we expect the result of R x S to have (m + 1) * n tuples. Thus the Cartesian product operator ismonotone.Natural JoinsIf we add a tuple to the arguments of a natural join operator, we willget all of the tuples of the original result and possibly additionaltuples. The new tuple can only create additional successful joins, notless. If, however, the added tuple cannot successfully join with any of the existing tuples, then we will have zero additional successful joins.Thus the natural join operator is monotone.Theta JoinsIf we add a tuple to the arguments of a theta join operator, we will get all of the tuples of the original result and possibly additional tuples.The theta join can be modeled by a Cartesian product followed by aselection on some condition. The new tuple can only create additionaltuples in the result, not less. If, however, the added tuple does notsatisfy the select condition, then no additional tuples will be added to the result. Thus the theta join operator is monotone.RenamingIf we add a tuple to the arguments of a renaming operator, we will getall of the tuples of the original result and the added tuple. Therenaming operator does not have any effect on whether a tuple isselected or not. In fact, the renaming operator will always return asmany tuples as its argument. Thus the renaming operator is monotone.If all the tuples of R and S are different, then the union has n + m tuples, and this number is the maximum possible.The minimum number of tuples that can appear in the result occurs if every tuple of one relation also appears in the other. Then the union has max(m , n) tuples.If all the tuples in one relation can pair successfully with all the tuples in the other relation, then the natural join has n * m tuples. This number wouldbe the maximum possible.The minimum number of tuples that can appear in the result occurs if none of the tuples of one relation can pair successfully with all the tuples in the other relation. Then the natural join has zero tuples.If the condition C brings back all the tuples of R, then the cross productwill contain n * m tuples. This number would be the maximum possible.The minimum number of tuples that can appear in the result occurs if the condition C brings back none of the tuples of R. Then the cross product has zero tuples.Assuming that the list of attributes L makes the resulting relation πL(R) and relation S schema compatible, then the maximum possible tuples is n. Thishappens when all of the tuples of πL(R) are not in S.The minimum number of tuples that can appear in the result occurs when all ofthe tuples in πL(R) appear in S. Then the difference has max(n–m , 0) tuples.Exercise 2.4.8Defining r as the schema of R and s as the schema of S:1.πr(R S)2.R δ(πr∩s(S)) where δ is the duplicate-elimination operator inSection 5.2 pg. 2133.R – (R –πr(R S))Exercise 2.4.9Defining r as the schema of R1.R - πr(R S)πA1,A2…An(R S)σspeed < 2.00 AND price > 500(PC) =Model 1011 violates this constraint.σscreen < 15.4 AND hd < 100 AND price ≥ 1000(Laptop) =Model 2004 violates the constraint.πmaker (σtype = laptop(Product)) ∩ πmaker(σtype = pc(Product)) =Manufacturers A,B,E violate the constraint.This complex expression is best seen as a sequence of steps in which we define temporary relations R1 through R4 that stand for nodes of expression trees. Here is the sequence:R1(maker, model, speed) := πmaker,model,speed(Product PC)R2(maker, speed) := πmaker,speed(Product Laptop)R3(model) := πmodel (R1R1.maker = R2.maker AND R1.speed ≤ R2.speedR2)R4(model) := πmodel(PC)The constraint is R4 R3Manufacturers B,C,D violate the constraint.πmodel (σLaptop.ram > PC.ram AND Laptop.price ≤ PC.price(PC × Laptop)) =Models 2002,2006,2008 violate the constraint.πclass (σbore > 16(Classes)) =The Yamato class violates the constraint.πclass (σnumGuns > 9 AND bore > 14(Classes)) =No violations to the constraint.This complex expression is best seen as a sequence of steps in which we define temporary relations R1 through R5 that stand for nodes of expression trees. Here is the sequence:R1(class,name) := πclass,name(Classes Ships)R2(class2,name2) := ρR2(class2,name2)(R1)R3(class3,name3) := ρR3(class3,name3)(R1)R4(class,name,class2,name2) := R1(class = class2 AND name <> name2)R2R5(class,name,class2,name2,class3,name3) := R4(class=class3 AND name <> name3 AND name2 <> name3)R3The constraint is R5 =The Kongo, Iowa and Revenge classes violate the constraint.πcountry (σtype = bb(Classes)) ∩ πcountry(σtype = bc(Classes)) =Japan and Gt. Britain violate the constraint.This complex expression is best seen as a sequence of steps in which we define temporary relations R1 through R5 that stand for nodes of expression trees. Here is the sequence:R1(ship,battle,result,class) := πship,battle,result,class (Outcomes(ship = name)Ships)R2(ship,battle,result,numGuns) := πship,battle,result,numGuns(R1 Classes)R3(ship,battle) := πship,battle (σnumGuns < 9 AND result = sunk(R2))R4(ship2,battle2) := ρR4(ship2,battle2)(πship,battle(σnumGuns > 9(R2)))R5(ship2) := πship2(R3(battle = battle2)R4)The constraint is R5 =No violations to the constraint. Since there are some ships in the Outcomes table that are not in the Ships table, we are unable to determine the number of guns on that ship.Exercise 2.5.3Defining r as the schema A1,A2,…,Anand s as the schema B1,B2,…,Bn:πr (R) πs(S) =where is the antisemijoinExercise 2.5.4The form of a constraint as E1 = E2can be expressed as the other twoconstraints.Using the “equating an expression to the empty set” method, we can simply say:E 1– E2=As a containment, we can simply say:E1 E2AND E2E1Thus, the form E1 = E2of a constraint cannot express more than the two otherforms discussed in this section.。

2022年武汉轻工大学软件工程专业《操作系统》科目期末试卷A(有答案)

2022年武汉轻工大学软件工程专业《操作系统》科目期末试卷A(有答案)

2022年武汉轻工大学软件工程专业《操作系统》科目期末试卷A(有答案)一、选择题1、下面叙述中,错误的是()A.操作系统既能进行多任务处理,又能进行多重处理B.多重处理是多任务处理的子集,C.多任务是指同一时间内在同一系统中同时运行多个进程D.一个CPU的计算机上也可以进行多重处理2、下列关于操作系统的论述中,正确的是()。

A.对于批处理作业,必须提供相应的作业控制信息B.对于分时系统,不一定全部提供人机交互功能C.从响应角度看,分时系统与实时系统的要求相似D.在采用分时操作系统的计算机系统中,用户可以独占计算机操作系统中的文件系统3、通常用户进程被建立后()A.使一直存在于系统中,直到被操作人员撤销B.随着作业运行正常或不正常结束而撤销C.随着时间片轮转而撤销与建立D.随着进程的阻塞或唤醒而撤销与建立4、为多道程序提供的共享资源不足时,可能会产生死锁。

但是,不当的()也可能产生死锁。

A.进程调度顺序B.进程的优先级C.时间片大小D.进程推进顺序5、死锁与安全状态的关系是()。

A.死锁状态有可能是安全状态B.安全状态有可能成为死锁状态C.不安全状态就是死锁状态D.死锁状态一定是不安全状态6、采用SPOOLing技术后,使得系统资源利用率()。

A.提高了B.有时提高,有时降低C.降低了D.提高了,但出错的可能性增人了7、提高单机资源利用率的关键技术是()。

A.SPOOLing技术B.虚拟技术C.交换技术D.多道程序设计技术8、若8个字(字长32位)组成的位示图管理内存,假定用户归还一个块号为100的内,存块,它对应位示图的位置为()。

假定字号、位号、块号均从1开始算起,而不是从0开始。

A.字号为3,位号为5B.字号为4,位号为4C.字号为3,位号为4D.字号为4,位号为59、下列关于打开文件open()操作和关闭文件close()操作的叙述,只有()是错误的。

A.close()操作告诉系统,不再需要指定的文件了,可以丢弃它B.open()操作告诉系统,开始使用指定的文件C.文件必须先打开,后使用D.目录求必须先打开,后使用10、在请求分页系统中,页面分配策略与页面置换策略不能组合使用的是()。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

武汉轻工大学数据库选
修期末作业
文稿归稿存档编号:[KKUY-KKIO69-OTM243-OLUI129-G00I-FDQS58-MG129]
武汉工业学院校公选课
————《数据库应用》大作业
姓名:李晓华
学号:
院(系):机械工程学院
专业:过控
2013年11月19日
一、建立包含学籍管理相关信息的数据库和表
(1)学生基本信息表
(2)课程表
(3)成绩表
二、建立查询
(1)输出所有不及格学生的名单
在SQL查询中输入以下程序:
SELECT学生基本信息表.姓名AS不及格学生名单FROM学生基本信息表,课程表,成绩表WHERE学生基本信息表.学号[成绩表].[学号])AND((课程表.课程
号)=[成绩表].[课程号])AND((成绩表.分数)<60));
(2)输入学生姓名,能查阅指定学生的成绩信息
在SQL查询中输入以下程序:
SELECT学生基本信息表.姓名,课程表.课程名,成绩表.分数FROM学生基本信息表,课程表,成绩表WHERE(((学生基本信息表.姓名)=[请输入学生姓
名])AND((学生基本信息表.学号)=[成绩表].[学号])AND((成绩表.课程
号)=[课程表].[课程号]));
(3)输入课程名,能查阅指定课程的成绩信息
在SQL查询中输入以下程序:
SELECT课程表.课程号,课程表.课程名,课程表.学时数,课程表.学分,课程表.开课学期,课程表.考试考查标志FROM课程表WHERE(((课程表.课程名)=[请输入课程名]));
(4)输入班级名,能查阅指定班级所有学生的成绩信息
在SQL查询中输入以下程序:
SELECT课程表.课程号,课程表.课程名,课程表.学时数,课程表.学分,课程表.开课学期,课程表.考试考查标志FROM课程表WHERE(((课程表.课程名)=[请输入课程名]));
三、思考题
1.确保数据库的实体完整性与参照完整性有什么作用?
关系的完整性主要包括域完整性、实体完整性和参照完整性三种。

1.域(列)完整性
域完整性是对数据表中字段属性的约束,通常指数据的有效性,它包括字段的值域、字段的类型及字段的有效规则等约束,它是由确定关系结构时所定义的字段的属性决定的。

限制数据类型,缺省值,规则,约束,是否可以为空,域完整性可以确保不会输入无效的值.。

2.实体(行)完整性
实体完整性是对关系中的记录唯一性,也就是主键的约束。

准确地说,实体完整性是指关系中的主属性值不能为Null且不能有相同值。

定义表中的所有行能唯一的标识,一般用主键,唯一索引unique关键字,及identity属性比如说我们的身份证号码,可以唯一标识一个人.
一表的主键实现,还可以用触发器来维护参考完整性
2.如何设置字段的有效性规则及确定主键?
打开你要修改的数据表,然后点击视图选项
在弹出的下拉菜单中,找到设计视图。

打开了设计视图面板,在设计视图中,我们给毕业院校添加一个有效性规则,点击一下毕业院校的字段,这样就能选中它
接着点击查询选项,如红色箭头所示
在有效性规则这一栏,输入in("北大","清华","首都师范"),这句代码的意思就是,这个字段的数据必须是北大、清华、首都师范这三个大学,其他数据都不能录入。

点击保存按钮
弹出一个警告消息,因为数据表中已经有了数据,但是这些数据不符合现在刚刚设立的有效性规则。

我们点击是,这样就就开始用新的规则来测试数据了
等待几分钟,弹出了一个新的警告信息,点击是,意思是继续用这个规则来约束数据,这样原来的数据就被删除了。

点击菜单栏上面的数据表视图,这样就返回到了数据表视图。

我们看到原有的数据已经删除了那些不符合有效性规则的数据。

我们尝试输入“河大”这两个字
提示消息说不符合有效性规则,这样你的表就只能输入符合有效性规则色数据了
3.怎样将Excel表格数据导入到Access数据库中?
将Excel中的数据装入Access,可以从Excel工作表复制数据并粘贴到Access数据表中,将Excel工作表导入Access表中,或者从Access表链接到Excel工作表。

相关文档
最新文档