What we’ve learnt Doc 5.69 Doc 5.70 Section 1-3. A simple database Related objects Tables hold the...

9
What we’ve learnt Doc 5.69 Doc 5.70 Section 1-3

Transcript of What we’ve learnt Doc 5.69 Doc 5.70 Section 1-3. A simple database Related objects Tables hold the...

Page 1: What we’ve learnt Doc 5.69 Doc 5.70 Section 1-3. A simple database Related objects Tables hold the data Forms, reports, queries to access the data.

What we’ve learnt

Doc 5.69

Doc 5.70 Section 1-3

Page 2: What we’ve learnt Doc 5.69 Doc 5.70 Section 1-3. A simple database Related objects Tables hold the data Forms, reports, queries to access the data.

A simple database

• Related objects

• Tables hold the data

• Forms, reports, queries to access the data

Page 3: What we’ve learnt Doc 5.69 Doc 5.70 Section 1-3. A simple database Related objects Tables hold the data Forms, reports, queries to access the data.

Database FADS

• Create FADS

• Create object in FADS, e.g Owners table, Ownersphone query

• Don’t need to create a new database for each new object

• Database FADS is container for objects

Page 4: What we’ve learnt Doc 5.69 Doc 5.70 Section 1-3. A simple database Related objects Tables hold the data Forms, reports, queries to access the data.

Wizards can help

• Tables for standard components e.g customers

• You can customise the standard components

• Report wizard generates reports

• Form Wizard generates forms

Page 5: What we’ve learnt Doc 5.69 Doc 5.70 Section 1-3. A simple database Related objects Tables hold the data Forms, reports, queries to access the data.

About tables

• Tell you about things (entities)• Entities have characteristics (attributes) such

as names, addresses, ages• Attributes are represented by fields in the

table• Fields have data type - e.g number, dates.• Access 97 provides default types, sizes - you

can change them.

Page 6: What we’ve learnt Doc 5.69 Doc 5.70 Section 1-3. A simple database Related objects Tables hold the data Forms, reports, queries to access the data.

Keys

• Data in the table is held in records

• Each record must have a unique identifier - Primary Key

• Relationships between tables are represented by Foreign Keys

• e.g Cats table has a field Ownerid

• Ownerid is the primary key (unique identifier) of the owner in the Owners table.

Page 7: What we’ve learnt Doc 5.69 Doc 5.70 Section 1-3. A simple database Related objects Tables hold the data Forms, reports, queries to access the data.

Data Model Diagram

Cats Owners

Bookings

Page 8: What we’ve learnt Doc 5.69 Doc 5.70 Section 1-3. A simple database Related objects Tables hold the data Forms, reports, queries to access the data.

Queries that join tables

• Need data about Owners and Cats

• Vacbooster is a query that joins data from two tables

• Temporary data - called a dynaset

• Doesn’t change the data in the tables

Page 9: What we’ve learnt Doc 5.69 Doc 5.70 Section 1-3. A simple database Related objects Tables hold the data Forms, reports, queries to access the data.

Joining Tables

• Relationships allow you to combine data about more than one thing.

• E.g Cats and Owners, Students and staff, Suppliers and products.

• Owners/Cats relationship is Each Owner can own one or more cats

• One to Many relationship

• Must include the unique identifier of the one as foreign key in many