1 / 6

Multivalue attribute : contains more than one value

Phone. Employee. Email. Home Phone. Mobile Phone. Employee. Personal Email. Business Email. Multivalue attribute : contains more than one value. Contrast with:. What are the pros and cons in terms of flexibility and preciseness in meaning?.

Download Presentation

Multivalue attribute : contains more than one value

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Phone Employee Email Home Phone Mobile Phone Employee Personal Email Business Email Multivalue attribute: contains more than one value Contrast with: What are the pros and cons in terms of flexibility and preciseness in meaning? Department of Computer Science and Engineering, HKUST Slide 1

  2. Take Home Messages from the Customer-Depositor-Account Example • The exact meaning of a word may be ambiguous • What does “Amount” mean? • What does “Name” (of Customer and Account) mean? Are they the same? • Whether to put an attribute to an entity or a relationship is not easy to determine • In the example, we try to argue that if “Amount” represents the deposit amount of EACH transaction, it should be associated with the relationship, because • “Amount” is a property of the “deposit” action which is represented by the relationship between customer and account • If we associate the “Amount” of each deposit to the account or to the customer, then multi-value attributes must be used, which is discouraged (you would know why when we study the relational data model) Department of Computer Science and Engineering, HKUST Slide 2

  3. Take Home Messages from the Customer-Depositor-Account Example • We further argue that if “Amount” is the balance of an account, there is always only one single balance for an account. It should be a property of account, not a property of the act of “depositing” money (though the act changes the balance) Department of Computer Science and Engineering, HKUST Slide 3

  4. ISA (“is a”) Relationship • A university has both part-time and full-time students. They are largely the same but with some differences: Name Student-No Course-No Title Grade Student Course Advisor takes FT/PT Emp-Name • Problem: If only FT students have advisors and only PT students have employer names, there are lots of empty values in the database Department of Computer Science and Engineering, HKUST Slide 4

  5. Name Student-No PT Student Emp-Name Separating the Students Name Student-No Course-No Title Grade FT Student Course Advisor takes takes Grade • Other problems are introduced • If a student changes from FT to PT, he will exist in both entities Department of Computer Science and Engineering, HKUST Slide 5

  6. Introduce a new Relationship: ISA Name Student-No Course-No Title Grade Student Course takes ISA PT Student PT Student • A PT student “IS-A” Student • A FT student “IS-A” Student • A Professor “IS-A” Student Emp-Name Advisor Department of Computer Science and Engineering, HKUST Slide 6

More Related