1

I am creating , a site like gsmarena , can any one help me with database design to store mobile specifications like here "http://www.gsmarena.com/asus_padfone_infinity_lite-6120.php" as user can add more custom specification ,

2

You can have Phone table where you store phone. Create two another attributes and sub-attribute tables.

Attribute Table will look like below:

  • AttributeId (PK, auto generated int is recommended)
  • PhoneId (FK to Phone tablet, not null)
  • AttributeKey (String, not null - text like "DISPLAY" "DATA" etc.)
  • AttributeValue (string, null)

SubAttribute Table will look like below:

  • SubAttributeId (PK, auto generated int is recommended)
  • AttributeId (FK to Attribute tablet, not null)
  • SubAttributeKey (String, not null - text like "Dimensions" "Size" etc.)
  • SubAttributeValue (string, null)
  • And one more question ,which will be good for phoneid ? serialized or normal data? – Muhammad Junaid Apr 20 '14 at 14:43
  • generally you should prefer auto-generated integer IDs. In a separate table, map that integer ID to phone name etc. – Yogee Apr 21 '14 at 17:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.