私はホテルのデータセットを持っています。データセット内の各ファイルは異なるホテル用で、このホテルの訪問者によって書かれた多数のレビューが含まれています。私の関係をBCNF(3.5NF)に変換しようとしています
1)私のデータセットの関係:
HotelReview(int: OverallRating, int: AveragePrice, url: URL, string: Author, string: Content, date: Date, int: No. Reader, int: No. Helpful, int: Overall, int: Value, int: Rooms, int: Location, int: Cleanliness, int: Checkin/front desk, int: Service, int: Business Service)
2)私のデータセットのプライマリキー:
Author and URL (**Composite Key**)
3)関数従属私は5つのタスクリストを与えられています。
• Content -> OverallRating, AveragePrice, URL, Author, Date, No. Reader, No. Helpful, Overall, Value, Rooms, Location, Cleanliness, Checkin/front desk, Service, Business Service
• Author, URL -> Content -> OverallRating, AveragePrice, URL, Content, Date, No. Reader, No. Helpful, Overall, Value, Rooms, Location, Cleanliness, Checkin/front desk, Service, Business Service
• Author, Date -> OverallRating, AveragePrice, URL, Author, Date, No. Reader, No. Helpful, Overall, Value, Rooms, Location, Cleanliness, Checkin/front desk, Service, Business Service
4)潜在的な候補キー:
Content
しかし、今私は5番目の課題に苦しんでいます。 BCNF(3.5NF)に私の関係を正規化するよう求められました。私はこれを行う方法を研究しましたが、それはちょうど私に意味をなさない、私は自分の関係で正規化を複製することができませんでした。どんな助けやアドバイスも大歓迎です。ここで
は、ホテルのデータセットからのサンプルファイルです:
<Overall Rating>4
<Avg. Price>$173
<URL>http://...
<Author>everywhereman2
<Content>Old seattle getaway...
<Date>Jan 6, 2009
<img src="http://cdn.tripadvisor.com/img2/new.gif" alt="New"/>
<No. Reader>-1
<No. Helpful>-1
<Overall>5
<Value>5
<Rooms>5
<Location>5
<Cleanliness>5
<Check in/front desk>5
<Service>5
<Business service>5
<Author>RW53
<Content>Location! Location? view from room of nearby freeway
<Date>Dec 26, 2008
<No. Reader>-1
<No. Helpful>-1
<Overall>3
<Value>4
<Rooms>3
<Location>2
<Cleanliness>4
<Check in/front desk>3
<Service>-1
<Business service>-1
...new review e.t.c
、ここでは、表形式でホテルのレビューの例である:
ブルートーンレビューが表示されているホテルを識別する列を表し、黄色の列は複合主キーを表します(作成者:
お時間をありがとう。あなたの関数従属性を考えると
ありがとう、遅く返事を申し訳ありません –