sql - many to many relationship mysql design -


Many users can have multiple tabs, so I designed this table

  UID (PK) User-Tab UID (FK) TabID (FK) Tab Tab IID (PK)   

But when I FK to the User-tab I got this error

  1050 - table '. \ Db \ tab @ 002duser 'already exists    

This is your DB-design or There is no problem with existing records, but there is a naming problem.

MySQL rules for naming unquoted identifiers are: use CamelCase or dash-style-writing ,

snake_case_writing

:

allowed characters (wire, not value) in uncovered identifiers:

ASCII: [0- 9, as, as $ _] (original Latin letter, digits 0-9, dollar, underscore)

extended: U + 0080. U + FFFF < / Blockquote>

Edit

Another abridgment from Docs ( Ore for reading this and me )

Naming Convention For identifiers formed by several words, separate each component with underscores rather than capitalization. Thus, use my_var instead of myvar or MyVar.

Avoid capital letters except class names; Class names should begin with a capital letter.

class items; Category Query_arena; Class log_event; Avoid function names, structure elements, or variables that start or end with '_'.

Use long function and variable name in English This will make your code easier to read for all developers.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -