4
CSC408 Management Information System Inserting Data & Relationship Insert data into tables with graphical design facilities in Access DBMS 1. Datasheet view is used to insert, edit, delete or modify data in a table. To open the datasheet view, simply double-click a table, and then the table datasheet view will appear. 1. Insert your each table with the appropriate data as shown below: Data for table biscuit Data for table customer Data for table order SNI2012 Page 1 Attachement: Any supported file to be attach. We will use images of biscuit for biscuitDB. Click the attachment icon in order to

CSC408 Management Information System Inserting Data ... Web viewClick the relation icon, ... select custID from table customer, ... CSC408 Management Information System Inserting Data

  • Upload
    buinhan

  • View
    224

  • Download
    0

Embed Size (px)

Citation preview

Page 1: CSC408 Management Information System Inserting Data ... Web viewClick the relation icon, ... select custID from table customer, ... CSC408 Management Information System Inserting Data

CSC408 Management Information System Inserting Data & Relationship

Insert data into tables with graphical design facilities in Access DBMS

1. Datasheet view is used to insert, edit, delete or modify data in a table. To open the datasheet view, simply double-click a table, and then the table datasheet view will appear.

1. Insert your each table with the appropriate data as shown below:

Data for table biscuit

Data for table customer

Data for table order

*make sure the value of foreign keys in table order matches the value of primary keys of their respective tables.

SNI2012 Page 1

Attachement: Any supported file to be attach.

We will use images of biscuit for biscuitDB. Click the attachment icon in order to attach a file.

Page 2: CSC408 Management Information System Inserting Data ... Web viewClick the relation icon, ... select custID from table customer, ... CSC408 Management Information System Inserting Data

CSC408 Management Information System Inserting Data & Relationship

Creating relationships between tables with graphical design facilities in Access DBMS

1. Click the relation icon, then a relationship dialog box will appear.2. Right click the relationship dialog box, and then select Show table in order to view and select your

entire table object in the database.

3. Show table dialog box will appear. Add all the tables by selecting the table name, and then click button add.

4. Now all the tables will appear in the relationship dialog box.

5. In order to define relationship between table (for table customer and table order), select custID from table customer, then drag it to custID in table order. A line will appear between both of the table. This line indicates the relationship between table customer and table order.

SNI2012 Page 2

Relationship: Define how the data in tables is related, such as ID fields or name fields in different tables that should match.

Page 3: CSC408 Management Information System Inserting Data ... Web viewClick the relation icon, ... select custID from table customer, ... CSC408 Management Information System Inserting Data

CSC408 Management Information System Inserting Data & Relationship

6. Do the same processes for table order and table biscuit by joining the same attributes name.

7. Save your relationship diagram.

Understanding Types of Relationships

Access 2007 allows for several different types of relationships. These include: One to One (1:1) One to Many (1:m) Many to Many (m:n)

The relationship type you will come across most frequently, and the one created in our biscuit databse scenario, is the One to Many relationship.

One to Many

The One to Many relationship means that data for that field will show up a single time in one table, but many times in the related table.

SNI2012 Page 3

Dialog Box Edit Relationship

select the same attributes name between two tables

make sure you click the Enforce Referential Integrity check list in order to show the connectivity of the relationship

Selected tablesSelected fields

1m