I am going to install a database into /usr/share/ but my partition there does not have enough diskspace... Can I install the database at other partition and then assign the address to direct to it? What command should I used for?
What database are you installing.
ln -sv /real/directory /dir/to/link/to
So if you want to have /usr/share/database on your /home partition, you'd do:
sudo mkdir /home/database
sudo ln -sv /home/database /usr/share/database
(sudo for if you have sudo installed, otherwise run the commands without sudo as root)
That creates a symbolic (s) link (ln) verbosely (v) at /usr/share/database, which is really just a pointer to the directory /home/database. In this way you can store directories on a different partition and make them appear elsewhere. I wouldn't use this too much though, if you can help it. Note that the new directory is owned by root. If the default location is /usr/share, you should probably keep it this way but if you must own it yourself you can always remove the sudo from the mkdir command and replace /home with ~ to make it appear in your home directory. Chances are everything will come out owned by root anyway though, so perhaps that's not such a bright idea.