How is data of multi valued attribute say phone number of person relation is stored in table? I have searched for the answers referencing my books as well as web but i could not find one. So here i am.
I am not sure what this question is trying to ask so help if anyone could.
When you say a multi-valued attribute, for a phone number for example, you mean because the phone number has multiple parts to it - area code, suffix, and prefix? If so, how you store it just depends on your use case for it.
If your use case is to just store it so it can be later recalled and displayed in the application, then storing the whole phone number as is, in a string-based field (e.g. VARCHAR in SQL Server) is sufficient.
If you need to be able to query about different parts of the phone number, then storing it as multiple separate INT fields for each part would be more appropriate and easier to work with, e.g. AreaCode, PhonePrefix, and PhoneSuffix. That way you can index each part of the phone number for efficient querying, and it's easy to query for things like, &quot;who are all the people in area code 631?&quot; by just doing a query of the kind SELECT * FROM People WHERE AreaCode = 631, etc.
It truly just depends on your use cases.