4_DB_development_method_l3_v1

  • docx
  • 09.05.2020
Публикация на сайте для учителей

Публикация педагогических разработок

Бесплатное участие. Свидетельство автора сразу.
Мгновенные 10 документов в портфолио.

Иконка файла материала 4_DB_development_method_l3_v1.docx

Chapter 1. Creating Your First Database

Although Microsoft won’t admit it, Access can be intimidating—intimidating enough to trigger a cold sweat in the most confident office worker. Even though Microsoft has spent millions of dollars making Access easier to use, most people still see it as the most complicated Office program on the block. They’re probably right.

Access seems more daunting than any other Office program because of the way that databases work. Quite simply, databases need strict rules. Other programs aren’t as obsessive. For example, you can fire up Word, and start typing a letter straight away. Or you can start Excel, and launch right into a financial report. But Access isn’t nearly as freewheeling. Before you can enter a stitch of information into an Access database, you need to create that database’s structure. And even after you’ve defined that structure, you’ll probably want to spend more time creating other useful tools, like handy search routines and friendly forms that you can use to simplify data lookup and data entry. All of this setup takes effort and a good understanding of how databases work.

In this chapter, you’ll conquer any Access resistance you have, and learn to create a simple but functional database. Along the way, you’ll get acquainted with the slick Access user interface, and you’ll learn exactly what you can store in a database. You’ll then be ready to tackle the fine art of database design, which is covered in detail throughout this book.

FREQUENTLY ASKED QUESTION: USING SOMEONE ELSE’S DATABASE

Can I use an Access database I didn’t design?

Although every database follows the same two-step process: first somebody creates it and then people fill it with information, the same person doesn’t need to perform both jobs. In fact, in the business world, different people often work separately on these two tasks.

For example, a summer student whiz-kid at a beer store may build a database for tracking orders (task #1). The sales department can then use the database to enter new orders (task #2), while other employees look up orders and fill them (also task #2). Warehouse staff can make sure stock levels are OK (again, task #2), and the resident accountant can keep an eye on total sales (task #2).

If task #1 (creating the database) is done well, task #2 (using the database) can be extremely easy. In fact, if the database is well designed, people who have little understanding of Access can still use it to enter, update, and look up information. Amazingly, they don’t even need to know they’re running Access at all!

You’ll learn more about sharing Access with groups of people in Part 6.

Understanding Access Databases

As you already know, a database is a collection of information. In Access, every database is stored in a single file. That file contains database objects, which are the components of a database.

Database objects are the main players in an Access database. Altogether, you have six different types of database objects:

o        Tables store information. Tables are the heart of any database, and you can create as many tables as you need to store different types of information. A fitness database could track your daily running log, your inventory of exercise equipment, and the number of high-protein whey milkshakes you down each day, as three separate tables.

o        Queries let you quickly perform an action on a table. Usually, this action involves retrieving a choice bit of information (like the 10 top-selling food items at Ed’s Roadside Diner or all the purchases you made in a single day). However, you can also use queries to apply changes.

o        Forms are attractive windows that you create, arrange, and colorize. Forms provide an easy way to view or change the information in a table.

o        Reports help you print some or all of the information in a table. You can choose where the information appears on the printed page, how it’s grouped and sorted, and how it’s formatted.

o        Macros are mini-programs that automate custom tasks. Macros are a simple way to get custom results without becoming a programmer.

o        Modules are files that contain Visual Basic code. You can use this code to do just about anything—from updating 10,000 records to firing off an email.

Access gurus refer to all these database ingredients as objects because you manage them all in essentially the same way. If you want to use a particular object, you add it to your database, give it a name, and then fine-tune it. Later on, you can view your objects, rename them, or delete ones you don’t want anymore.

NOTE

Designing a database is the process of adding and configuring database objects. For those keeping score, an Access database can hold up to 32,768 separate objects.

In this chapter, you’ll consider only the most fundamental type of database object: tables. But first, you need to create a blank database you can work with.

Starting a Database

When you start Access, you begin at the welcome page. From there, you’re just a few clicks away from generating a database of your very own.

In this chapter, you’ll slap together a fairly straightforward database. This example is designed to store a list of prized bobblehead dolls. (For those not in the know, a bobblehead doll is a toy figure with an oversized head on a spring, hence the signature “bobbling” motion. Bobblehead dolls usually resemble a famous celebrity, politician, athlete, or fictional character.)

TIP

You can get the Bobblehead database, and all the databases in this book, on the Missing CD page at www.missingmanuals.com/cds/access2013mm.

Here’s how to create a blank new database:

1.                  Start Access.

Access starts you out with what is, for Microsoft, a remarkably streamlined window (Figure 1-1). Here you can create a new database or open an existing one.


 

Скачано с www.znanio.ru