How to design a database for storing phone attribute?

Posted on

Question :

I’m trying to capture following attributes :

Name,Company,Price,Size,Weight,Release date,Gms,No of sim,Camera details,SIM details,Screen size,Screen type,Processor and Ram details and all..

Any lead how to proceed?

  • Always I’m going to fetch data once entered.
  • Rarely updates are going to be performed.
  • All attributes to be fetched once only.
  • Number of attributes exceeds 40 and all are tinytext.

Answer :

Depending on how you will access the database, there are different options:
Local with single or multiple users:
Think first, create later and you will have a good design.
1. who will consume this data? that will give you an idea where you should store your data
2. how much storage capacity do you need? you need plan for backups and recovery
3. how many users will access that database simultaneously? server capacity
4. which RDBMS are you planning to use? which one is your preference

1. create list of attributes you planning to capture, always think of expansion for the future. maybe you will need to add more attributes.
2. group them in a way that is meaningful to you.
Dimension(Width, Height, Depth, Size, Weight),
Configuration(Processor, Ram, Storage, Screen),
Features(Finger Print, Camera Specs Front and Back, etc.)

1. Create Database, create table(s) and define indexes, create diagrams, create relationships if need it.
2. Configure security settings.
3. Load testing data for each attribute.
4. Start using it and make appropriates changes if need it.

Good luck,

Leave a Reply

Your email address will not be published. Required fields are marked *