Microsoft program databases


















Access creates a database from the template that you chose, and then opens the database. For many templates, a form is displayed in which you can begin entering data. If your template contains sample data, you can delete each record by clicking the record selector the shaded box or bar just to the left of the record , and then doing the following:.

On the Home tab, in the Records group, click Delete. To begin entering data, click in the first empty cell on the form and begin typing. Use the Navigation Pane to browse for other forms or reports that you might want to use. Some templates include a navigation form which allows you to move between the different database objects. For more information about working with templates, see the article Use a template to create an Access desktop database.

If you are not interested in using a template, you can create a database by building your own tables, forms, reports, and other database objects. In most cases, this involves one or both of the following:. Entering, pasting, or importing data into the table that is created when you create a new database, and then repeating the process with new tables that you create by using the Table command on the Create tab.

On the File tab, click New , and then click Blank Database. Type a file name in the File Name box. To change the location of the file from the default, click Browse for a location to put your database next to the File Name box , browse to the new location, and then click OK. Access creates the database with an empty table named Table1, and then opens Table1 in Datasheet view. The cursor is placed in the first empty cell in the Click to Add column.

Begin typing to add data, or you can paste data from another source, as described in the section Copy data from another source into an Access table. Entering data in Datasheet view is designed to be very similar to working in an Excel worksheet. The table structure is created while you enter data. When you add a new column to the datasheet, a new field is defined in the table. Access automatically sets each field's data type, based on the data that you enter. If you do not want to enter data in Table1 at this time, click Close.

If you made any changes to the table, Access prompts you to save the changes. Click Yes to save your changes, click No to discard them, or click Cancel to leave the table open. Tip: Access looks for a file named Blank. If it exists, Blank. Any content it contains is inherited by all new blank databases. This is a good way to distribute default content, such as part numbers or company disclaimers and policies. Important: If you close Table1 without saving it at least once, Access deletes the entire table, even if you have entered data in it.

You can add new tables to an existing database by using the commands in the Tables group on the Create tab. Create a table, starting in Datasheet view In Datasheet view, you can enter data immediately and let Access build the table structure behind the scenes. Field names are assigned numerically Field1, Field2, and so on , and Access automatically sets each field's data type, based on the data you enter.

On the Create tab, in the Tables group, click Table. Access creates the table and selects the first empty cell in the Click to Add column. If you don't see the type that you want, click More Fields.

Access displays a list of commonly used field types. Click the field type that you want, and Access adds the new field to the datasheet at the insertion point. You can move the field by dragging it. When you drag a field in a datasheet, a vertical insertion bar appears where the field will be placed.

To add data, begin typing in the first empty cell, or paste data from another source, as described in the section Copy data from another source into an Access table. You should give a meaningful name to each field, so that you can tell what it contains when you see it in the Field List pane. To move a column, click its heading to select the column, and then drag the column to the location that you want. You can also select multiple contiguous columns and then drag them to a new location all at once.

To select multiple contiguous columns, click the column header of the first column, and then, while holding down SHIFT, click the column header of the last column. Create a table, starting in Design view In Design view, you first create the table structure.

You then switch to Datasheet view to enter data, or enter data by using some other method, such as pasting, or importing. On the Create tab, in the Tables group, click Table Design. For each field in your table, type a name in the Field Name column, and then select a data type from the Data Type list. If you want, you can type a description for each field in the Description column.

The description is then displayed on the status bar when the cursor is located in that field in Datasheet view. The description is also used as the status bar text for any controls in a form or report that you create by dragging the field from the Field List pane, and for any controls that are created for that field when you use the Form Wizard or Report Wizard.

You can begin typing data in the table at any time by switching to Datasheet view and clicking in the first empty cell. You can also paste data from another source, as described in the section Copy data from another source into an Access table. Set field properties in Design view Regardless of how you created your table, it is a good idea to examine and set field properties.

While some properties are available in Datasheet view, some properties can only be set in Design view. To see a field's properties, click the field in the design grid. The properties are displayed below the design grid, under Field Properties. To see a description of each field property, click the property and read the description in the box next to the property list under Field Properties.

You can get more detailed information by clicking the Help button. For Text fields, this property sets the maximum number of characters that can be stored in the field. The maximum is For Number fields, this property sets the type of number that will be stored Long Integer, Double, and so on. For the most efficient data storage, it is recommended that you allocate the least amount of space that you think you will need for the data.

You can adjust the value upwards later, if your needs change. Privacy Statement. EZ Database. See System Requirements. Available on HoloLens. Description EZ Database allows you to quickly and easily create your own databases right from your device, with no programming or SQL knowledge required. Show More. People also like. Business plan free course - write a business plan like a professional Free.

GoFormz Mobile Forms Free. Folder Synchronizer Free. What's new in this version bug fixes. Features Quick and easy database software that anybody can use! Additional information Published by Ape Apps.

Published by Ape Apps. Copyright Ape Apps. Developed by Ape Apps. And for each record in the Products table, there can be many records in the Orders table. This type of relationship is called a many-to-many relationship because for any product, there can be many orders; and for any order, there can be many products.

Note that to detect many-to-many relationships between your tables, it is important that you consider both sides of the relationship. The subjects of the two tables — orders and products — have a many-to-many relationship. This presents a problem. To understand the problem, imagine what would happen if you tried to create the relationship between the two tables by adding the Product ID field to the Orders table.

To have more than one product per order, you need more than one record in the Orders table per order. You would be repeating order information for each row that relates to a single order — resulting in an inefficient design that could lead to inaccurate data.

You run into the same problem if you put the Order ID field in the Products table — you would have more than one record in the Products table for each product. How do you solve this problem? The answer is to create a third table, often called a junction table, that breaks down the many-to-many relationship into two one-to-many relationships.

You insert the primary key from each of the two tables into the third table. As a result, the third table records each occurrence or instance of the relationship. Each record in the Order Details table represents one line item on an order.

But together, the two fields always produce a unique value for each record. In the product sales database, the Orders table and the Products table are not related to each other directly. Instead, they are related indirectly through the Order Details table. The many-to-many relationship between orders and products is represented in the database by using two one-to-many relationships:.

The Orders table and Order Details table have a one-to-many relationship. Each order can have more than one line item, but each line item is connected to only one order. The Products table and Order Details table have a one-to-many relationship. Each product can have many line items associated with it, but each line item refers to only one product.

From the Order Details table, you can determine all of the products on a particular order. You can also determine all of the orders for a particular product. After incorporating the Order Details table, the list of tables and fields might look something like this:. Another type of relationship is the one-to-one relationship.

For instance, suppose you need to record some special supplementary product information that you will need rarely or that only applies to a few products.

Like the Products table, you use the ProductID as the primary key. The relationship between this supplemental table and the Product table is a one-to-one relationship. For each record in the Product table, there exists a single matching record in the supplemental table.

When you do identify such a relationship, both tables must share a common field. When you detect the need for a one-to-one relationship in your database, consider whether you can put the information from the two tables together in one table. If the two tables have the same subject, you can probably set up the relationship by using the same primary key in both tables. If the two tables have different subjects with different primary keys, choose one of the tables either one and insert its primary key in the other table as a foreign key.

Determining the relationships between tables helps you ensure that you have the right tables and columns. When a one-to-one or one-to-many relationship exists, the tables involved need to share a common column or columns.

When a many-to-many relationship exists, a third table is needed to represent the relationship. Once you have the tables, fields, and relationships you need, you should create and populate your tables with sample data and try working with the information: creating queries, adding new records, and so on. Doing this helps highlight potential problems — for example, you might need to add a column that you forgot to insert during your design phase, or you may have a table that you should split into two tables to remove duplication.

See if you can use the database to get the answers you want. Create rough drafts of your forms and reports and see if they show the data you expect.

Look for unnecessary duplication of data and, when you find any, alter your design to eliminate it. As you try out your initial database, you will probably discover room for improvement. Here are a few things to check for:. Did you forget any columns? If so, does the information belong in the existing tables? If it is information about something else, you may need to create another table. Create a column for every information item you need to track. Are any columns unnecessary because they can be calculated from existing fields?

If an information item can be calculated from other existing columns — a discounted price calculated from the retail price, for example — it is usually better to do just that, and avoid creating new column. Are you repeatedly entering duplicate information in one of your tables? If so, you probably need to divide the table into two tables that have a one-to-many relationship. Do you have tables with many fields, a limited number of records, and many empty fields in individual records? If so, think about redesigning the table so it has fewer fields and more records.

Has each information item been broken into its smallest useful parts? If you need to report, sort, search, or calculate on an item of information, put that item in its own column.

Does each column contain a fact about the table's subject? If a column does not contain information about the table's subject, it belongs in a different table. Are all relationships between tables represented, either by common fields or by a third table?

One-to-one and one-to- many relationships require common columns. Many-to-many relationships require a third table. Suppose that each product in the product sales database falls under a general category, such as beverages, condiments, or seafood. The Products table could include a field that shows the category of each product. Suppose that after examining and refining the design of the database, you decide to store a description of the category along with its name.

If you add a Category Description field to the Products table, you have to repeat each category description for each product that falls under the category — this is not a good solution. A better solution is to make Categories a new subject for the database to track, with its own table and its own primary key.

You can then add the primary key from the Categories table to the Products table as a foreign key. The Categories and Products tables have a one-to-many relationship: a category can include more than one product, but a product can belong to only one category.

When you review your table structures, be on the lookout for repeating groups. For example, consider a table containing the following columns:. Here, each product is a repeating group of columns that differs from the others only by adding a number to the end of the column name.

When you see columns numbered this way, you should revisit your design. Such a design has several flaws. For starters, it forces you to place an upper limit on the number of products. As soon as you exceed that limit, you must add a new group of columns to the table structure, which is a major administrative task. Another problem is that those suppliers that have fewer than the maximum number of products will waste some space, since the additional columns will be blank.

The most serious flaw with such a design is that it makes many tasks difficult to perform, such as sorting or indexing the table by product ID or name.

Whenever you see repeating groups review the design closely with an eye on splitting the table in two. In the above example it is better to use two tables, one for suppliers and one for products, linked by supplier ID.

You can apply the data normalization rules sometimes just called normalization rules as the next step in your design. You use these rules to see if your tables are structured correctly. The process of applying the rules to your database design is called normalizing the database, or just normalization.

Normalization is most useful after you have represented all of the information items and have arrived at a preliminary design. The idea is to help you ensure that you have divided your information items into the appropriate tables.

What normalization cannot do is ensure that you have all the correct data items to begin with. You apply the rules in succession, at each step ensuring that your design arrives at one of what is known as the "normal forms.

This article expands on the first three, because they are all that is required for the majority of database designs. First normal form states that at every row and column intersection in the table there, exists a single value, and never a list of values.

For example, you cannot have a field named Price in which you place more than one Price. If you think of each intersection of rows and columns as a cell, each cell can hold only one value. Second normal form requires that each non-key column be fully dependent on the entire primary key, not on just part of the key.

This rule applies when you have a primary key that consists of more than one column. For example, suppose you have a table containing the following columns, where Order ID and Product ID form the primary key:. This design violates second normal form, because Product Name is dependent on Product ID, but not on Order ID, so it is not dependent on the entire primary key. You must remove Product Name from the table. It belongs in a different table Products. Third normal form requires that not only every non-key column be dependent on the entire primary key, but that non-key columns be independent of each other.

Another way of saying this is that each non-key column must be dependent on the primary key and nothing but the primary key.

For example, suppose you have a table containing the following columns:. Assume that Discount depends on the suggested retail price SRP. This table violates third normal form because a non-key column, Discount, depends on another non-key column, SRP. Column independence means that you should be able to change any non-key column without affecting any other column.



0コメント

  • 1000 / 1000