您好,欢迎光临本网站![请登录][注册会员]  
文件名称: SSD7 EX1 答案
  所属分类: 数据库
  开发工具:
  文件大小: 5kb
  下载次数: 0
  上传时间: 2012-10-28
  提 供 者: qz362******
 详细说明: Relational Databases Design the following two tables and turn in your submissions in an HTML file named BookPublisher.html. BOOK: • Primary Author • Title • ISBN • PublisherID • Edition • Date of Publication • Price • Book Description PUBLISHER: • PublisherID • Name • Address ________________________________________ Part I 1. Identify the keys in your tables as follows. For this exercise, ignore the performance considerations while choosing your keys. 1. For each table, indicate the Primary Key(s) (PKs). If there is no PK, state so. Fully justify your answer. 2. For each table, indicate the Alternate Key(s) (AKs). If there is no AK, state so. Fully justify your answer. 3. For each table, identify the Foreign Key(s) (FKs) and the integrity constraints. Fully justify your answer. 2. List all columns of your tables, and the domains (the data types and formats) of these columns. Fully justify your answer. In an HTML table, list at least four rows with valid values in each of the tables. Turn in your submission in a file named BookPublisher.html. ________________________________________ Part II Write SQL statements as specified below. You may find this help on setting up your DBMS useful. Submit your SQL statements in a file named createDB.sql. 1. Write the DDL statements to create the two tables using the CREATE TABLE statement. Be sure to identify your primary keys and alternate keys in the statement. 2. Write the INSERT statements to insert the four rows into each table. 3. Write the SQL statement to retrieve the title and price of all books published by either of two publishers (say "Addison Wesley" and "McGraw Hill"). In the file Rel-ops.txt, list which relational operations you used, from among the select/project/join operations, in order to perform this query. Explain the role of each operation in your query. 4. Write the SQL statement to retrieve the Publisher name of a particular book title (say "Fundamentals of Database Systems"). ________________________________________ Part III In the file named part3.txt, provide answers to the following questions. 1. In 1.2.2 Relational Operations, there was an example of the set difference operation: the result of r - s was provided to you. Provide the result of the set difference operation s - r. 2. In the class notes, the following UNION example was discussed. Give a prosaic description of the results that will be retrieved by replacing UNION with EXCEPT in the following query: 3. ( SELECT MemNo 4. FROM MEMBER, BOOK 5. WHERE MemNo = BorrowerMemNo AND 6. CallNumber = 'QA76.9.D26C66' 7. ) 8. UNION 9. ( SELECT MemNo 10. FROM MEMBER, BOOK 11. WHERE MemNo = BorrowerMemNo AND 12. CallNumber = 'QA76.9.D7E53' 13. ); ...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: SSD7 EX1 答案
 输入关键字,在本站1000多万海量源码库中尽情搜索: