Welcome, chinareader. You'll probably get a few welcomes here in the Introduce Yourself section, but not necessarily answers to your questions.
What I suggest is splitting up your two questions and asking them in the relevant subforums here. For your first, give the
Kindle Developer's Corner (<---linky) a go, and for the second try the
Calibre (<---linky) section or its subforums. You'll probably want to read a bit there about your second question. For instance you might try the
Calibre FAQ about library structure (<---linky).
Again, welcome.
Cheers,
Marc