I'm new to database design, please give me advice about this.
1 When should I use a composite index?
im not sure what does index does, but i do know we should put it when it will be heavly loaded like for WHERE verified = 1 and in search like company.name = something. am i right ?
2 MySQL indexes - how many are enough?
is it just enough ?
is it just right?
Thanks.
edit*
rules.
- each users( company member or owners ) could be a member of a company
- each company have some member of users.
- there are company admins ( ceo, admins) and there are company members ( inserts the products )
- each company can have products.
for the number 3 i will add a bit at users_company - 1 is for admin - 0 is for members