文档详情

使用SSMS创数据库和表.doc

发布:2017-03-02约字共7页下载文档
文本预览下载声明
实验二 使用SSMS创建数据库和表 一、?? 实验目的与要求: 掌握使用SSMS(SQL Server Management Studio)创建数据库的方法。 掌握使用SSMS设计表结构的方法。 掌握使用SSMS输入表内容的方法。 分析学生-课程数据库中student、course、sc表的主码、候选码和外码。 二、?? 实验内容 1.使用SSMS(SQL Server Management Studio)创建学生-课程数据库。 2. 分别设计student、course和sc的表结构,并输入表内容。 3. 设置student表的主码为sno,分析当主码为空或重复时,出现的提示。 4、设置sc表的外码为sno,分析当外码的取值不在参照表(student)中时,出现的提示。 三、实验指导 1、使用SSMS(SQL Server Management Studio)创建学生-课程数据库。 (1)新建数据库 (2)输入数据库名 2、分别设计student、course和sc的表结构,并输入表内容。 (1)新建表 (2)设计表结构 提示: 如果设计有误,选择“修改”,重新进入设计界面: (3)完成对3张表格的设计: (4)输入表内容 注意:不能输入完全一样的2行,否则将出现以下错误 解决方法:将重复的行同时删除 (5)完成如下表内容的输入: 3、 设置student表的主码为sno,分析当主码为空或重复时,出现的提示。 (1)设置主键 (2)主码为空时 (3)主码重复时 4、设置sc表的外码为sno,分析当外码的取值不在参照表(student)中时,出现的提示。 (1)设置sc表的外码 (2)如果给sc中sno取值为student表中没有的’95006’,则出现以下提示: 思考: (1)自行完善course表和sc表的主码 (2)添加sc表的另一外码cno,参照course表的cno取值 insulating properties of air ... GB/T9966.3-2001 test methods for natural facing stones part 4: wear resistance test method for GB/T996 6.4-2001 test methods for natural facing stones 5th part: test method for scleroscope hardness GB/T996 6.5-2001 test methods for natural facing stones 6th part: test method for acid resistance GB/T996 6.6-2001 test methods for natural facing stone test methods for natural facing stones 8th part: by uniform static pressure difference test stone mounted Structure strength test method of GB/T996 6.8-2001 13, sealant technical standards of architectural curtain wall construction with Silicon sealant silicone building sealant GB/T14683-2003 GB16776-2005 JC887-2001 dry hanging stone curtain wall with epoxy adhesive sealant for glass curtain wall joints JC/T882-2001 JC/T883-2001 mold for building stone building sealant sealant JC/ T885-2001 elastomeric sealant for insulating glass JC/T486-2001 14, building curtain wall fasteners for standard steel high strength bolts with large Hexagon head, large Hexagon nuts, washers technology GB/T1231-2006 high strength plain washers for steel structures GB/T1230-2006 high strength large Hexagon nuts for steel GB
显示全部
相似文档