Tweeted twitter.com/StackDBAs/status/669377834780094464
2 deleted 49 characters in body
source | link

iI am building an app with Laravel, and iI have users which also have a profile. I

I am unsure asabout the best way to go about settingset up the database for the user attributes for.

For example  :

user_ud  |   name  |  gender  |  haircolor
   1         josh       1           3

as you can see from thisThis quick example this isshows what my table for profiles currently looks like, as the vales are filled in from select boxes.

my question is. isIs this the besbest way to then map these valesattributes to a meaningfull valuevalues like this.?

 id  |  gender
  1      male
  2      female

 id  | hairColor
  1      blonde
  2      brown
  3      black

and so on creating a new table for each attribute type? or is there a better way of doing this?

i am building an app with Laravel, and i have users which also have a profile. I am unsure as the best way to go about setting up the database for the user attributes for example  

user_ud  |   name  |  gender  |  haircolor
   1         josh       1           3

as you can see from this quick example this is what my table for profiles currently looks like, as the vales are filled in from select boxes.

my question is. is the bes way to then map these vales to a meaningfull value like this.

 id  |  gender
  1      male
  2      female

 id  | hairColor
  1      blonde
  2      brown
  3      black

and so on creating a new table for each attribute type? or is there a better way of doing this?

I am building an app with Laravel, and I have users which also have a profile.

I am unsure about the best way to set up the database for the user attributes.

For example:

user_ud  |   name  |  gender  |  haircolor
   1         josh       1           3

This quick example shows what my table for profiles currently looks like, as the vales are filled in from select boxes.

Is this the best way to map these attributes to values like this?

 id  |  gender
  1      male
  2      female

 id  | hairColor
  1      blonde
  2      brown
  3      black

and so on creating a new table for each attribute type? or is there a better way of doing this?

1
source | link

Database design for multiple user attributes

i am building an app with Laravel, and i have users which also have a profile. I am unsure as the best way to go about setting up the database for the user attributes for example

user_ud  |   name  |  gender  |  haircolor
   1         josh       1           3

as you can see from this quick example this is what my table for profiles currently looks like, as the vales are filled in from select boxes.

my question is. is the bes way to then map these vales to a meaningfull value like this.

 id  |  gender
  1      male
  2      female

 id  | hairColor
  1      blonde
  2      brown
  3      black

and so on creating a new table for each attribute type? or is there a better way of doing this?