Best way to prepare files with openings for future use I am looking for advice how to prepare opening, so i could easily skim over it after a while. Create databases for every opening with analyzed games? But some positions can occur after different openings. Create artificial games per opening with lots of variation and store in one database? Should i add notes?

I am limited to SCID and Chessx because i use Linux. But general ideas a highly welcomed too.
Here I will describe the usual and probably best way of preparing an opening repertoire.

Black

The usual way to prepare an opening repertoire with black is:


Depending on your style of play, skim through several games with different openings that suit your style of play and choose one (opening) for every starting move.
Starting with the most played (usually 1.e4) have a general look at the main line and a couple of important sidelines of your preferred defense. Choose a line that you like and feel comfortable with the position. Bear in mind that whenever black can deviate, you may only choose one deviation to begin with, but whenever white can deviate you must have a look at all (or at least most of) the deviations.
Build up an personalized file with your choice of opening repertoire. This should include the line you have chosen, the possible deviations for white and your answers. When theory ends, you should add a sample game (or even two if possible) with a relevant idea or position on said subline. Concerning the notes, if you find an annotated game (the annotator having a good level, preferably GM and that the game was his) on your pet line (or even if it's not your pet line) with relevant commentaries, it is surely a good idea to include it in your repertoire.
This is not always strictly necessary since most people only play for fun, but in general it is useful to check (now or when choosing the lines you want to play) that your repertoire is sound, or at least playable.
Repeat 2. and 3. for the rest of the opening moves.


Example

Despite the huge variety of opening moves, you may choose intelligently your opening repertoire so that you only have to prepare a couple of main defenses and get away with playing similar positions with different move openings. The main opening moves are 1.e4 and 1.d4.

I am a tactical player, so against 1.e4 I will play the Sicilian Dragon. Against every possible attack by white (Smith-Morra, Classical variation, Yugoslav attack, Russian system and so on) I will prepare the main line in almost all of them, since it is more probable that the'll play into may preparation that way. Particularly, on the Yugoslav attack I will play the Chinese Dragon (Rb8 instead of Rc8 at some point). I will play Be6 aginst the Classical variation. I will play e6 and Nge7 against the Closed Sicilian and so on. I will prepare a file on this defense.

Following this same tactical ideas, and because it also is a fianchetto defense (and I am used to having my bishop on g7 because of my main defense against 1.e4) I will play the Grunfeld defense against 1.d4. The main attacks are (of the Exchange Variation) Bc4, Be3, Nf3 and Rb1, Qc3 and others, and againts all of them I will choose a more positional setup (Bg7, c5, Nc6, Bd7 and b6 on the main line, and the ideas are similar on the rest), as the opening is already quite tactical to need to memorize hundreds of forced lines. I won't lack of tactical opportunities. I will prepare another file on this defense.

Now, because of my opening choice, against 1.c4 I can use a Sicilian Dragon setup (the symmetrical English), so I won't have to choose another defense. Moreover, against 1.Nf3 I can also play 1... c5 and enter similar positions to the ones I know. This means that my whole repertoire is reduced to "only" two defenses.

White

The usual way to prepare an opening repertoire with white is:


Depending on your style of play, choose an opening move. The general guidelines for this are that 1.e4 is for tactical players, 1.d4 and 1.c4 are for positional players. This however highly depends on the position the defender chooses. Other opening moves are, in general, not as good as those three.
Make a list of the main defenses to the opening move you have chosen.
Starting with the most commonly played, have a general look at the main line and a couple of important sidelines. Choose a line that you like and feel comfortable with the position. Bear in mind that whenever white can deviate, you may only choose one deviation to begin with, but whenever black can deviate you must have a look at all (or at least most of) the deviations. This is the exact opposite that happened with your repertoire with black.
Same as 3. before, build up a repertoire file. The same comment on 4. applies, soundness of the lines are generally good advice.
Repeat 3. and 4. on this list for every other defense you may face, going through the list starting with the more common.


Example

As I am a tactical player, I will open the game with 1.e4. The main defenses I will face are: Sicilians, e5 answers, French, Caro-Kann, Pirc and Scandinavian.

Every one of them has his own body of theory, but I will choose the open Sicilian (trying to play more or less main lines against all the Sicilians), the Yugoslav attack against the Dragon, the Richter-Rauzer attack against the Classical, the English attack against the Najdorf and Scheveningen and so on. I will also play the Scotch against 1... e5 since it's a very tactical opening. I will play the Tarrasch Nf4 against the French, which is a very wild line. The Caveman attack against the Caro-Kann (from the Advance variation, an early h4), the Hungarian attack against the Pirc and the main line against the Scandinavian will be the rest of my repertoire.

Of course, this has to be well researched and saved in a file.

Conclusion

This task should not be extremely difficult, but it will be long. I suggest you take a look at this video, as his main purpose is to teach how to use SCID to develop an opening repertoire. Choose wisely, as good choices will serve you well for the rest of your chess life, whereas poor ones will have to be changed over and over.