问题 单项选择题

设有两个数据库表,父表和子表之间是一对多的联系,为控制子表和父表的关联,可 以设置“参照完整性规则”,为此要求这两个表______。

A.在父表连接字段上建立普通索引,在子表连接字段上建立主索引

B.在父表连接字段上建立主索引,在子表连接字段上建立普通索引

C.在父表连接字段上不需要建立任何索引,在子表连接字段上建立普通索引

D.在父表和子表的连接字段上都要建立主索引

答案

参考答案:B

解析:参照完整性是指当插入、删除或修改一个表中的数据时,通过参照引用相互关联的另一个表中的数 据,来检查对表的数据操作是否正确。 当有两个数据库表,父表和子表之间是一对多的联系,可以通过设置“参照完整性规则”来控制父表和子 表的关联。在关系数据库中是通过连接字段来体现和表示联系。连接字段要在父表中做为主关键字,在子表中是外部关键字,为此要求这两个表在父表连接字段上建立主索引,在子表连接字段上只要建立普通索引就可以了。

选择题
完形填空
完形填空(共20小题;每小题1分,满分20分)
阅读下面短文,从短文后所给各题的四个选项(A、B、C和D)中,选出可以填入空白处的最佳选项。
Dad was not only my best friend, but my compass. While he was alive, he    me with his actions and advice. He taught me one important  2  “Believe in yourself.”
If there was one phrase my dad  3  liked to hear, it was “I can’t.” He never got to finish high school and 4 two jobs to support his family,    he never complained. Through education and years of hard work, my dad became an excellent journalist.
When I was in high school, I had a  6  time with math. He tried to help me, but I 7 struggled. So my math teacher suggested I meet with him at 7:00 each morning before school for  8  help. I told my dad, “That’s  9 ! I can’t do that!” He replied, “You’re doing it. I’ll sent you to school.” Every morning at 6:45 a.m., we’d leave the  10 . Despite working 12 hours every day, Dad never once  11   driving me to school.
After months of  12  , I was facing the final exam. I was so  13 . On the day of the final, my dad hugged me and said, “Luke,  14   yourself. You can do it.” His words made me realize I needed to trust in my  15  and in the hours of work I’d 16 . When I got my  17   proudly, the first person I called was Dad. He screamed, “Yes! You deserved it!”
Even now, whenever I  18  that a task is too much for me, I think back to that exam. No matter how  19   something is, if you’re willing to work, you can succeed. I’m forever 20  to Dad for that lesson.
小题1:
A.understoodB.forgaveC.guidedD.impressed
小题2:
A.history B.lessonC.skillD.language
小题3:
A.alwaysB.almostC.ever D.never
小题4:
A.tookB.lost C.left D.finished
小题5:
A.soB.orC.butD.and
小题6:
A.goodB.free C.terribleD.short
小题7:
A.stillB.nearlyC.hardlyD.probably
小题8:
A.realB.practicalC.immediateD.extra
小题9:
A.wonderfulB.crazyC.expensiveD.necessary
小题10:
A.house B.schoolC.officeD.farm
小题11:
A.suggestedB.riskedC.enjoyedD.missed
小题12:
A.meetingB.testingC.learning D.interviewing
小题13:
A.excitedB.nervousC.happyD.shocked
小题14:
A.stand forB.hold backC.believe inD.look after
小题15:
A.teacherB.luck C.time D.ability
小题16:
A.wasted B.ignoredC.picked upD.put in
小题17:
A.answer B.gradeC.payD.gift
小题18:
A.hopeB.forgetC.worryD.promise
小题19:
A.differentB.importantC.hard D.interesting
小题20:
A.gratefulB.sorryC.politeD.useful