Visual Basic Database Tutorial - Part 1, Page 2
When I first entered the geeky database scene, I shivered at the "d" word. Eugh, who wants to play around with databases? Certainly not me, I just wanted to program.
But you soon realise no matter what type of program you're creating, databases can be pretty cool things.
A database is essentially just a store of information. They usually come in the form of a simple file (just like a Microsoft Word file, say). You can shove information into this store or retrieve it from the store, with virtually no code at all.
Top Tip: You can make friends and impress the opposite sex at geeky cocktail parties by saying "DB" instead of database.
Hmm, doesn't sound terribly complex does it? Erm, thats because it's not. Most database wizards just like to overcomplicate things in a bid to scare off any programming newbies.
Now, listen up. A database may include many different tables. You can imagine a table as one worksheet in an Excel workbook.
Each column of the worksheet may hold something different. Column A, for example, could hold a customer name, column B may hold the customer postal code and column C may hold the customer telephone number.
That's all a table is a set of pre-defined "slots" or "boxes" into which you throw information. Each of those boxes has a descriptive name, such as "TelNumber".
Because we're supercool geeks, were not allowed to call those boxes err, boxes. We need to call them "fields", because it's the done thing and boosts your street-cred.
Just like an Excel worksheet, you can add new entries to the table by simply filling in a new set of fields. So each time you need to add a new customer, you just fill in the "CustomerName", "CustomerPostCode" and "CustomerTelephoneNumber" fields and Bob's your Uncle!
Actually, he is my uncle but thats totally irrelevant to the current discussion.
Top Tip: You cannot eat your dinner off a database table. This is considered highly uncool in the database world. Also, it's inadvisable to graze sheep in a table field.
OK, lets run over those wizzy terms once more:
- Database a bunch of tables
- Tables store numerous rows of information
- Fields the little boxes inside a table
A database can also contain relationships and queries. You can even have a relationship with a query, but the Church doesn't commend it. Either way, that's pretty geeky stuff so we'll cover it later.
Page 2 of 5