百看娱乐论坛's Archiver



ciwei 发表于 2004-12-13 06:44

高手进,sql的题目,帮下忙

<font face="Times New Roman">SQL Server</FONT>期末上机考试试题<p></p></P><font size=3>一、请在<font face="Times New Roman">”F<B>:</B>\Data033\”</FONT>目录下创建以“<B>班级+_+姓名</B>”命名的数据库(如:<B>网络032_林灵</B>),要求:数据文件两个,日志文件一个,初始大小都设置为<font face="Times New Roman">1MB</FONT>,最大容量和文件递增量采用默认值。将数据文件分成两个组,一个<font face="Times New Roman">primary</FONT>组,一个<font face="Times New Roman">group1</FONT>组,设置默认文件组为<font face="Times New Roman">group1</FONT>。<font face="Times New Roman">(10</FONT>分<font face="Times New Roman">)</FONT></FONT></P><font size=3>二、在上面创建的数据库中创建以下表结构:<font face="Times New Roman">(30</FONT>分<font face="Times New Roman">)</FONT></FONT></P><font size=3><font face="Times New Roman">    1</FONT>、表名:<font face="Times New Roman">Product  (</FONT>含义:产品名称表<font face="Times New Roman">)</FONT></FONT></P><P>字段名<p></p></P>含义<p></p></P>数据类型<p></p></P>说明<p></p></P><font face="Times New Roman">P_NO<p></p></FONT></P>产品编号<p></p></P><font face="Times New Roman">Char(5)<p></p></FONT></P>主键,<font face="Times New Roman">Not Null<p></p></FONT></P><font face="Times New Roman">P_Name<p></p></FONT></P>产品名称<p></p></P><font face="Times New Roman">VarChar(20)<p></p></FONT></P><font face="Times New Roman">Not Null<p></p></FONT></P></P><font size=3><font face="Times New Roman">2</FONT>、表名:<font face="Times New Roman">Supplier (</FONT>含义:供应商名称表<font face="Times New Roman">)</FONT></FONT></P><P>字段名<p></p></P>含义<p></p></P>数据类型<p></p></P>说明<p></p></P><font face="Times New Roman">S_NO<p></p></FONT></P>供应商编号<p></p></P><font face="Times New Roman">Int<p></p></FONT></P>主键,标识列,初值<font face="Times New Roman">1001</FONT>,递增量为<font face="Times New Roman">1</FONT>,<font face="Times New Roman">Not Null<p></p></FONT></P><font face="Times New Roman">S_Name<p></p></FONT></P>供应商名称<p></p></P><font face="Times New Roman">VarChar(20)<p></p></FONT></P><font face="Times New Roman">Not Null<p></p></FONT></P></P><font size=3><font face="Times New Roman">3</FONT>、表名:<font face="Times New Roman">Stock (</FONT>含义:产品库存表<font face="Times New Roman">)</FONT></FONT></P><P>字段名<p></p></P>含义<p></p></P>数据类型<p></p></P>说明<p></p></P><font face="Times New Roman">P_NO<p></p></FONT></P>产品编号<p></p></P><font face="Times New Roman">Char(5)<p></p></FONT></P>主键,<font face="Times New Roman">Not Null</FONT>。外键,参考<font face="Times New Roman">Product</FONT>表的<font face="Times New Roman">P_NO<p></p></FONT></P><font face="Times New Roman">S_NO<p></p></FONT></P>供应商编号<p></p></P><font face="Times New Roman">Int<p></p></FONT></P>主键,<font face="Times New Roman">Not Null</FONT>。外键,参考<font face="Times New Roman">Supplier</FONT>表的<font face="Times New Roman">S_NO<p></p></FONT></P><font face="Times New Roman">Stk_amt<p></p></FONT></P>库存数量<p></p></P><font face="Times New Roman">Int<p></p></FONT></P><font face="Times New Roman">Not Null</FONT>,非聚簇索引,升序<p></p></P><font face="Times New Roman">Unit_Price<p></p></FONT></P>产品单价<p></p></P><font face="Times New Roman">Numeric(7,2)<p></p></FONT></P><font face="Times New Roman">Not Null</FONT>,非聚簇索引,降序<p></p></P></P><font size=3><font face="Times New Roman">4</FONT>、表名:<font face="Times New Roman">InsertProduct</FONT></FONT></P><P>字段名<p></p></P>含义<p></p></P>数据类型<p></p></P>说明<p></p></P><font face="Times New Roman">P_NO<p></p></FONT></P>产品编号<p></p></P><font face="Times New Roman">Char(5)<p></p></FONT></P><font face="Times New Roman">Not Null<p></p></FONT></P><font face="Times New Roman">P_Name<p></p></FONT></P>产品名称<p></p></P><font face="Times New Roman">VarChar(20)<p></p></FONT></P><font face="Times New Roman">Not Null<p></p></FONT></P><font face="Times New Roman">InsertTime<p></p></FONT></P>添加时间<p></p></P><font face="Times New Roman">DateTime<p></p></FONT></P><font face="Times New Roman">Not Null<p></p></FONT></P></P><font size=3><font face="Times New Roman">5</FONT>

浪子孽神 发表于 2004-12-15 01:41

<P>你不是吧,建个库和两个表,不知道怎么说,这也能叫期末考试题目?你们老师秀逗。</P><P>[em08]</P>[align=right][color=#000066][此贴子已经被作者于2004-12-14 17:45:58编辑过][/color][/align]


页: [1]

Powered by Discuz! Archiver 7.0.0  © 2001-2009 Comsenz Inc.