国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > 綜合 > 正文

我的第一次數據庫作業:題目原文

2024-07-21 02:05:35
字體:
來源:轉載
供稿:網友
國內最大的酷站演示中心!

take assessment: exercise 1




 

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.                   );



your submission for this exercise should consist of the following files: bookpublisher.html and createdb.sql, rel-ops.txt, and part3.txt.



to help yourself do your best on this assessment, consult this general list of grading guidelines.




 



 

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 贵溪市| 南充市| 佛坪县| 通化县| 西乌| 林西县| 乳山市| 黄浦区| 泗阳县| 广宗县| 莱芜市| 望都县| 女性| 柳林县| 银川市| 石柱| 邻水| 井陉县| 峡江县| 望都县| 阳城县| 轮台县| 大宁县| 浦县| 左权县| 桐梓县| 南雄市| 新化县| 寻甸| 淳化县| 陕西省| 胶南市| 寿宁县| 额尔古纳市| 安新县| 斗六市| 深州市| 巢湖市| 临夏县| 柯坪县| 宜黄县|