- 1、本文档共12页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
数据库习题(Database exercises)
数据库习题(Database exercises)
Experiment 1, two
1) the student table adds one attribute nation (ethnic), and the data type is varchar (20).
2) delete the new attribute Nation in the student table.
3) create an index called IX_sname for the students and sort them by name.
4) delete the IX_sname index.
Create database student_course (created in enterprise manager called student_course database)
Use student_course
Create table student
(SnO, char (9), primary, key, not, null,
Sname varchar (20) unique not null,
Ssex char (2) not null,
Sage smallint not null,
Sdept char (5) not null
);
Create table course
(CNO, char (9), primary, key, not, null,
CNAME varchar (20) unique not null,
Cpno char (9) not null,
Ccrebit smallint
);
Create table SC
(SnO char (7) not null,
CNO char (9) not null,
Grade numeric (4,1)
);
Insert
Into, student (SnO, sname, ssex, sage, sdept)
Values (0215125, Chang Li , male ,19,is);
Select * from student
Insert
Into, course (CNO, CNAME, cpno, ccrebit)
Values (3, ` information systems,1,4);
Select * from course
Insert
Into, SC (SnO, CNO, grade)
Values (1015121,2,85);
Select * from SC
Alter, table, student, add, snation, varchar (20);
Select * from student
Alter, table, student, drop, column, snation;
Select, SnO, sname
From student
Select * from student
(creating indexes) create, index, IX_sname, on, student (sname);
Drop index student.IX_sname;
Experiment three
Content 1.
1. inquire about the authors number, name and information of all authors
2. query the names of all authors, the authors information, and display the string ID number in front of each authors author number, which indicates that the information displayed is identity information
3. query author, name and city in CA state
4. query the title and date of publication between 1992.1.1-2000.12.31 (query book published in 1991)
5. inquire about the books published by each publisher
6. inquire about the number of books sold by a store
7. inquire about all book information with sales records, includi
您可能关注的文档
- 拔智齿后注意事项(After drawing wisdom teeth, matters needing attention).doc
- 拒酒词绝对值得一看(The word alcohol refusal is definitely worth seeing).doc
- 拔火罐为什么能治病(Why can the cupping treatment).doc
- 拔河(Tug-of-war).doc
- 拔火罐的作用与注意事项(Cupping effects and precautions).doc
- 拔牙后注意事项(Points for attention after tooth extraction).doc
- 拔罐减肥效果肯定是有的(Cupping effect is sure to have some weight loss).doc
- 拓展知识(Expand knowledge).doc
- 拔针技术在骨膜劳损中的应用(Application of needle pulling technique in periosteum strain).doc
- 拖拉机座椅振动对驾驶员腰部疲劳影响研究_以积分肌电值和主观感受评价(Study on driver fatigue evaluation _ waist effect of tractor seat vibration to iEMG and subjective feelings).doc
- 2024年度党员干部民主生活会班子对照检查材料.docx
- 公司党委领导班子2024年度民主生活会对照检查材料4个带头方面.docx
- 市府办(政府办)领导班子2024年民主生活会会后综合情况报告.docx
- 在2025年市司法局信息宣传工作推进会上的讲话.docx
- 在2025年全省文化旅游高质量发展推进会上的讲话.docx
- 在2025年全区工业、住建大规模设备更新推进会上的讲话.docx
- 党支部2024年组织生活会民主评议党员情况总结报告_1.docx
- 2024年度组织生活会个人对照检查剖析材料.docx
- 镇党委书记2024年度民主生活会对照检查材料1.docx
- 党支部2024年组织生活会民主评议党员情况总结报告.docx
文档评论(0)