Jump to content

Recommended Posts

Posted

Trying to understans how databases work. If I create a database to use with an application on my site, I presume that information is stored in the database by application. Where is the database physically located? I presume that is on a file somewhere on my site. Is that correct?

Posted

Your databases are stored on the same server your account is on, but they are in a directory that is not accessible by you. (They are stored outside of your /home/cpanel_username directory.)

Posted

Thanks.

 

I have Gallery 2 installed on my site. I know it uses a database, but I also know that the images file (photos) reside is a file in my root. I presume therefore, that the database is not used by G2 to store the image files. Can files be stored in a database, or is it just for information that is organized and stiored in a database?

 

Thanks the help, and patience. :-)

Posted

Images can be stored in a database (in a BLOB or BINARY type field), but they usually aren't. Image data stored in a database would have to be written to a temporary file before it could be displayed in a browser because <img> tags require real file names on the server. Continually having to create and delete temporary files on the server to display images would be a lot slower than just serving the image file directly from the server. Also, storing the image data in the database would greatly increase its size for little benefit.

Posted

Thanks, David. I appreciate your patience with my newbie questuions today.

 

Just curious, what are the G2 database used for then. If this is a complicated question, I understand..."Very complicated" would suffice. :-)

 

Russ

Posted

Generally, the database is used to store 1) information about your specific Gallery installation, and 2) information about your pictures and their organization.

 

I don't currently have an installation of Gallery to look at, but I do have a Coppermine one.

 

Information about your installation would include things such as the base URL of your photo gallery, the name of your gallery, authorized users and what permissions they have to do various things, how thumbnails are generated (or if), etc. Any settings that you can configure within the application will usually be stored in the database somewhere.

 

Information about your pictures would include things such as the path and file name of the picture, the file size, the width and height, the number of times it has been viewed, its title and/or caption, which album it belongs to, comments and/or votes on the picture etc.

 

You can browse your Gallery database with phpMyAdmin and see what exactly it's keeping track of if you really want to know the details.

 

Hope this helps...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...