Вы находитесь на странице: 1из 1

Description of Normalization Normalization is the process of organizing data in a database.

This includes creating tables and establishing relationships between those tables according to rules designed both to protect the data and to make the database more flexible by eliminating redundancy and inconsistent dependency. First Normal Form Eliminate repeating groups in individual tables. Create a separate table for each set of related data. Identify each set of related data with a primary key. Do not use multiple fields in a single table to store similar data. For example, to track an inventory item that may come from two possible sources, an inventory record may contain fields for Vendor Code 1 and Vendor Code 2. What happens when you add a third vendor? Adding a field is not the answer; it requires program and table modifications and does not smoothly accommodate a dynamic number of vendors. Instead, place all vendor information in a separate table called Vendors, then link inventory to vendors with an item number key, or vendors to inventory with a vendor code key. Second Normal Form Create separate tables for sets of values that apply to multiple records. Relate these tables with a foreign key. Records should not depend on anything other than a table's primary key (a compound key, if necessary). For example, consider a customer's address in an accounting system. The address is needed by the Customers table, but also by the Orders, Shipping, Invoices, Accounts Receivable, and Collections tables. Instead of storing the customer's address as a separate entry in each of these tables, store it in one place, either in the Customers table or in a separate Addresses table. Third Normal Form Eliminate fields that do not depend on the key. Values in a record that are not part of that record's key do not belong in the table. In general, any time the contents of a group of fields may apply to more than a single record in the table, consider placing those fields in a separate table. For example, in an Employee Recruitment table, a candidate's university name and address may be included. But you need a complete list of universities for group mailings. If university information is stored in the Candidates table, there is no way to list universities with no current candidates. Create a separate Universities table and link it to the Candidates table with a university code key. Other Normalization Forms Fourth normal form, also called Boyce Codd Normal Form (BCNF), and fifth normal form do exist, but are rarely considered in practical design. Disregarding these rules may result in less than perfect database design, but should not affect functionality. ------------------------------------------------------------------------------------------------------------Macro A macro is an (automatic) action that must be performed on an object of a database. An example would consist of saving something when a key is pressed on the keyboard. Another example would consist of printing something when an object is clicked. Microsoft Access provides an easy and visual mechanism to create and manage macros. To create a macro in Microsoft Access, you can use an intuitive dialog box that allows you to select the action to be performed and the options the action needs. In reality, when you create a macro, Microsoft Access creates a type of script that contains names, expressions, and operations for the action, sparing the details. Still, if you know what is necessary for the macro, you can "manually" create it. To create a macro, on the Ribbon, click Create. In the Marros & Code section, click the Macro button . Two windows would display and they are separated by a split bar. To give more room to one of the window, position the mouse between them, click and drag in the desired direction. The left window presents a tab or a title bar labeled Macro1. By default, that window displays a combo box. The right window displays buttons with +. This means that they are nodes. To expand a node, click its + button. When you do, the node would display its items. The Program Flow node allows you to create a condition. The Actions node holds most of the actions you will create for your macros. If if expand it, you will see that it organizes its actions in categories, each represented by a node. To access the actual action you want, expand its node. This would display the actions in that category. To create a macro from the left window, click the arrow of the combo box to display the avilable actions. If you see the action you want, you can click it. The left window would display the objects (controls) needed for the options of the action you selected. The objects in that window depend on the action you selected. To create an action using the right window, expand the node(s). Many names of actions are explicit or can be infered logically. Otherwise, you can click an action. The bottom section would show a description of the action. If you see the action you want, click and drag it to the left window. In both cases, if you selected an action you don't want anymore, you can click the Delete button.