close
Blogtrottr
Changes are afoot at Blogtrottr!
By popular request, we're bringing in paid plans with some cool new features (and more on the way). You can read all about it in our blog post.
批踢踢實業坊 Examination 板
[考題] 資料庫 VIEW 的限制 [100公務]
Jul 5th 2013, 01:04, by beatfuture

作者beatfuture (菜鳥帽客)

站內Examination

標題[考題] 資料庫 VIEW 的限制 [100公務]

時間Fri Jul 5 01:04:16 2013

查講義上寫到 , VIEW 的輸出要包含主鍵 那假如使用到兩個表格, ex. FROM 表格1,表格2 需要將兩個表格的主鍵都輸出嗎 ? Q1. Phone( model,manufacturer,type,price) 第一個是主見 Customer(custid,email) 第一個是主見 Purchase(model,custid,date) 前兩個是主見.......新注音選字太爛,饒了我吧... 建立一個名為Loyal的view , 內容為(custid),(manufacturer)所構成 且該顧客至少購買三台以上電話 --- 我的解法 --- CREATE VIEW Loyal SELECT C.custid , P.model ,Ph.custid , P.manufacturer FROM Customer C , Phone P , Purchase Ph GROUP BY Ph.model , Ph.date HAVING COUNT(*)>=3 Q2. 已知關聯R={A,B,C,E,G,H}為1NF, F={A->B , B->C , AB->CEG , H->A} (1)主鍵是------->(H) (2)簡化集合F成為M,使M含最少數量的功能相依 且 F+ = M+ (3)若將R分解成 R1(A,B,C,E,G),R2(H,A),則為無失誤合併的分解嗎? 為什麼? (4)將R分解為無失誤和並且保留F的3NF關聯,註明個關聯的主鍵, 並注意控制各屬性在各關聯的重複出現。 ps: 第二題看不懂什麼是F+=M+ , 還有無失誤合併是蝦米?? 另外問個小問題: 若B->C,D,E, A,B->F 是否 A,B->C,D,E,F 成立 ?? 謝謝大大幫忙解惑 !! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.231.55.120

asdd:create view 語法不對喔 另外select group by的語法也不對 07/05 01:13

asdd:View印象中只有update有一些限制 create view沒有 07/05 01:15

asdd:(2)是要你化成最簡功能相依 07/05 01:18

This entry passed through the Full-Text RSS service — if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers. Five Filters recommends: 'You Say What You Like, Because They Like What You Say' - http://www.medialens.org/index.php/alerts/alert-archive/alerts-2013/731-you-say-what-you-like-because-they-like-what-you-say.html

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 yisoajkls 的頭像
    yisoajkls

    2016徵求年菜推薦網路訂購最紅的商家.年菜訂購?台北年菜外送餐廳推薦(年菜)?年菜.今年不想做年菜推薦,網路宅配哪一家好?

    yisoajkls 發表在 痞客邦 留言(0) 人氣()