80 likes | 197 Views
CPSC 203 Introduction to Computers. Tutorial 03 & 29 By Jie (Jeff) Gao. Database Concept. A collection of information related to a particular subject or purpose Database structure: Database Tables Fields Fields have data types Should be explicitly defined, not like Excel. Records.
E N D
CPSC 203Introduction to Computers Tutorial 03 & 29 By Jie (Jeff) Gao
Database Concept • A collection of information related to a particular subject or purpose • Database structure: • Database • Tables • Fields • Fields have data types • Should be explicitly defined, not like Excel CPSC 203 Tutorials by Jie Gao
Records • Information in databases are stored as records • A “row” in a table • Containing values for each field • Databases store records without considering their orders • The unit of many operations CPSC 203 Tutorials by Jie Gao
DBMS • Database Management System • Microsoft Access is a DBMS in Office CPSC 203 Tutorials by Jie Gao
Access – Introduction • A component in Office • You need to save an Access database first (unlike other Office documents) • Objects in an Access database • Tables • Forms • Queries • Reports • … CPSC 203 Tutorials by Jie Gao
ATTENTION – WebDisk and Access • DO NOT open an Access database directly from WebDisk • Otherwise you will probably lose your data • Once this happens, you have no way to get data back. No kidding! • ALWAYS copy Access databases from WebDisk to the Desktop or “My Documents”, then open it • Remember to copy the updated database back to the WebDisk CPSC 203 Tutorials by Jie Gao
Access – Creating Tables • Use the table design view to define tables • Give names to each field, and define data types for them • Field options • Required / Index / Size / … • Primary Key • The unique identifier for a record • Save and give a table name CPSC 203 Tutorials by Jie Gao
Access – Relationships • Relationships help keep the data consistent • Different types of relationships • One-to-One • One-to-Many • Many-to-Many • Creating a relationship • Menu Tools Relationships CPSC 203 Tutorials by Jie Gao