Jump to content

Database Question

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
7 replies to this topic

#1
Andrew.G

Andrew.G

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 395 posts
Posted via CodeCall Mobile ok this may sound stupid but I dont really 'get' databases. I know that they store different kinds of info, but how are they utilized in different programs and just in general? I feel ashamed for asking this.

#2
BlaineSch

BlaineSch

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,448 posts
No question is a bad question!

Lets say this website, it has TONS of data, right? How do you keep and maintain that? It is possible to just keep generating pages, but lets say you have a 5 page thread, and you delete a post? Should you move all the other pages posts? How would you even identify a post?

Users? if it was a page, how would you sort by post count or reputation?

What other ways can you store and access things so efficiently?

For small applications you may not need one, but a site that needs to keep using data, it is almost required. I made one decent sized application (10mb) that ran on files that it generated and included. I now see how much better it would have been in a database, no reused code etc.

#3
Andrew.G

Andrew.G

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 395 posts
Posted via CodeCall Mobile ok but how are databases implemented in programs, do they require their own IDE and you just import them into your program or what?

#4
BlaineSch

BlaineSch

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,448 posts
It depends on what programming language your using.. if it is a desktop application, if its local you can install it, but if its not local you may need to host it somewhere and give it permissions.

#5
Andrew.G

Andrew.G

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 395 posts
Posted via CodeCall Mobile still confused on how it all fits together.

#6
sdavis2702

sdavis2702

    Learning Programmer

  • Members
  • PipPipPip
  • 93 posts
Is there any way to be more specific with your questions? I know there are guys here that can answer it. It may be a little too broad of a question though.
My Name is Sean and I like codes and stuff...
NoobJunction.com | SuccessOnMyMind.com | ArmedForcesCarClub.com

#7
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Generally what happens (roughly) is the following:
You have a database with tables. Each table has columns (fields) and rows (records). You can look at Access or OpenOffice Base for simple examples.

Most applications use SQL to get information out of the database or put data into the database. (my next tutorial will have some examples of this in action.) When getting data out of a database, you can specify types of records you want, and which fields you want. You can even get data from several tables at once.

The results that the database returns to the application are then processed or otherwise worked with. This can include displaying the results in a grid, analyzing the results to insert them into another database, etc.

If you want a really good idea of what databases are about, check out this: SQL Tutorial
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#8
Andrew.G

Andrew.G

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 395 posts
Posted via CodeCall Mobile wow thanks Winged, that makes alot more sense to me.