[A] + 跟 / 和 + [B] + 有关
跟 / 和 + [B] + 有关的 + [noun]
[A] + 跟 / 和 + [B] + 没有关系 / 无关
A 跟 B 有关 means A has to do with B. 跟 or 和 + B comes before 有关, the way a place with 在 comes before its verb.
With 的, the whole phrase describes a noun: "books about history", "news to do with the match".
有关系 is the spoken form and can take degree words: 很有关系, 有一点儿关系.
English puts "to" and the topic after "related". Here the topic sits between 跟 and 有关.
有关 + noun at the head of a phrase does exist in writing – 有关部门 "the departments concerned" – but as the predicate, 跟…有关 is the form.
有关 is not negated with 不 or 没. Use 没有关系 in speech, or 无关 in writing.