I read from the book "Introduction to the Practice of Statistics", The International Seventh Edition, page 31 that "The $\textbf{median $M$}$ is the midpoint of a distribution. Half the observations are smaller than the median and the other half are larger than the median."
But I also read from the book "Statistical Inference", second edition, international student edition, page 78 problem 2.17 that "A $\textit{median}$ of a distribution $X$ is a value $m$ such that $P(X\leq m)\geq 1/2$ and $P(X\geq m)\geq 1/2$."
Are there differences between those definitions?
For example, is the median of a given distribution necessarily a unique number in the latter definition?
Have I understood correctly that if we have a distribution with only two values, $0$ and $1$ with equal probabilities, then the median of this distribution is $\frac{1}{2}$ by the first definition and an arbitrary real number $x\in [0,1]$ in the second definition?