Understanding the definition of a directed family of subsets

I would like some help understanding this definition:

Definition. A directed family of subsets of a set $S$ is a family $(D_i)_{i\in I}$ of subsets of $S$ such that, for every $i$,$j$ $\in I$ there is some $k \in I$ such that $D_i \subseteq D_k$ and $D_j\subseteq D_k$.

Taken from from Grillet's Abstract Algebra

First of all, what is $I$ to which $i$ and $j$ belong? I get that if we have the subsets $A_1, A_2, A_3$ then $I = \{ 1,2,3 \}$ but I can't find any formal definition in the text. I don't get it in the more general form above.

Secondly, why do we use both $i$ and $j$ from $I$? Isn't it enough to say that for every $i$, we have a $k$ such that $D_i \subseteq D_k$? I'm trying to understand this as some kind of chain. What is the meaning of using both $i$ and $j$? If we have $D_i \subseteq D_k$ and $D_j\subseteq D_k$ does it say anything about how $D_i$ relate to $D_j$?

(and exactly what does $(D_i)_{i\in I}$ mean in terms of notation?)

Could someone perhaps clarify this a bit for me. I'm rather confused as you might notice. Any help would be highly appreciated.

-

1. Usually, $I$ denotes a general index set. It may be finite (like in your example), countably infinite (then often $\Bbb{N}$ is used) or even uncountably infinite.
2. Two indices are used, because you don't necessarily have one chain, like you mentioned. Take for example the sets $A = \{1,2\}$ and $B=\{3,4\}$. You can't compare them directly with $\subseteq$, but you have a bigger set, let's say $C = \{1,2,3,4,5\}$, that contains both of them.
3. $(D_i)_{i\in I}$ denotes a family of sets, these are indexed by the set $I$.
-
You can think of $I$ as an index set. As you have mentioned if $I = \{ 1,2,3\}$ then $I \subset \mathbb{N}$. Now it is not necessary that $I$ is finite. It may be $I$ is infinite, possibly uncountable. This brings us to the second part of your question.
Secondly, why do we use both i and j from I? Isn't it enough to say that for every i, we have a k such that $D_i⊆D_k$? I'm trying to understand this as some kind of chain. What is the meaning of using both i and j? If we have $D_i \subseteq D_k$ and $D_j \subseteq D_k$ does it say anything about how Di relate to Dj?
You can think of $I$ in a more general setting where $I$ is partially ordered. If a set is partially ordered then it is possible the two elements are not comparable. For example, Let $I = \{Y,U,V\}$ such that $U \subset Y$ and $V \subset Y\setminus U$. If we define the ordering of the set by reverse inclusion, ie. $Y \leq U$ if $U \subset Y$. Then $Y \leq U$ and $Y \leq V$ but we cannot say $U \leq V$ or $V \leq U$. So, they are "incomparable" according to the "rules" we have used to define the index set.
(and exactly what does $(D_i)_{i \in I}$ mean in terms of notation?)
Now imagine that you have set $D$ and you would like to index elements of $D$. When the number of elements in your sequence becomes very large it is quiet cumbersome to write them out. Assuming the you are indexing over natural numbers, $(D_i)_{i \in \mathbb{N}}$ is a short hand notation of saying all elements of $\{D_1,\ldots D_i,D_{i+i},\ldots\}$ From the example above, if we set the index set of $D$ as $I$, a possible sequence could be $D_y,D_u$ as $y \leq u$.