Presentation is loading. Please wait.

Presentation is loading. Please wait.

© Steven Alter, 2007, all rights reserved Database concepts Difference between a database and the Internet Reason for having a defined data structure Relational.

Similar presentations


Presentation on theme: "© Steven Alter, 2007, all rights reserved Database concepts Difference between a database and the Internet Reason for having a defined data structure Relational."— Presentation transcript:

1 © Steven Alter, 2007, all rights reserved Database concepts Difference between a database and the Internet Reason for having a defined data structure Relational database concepts –Table –Record, field, cell, data value, format –Key (primary key, foreign key) –Query –Form –Navigation

2 © Steven Alter, 2007, all rights reserved Table, record, field, cell, key, data value Record: Row in a table containing information for one person, place, or thing. F ield: Column in a table that contains a category of information Cell: Intersection of row and column Data value: one item of information, appearing in a cell. Key: special type of field that identifies the person, place, or thing that a particular record refers to.

3 © Steven Alter, 2007, all rights reserved Keys Primary Key is a field or combination of fields that uniquely identify each record in a table. No two records in a table can have the same value in the primary key field. Records are automatically sorted based on the primary key. Foreign key: A data field in one table that refers to a primary key in another table. –Customer ID is the primary key of the Customer Table –Customer ID is a foreign key in an order table because it refers to the customer ID in the Customer table.

4 © Steven Alter, 2007, all rights reserved Field types Text … Up to 255 characters. Characters can be letters, numbers, and other marks, including punctuation. Number …Numbers (excluding currency amounts) that can be used in calculation. Currency …Displays commas, dollar signs, and two digits to the right of the decimal point. Date/Time …utilize a variety of display format Memo … up to 64,000 characters AutoNumber …Used to automatically insert unique, sequential, or random numbers. Numbering typically begins with one. Yes/No … Yes/No, True/False, or On/Off.

5 © Steven Alter, 2007, all rights reserved Field properties Field size Format Decimal places Input mask Default value Validation rule Validation text (error message when validation rule is violated)

6 © Steven Alter, 2007, all rights reserved Operators in queries = Equal to > Greater than < Less than >= Greater than or equal to <= Less than or equal to <> Not equal to AND …. Example: >20000 and <30000 OR …. Example: San Francisco OR Los Angeles IN …. Example: IN (CA, NV, AZ, UT ….) BETWEEN …. Example: BETWEEN 21 and 65

7 © Steven Alter, 2007, all rights reserved Calculating totals for a field in a query In Design View, click on the Totals button to create a totals row in the design grid Operators for calculating totals Sum –Avg –Min –Max –Count –StDev –First –Last Can also use “group by” to calculate totals within a group

8 © Steven Alter, 2007, all rights reserved Structure of a database Multiple tables, each about a different, independent entity type (such as customer, product, order, or invoice) Relationships –One to many: One customer …. Many invoices One invoice ….. Many line items One supplier …. Many products –Many to many A student is in many sections AND a section has many students Need to create a linking table with two one to many relationship –One student has many “student-section” records –One section has many “student-section” records

9 © Steven Alter, 2007, all rights reserved Wizards Form wizard Query wizard


Download ppt "© Steven Alter, 2007, all rights reserved Database concepts Difference between a database and the Internet Reason for having a defined data structure Relational."

Similar presentations


Ads by Google