Having the following tables:
Now the editing form (Internet solution) displays the " tags " associated with the message using the Jquery Select2 control , which allows you to use multiple entries. This input field returns a list of tags .
I think the correct way to handle these entries is:
Or is it better to delete everything and then insert a new list?
What about when there are fields ( ) in the PostTag table Id, PostId, TagId, CreatedOnthat allow you to repeat entries? I believe that either of the two previous methods is correct ... and all because the select2 control only returns a list of tag tags .
Id, PostId, TagId, CreatedOn
My question refers to the same logic that is used here in stackoverflow. Questions where we need to insert tags.
What is the correct logic for using this data type?
Note: The answer I'm looking for should take into account the efficiency and impact on the database (deletion effects (table locks) / updates), I say this because it is easy to make a functional solution that sucks everything else.
. sharepoint .
:
" , :insertdelete ( , ).
" , ?"
, . , 100 .
8:00 , , . 100 101 . DML, , .. Auto ID PostTag, , 100 .
8:05 , , . 101 100 . , .
8:10 , , . 100 100 . , .
, , , . . , Stack Overflow, , Qaru , 10 000 , 10 000 10 ...
" , ". -. , .
CreateOn -, , ..
, Tag. , . PostTag FK . , (PostTag)
, .
java () "", , , . ( , ). (, ..). Post, , .
, , , DELETE.
, DELETE. - , .
, , PostTag createOn. , , ? , .
( , ) , . .
, , . , .
" Java, , / , " - "," # "," s " ..".
.