Mach write wizard tool n degrees3/28/2023 Databases are very strict about this-and for good reason, because exercising maximum control over the classification of data is at the heart of a database’s power. Unlike with a table in a Word document, for example, with an Access table you must specify what kind of data you intend to put in each field. The trickier part is assigning a data type to each field. Field names must be unique within a table but can be reused in other tables. In table Design View, give each field a name (see “Bad Field Names,” later in this chapter). Once you have designed your tables, creating them in Access is pretty straightforward. This is a sure sign that this information belongs in a separate table ( Figure 3-4). You might be tempted to put that right into the orders table ( Figure 3-3), but the product descriptions don’t change, and you’ll find yourself entering the same descriptions again and again for each new order. Not only does this save work, but it avoids data entry errors or discrepancies that will make it difficult to maintain a database.Īn example is a product description. Instead, find a way to reuse the data that’s already been entered. Your goal in database design is to avoid entering the same data twice. Any information that you’ll be entering multiple times is “reusable” information. Put reusable information into separate tables. If, in the course of normal use, you envision your users adding new fields, something’s very wrong.) (When you’re designing tables, you have to think about how they’re going to be used. In a properly designed database, new data adds rows, not fields. This clearly indicates that you need to create a separate table just for orders. The obvious problem here is that you don’t know how many orders you’ll need to provide fields for. But what if you need to record something that repeats indefinitely, such as customer orders (including customer order numbers)? If you stored them in the customers table, you’d have to create fields such as Cust_Order1, Cust_Order2, Cust_Order3, and so on, ad infinitum. If your customer has two or more phone numbers, you should create distinct phone number fields in the customers table. Note that the address and phone numbers have been split into separate fields holding one item of information apiece. The essence of data normalization is just this: pull out repeating and reusable items and put them in their own, separate tables.įigure 3-2. A normalized customers table. Fortunately, you can leave the theoretical stuff to the experts following a few simple rules will suffice for most needs. They also make a big difference in performance as your database grows. Such well-designed tables are essential to maintaining data integrity and the long-term health of your database. The objective is to isolate data so that additions, deletions, and modifications of a field can be made in just one table and then propagated through the rest of the database via the defined relationships.” As the esteemed Webopedia ( ) pithily puts it, it involves “dividing a database into two or more tables and defining relationships between the tables. THE FIX: Normalizing basically means organizing data to reduce redundancy. Why do I need an advanced degree to create a simple contacts database? “Primary keys,” “foreign keys"…what are they talking about? And “Boyce-Codd normal form” sounds like a disease. THE ANNOYANCE: I’ve heard that I’m supposed to “normalize” my tables, but the books that discuss this are really confusing.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |