180 likes | 333 Views
Lab 6 – Intro To MS Access. MBAC 611. Creating A New Database. Start Microsoft Access 2010. We want to create a new database. By default Access assumes you want to create a new database. Note that i s selected by default – if not, select it with the mouse.
E N D
Lab 6 – Intro To MS Access MBAC 611
Creating A New Database Start Microsoft Access 2010. We want to create a new database. By default Access assumes you want to create a new database. Note that is selected by default – if not, select it with the mouse.
We want to make sure that your database is saved in your private network directory. Click on the icon and then select your private network folder. Enter Lab6 into the File Name textbox.
Click on the icon that appears on the right-hand side of the screen. You should now see the following Access screen:
Creating A Table When you create a new database Access creates a default table name Table1
We are going to rename and redesign Table1. Right-Click on Table1. Select
Table Description Every field has a name and data type. Note that field names should not contain a space or tab character. It is allowed in Access but may complicate SQL programming. However, the underscore character (_) is allowed – this is good to separate words.
We will rename the first field to Cust_ID. We will change the Data Type to Number. Note that the AutoNumber data type is not the same as Number. AutoNumber produces sequential numbers – for this database we will want more flexibility.
Complete the table description as described below. Note that Cust_ID has a key next to it – it is the primary key. If the key is not there you can right-click on the field and select it.
We are done defining the table. Save the table by right-clicking on the Customer tab and select . Close the table description by right-clicking on Customer and selecting
Purchase Table We need to create the Purchase Table. Click on the tab. Click on the icon. A new table – named Table1 should appear.
Complete the table field information as follows: Before saving the table we should designate a primary key. This primary key is made up of three fields Cust_ID, Item_ID and Purchase_Date. Click on Cust_ID then hold down the shift_key and select the Item_ID field and then the Purchase_Date field. Now press the icon.
Your table description should look like this: Right-Click on the Table1 tab and select When the Save As dialog-box appears enter the table name as Purchase.
Close the Purchase table by right-clicking on the Purchase tab and select We now need to create the Item table.
Item Table Create the Item Table. Below are the field descriptions. Make Item_ID the Primary Key. Save the table with the name Item. Close the table.
Exit Access Verify that everything has been saved. This is indicated when the disk-icon in the upper left hand corner is dark gray in color . To Exit select the tab and then select . You don’t need to submit this lab.