Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Database ISYS 263. File Concepts File consists of a group of records. Each record contains a group of fields. –Key field, grouping field,

Similar presentations


Presentation on theme: "Introduction to Database ISYS 263. File Concepts File consists of a group of records. Each record contains a group of fields. –Key field, grouping field,"— Presentation transcript:

1 Introduction to Database ISYS 263

2 File Concepts File consists of a group of records. Each record contains a group of fields. –Key field, grouping field, calculated field Example: Student file –SIDSnameMajorSexGPA –S1PeterCISM3.0 –S3PaulACCTM2.7 –S5MaryCISF3.2

3 Various Types of File Database file –Created and managed by a DBMS Spreadsheet file –Created and managed by a spreadsheet software XML file –Extensible Markup Language Comma-Delimited file – A text file that can be processed by any programming languages, DBMS and spreadsheet. –"s5","peter",3.5 –"s1","paul",3 –"s7","mary",2 Comma-Delimited file demo: stdata.txt –Access –External Data/Text File –Excel – Data/Get External Data/From Text

4 XML: Data with the Meaning of Data (User- Defined Tags) 1-34567-04-01 John Smith Peter Chen David Chao $45.00 This is a grerat book 1-34567-04-02 Adam Smith $25.00 This is a second great book

5 Database Concepts A database is a collection of related files. –Support business operations –Provide information A database management system is a software that enables users to create and maintain a database.

6 Relational Database Data is logically structured within relations. Each relation is a table (file) with named columns (attributes, fields) and rows (records). Example of relational database systems: –MS Access, MS SQL Server –Oracle, MySQL –IBM DB2 –Sysbase, Informix, etc.

7 Major Functions of Database Management Creating a database –Analysis: Entity-Relationship Diagram –Design: Design file structure –Implementation Accessing a database Updating a database

8 Introduction to MS Access

9 Creating a New Database MS Office button/New –Blank database –New database name and location

10 Access Objects Tables –Create a new table: Create/Table Design –Open a table: Double click the table name –Home/View: Datasheet view Design view Queries –Create a new query: Create/Query Design Others: Forms, Reports, Pages

11 Creating a Table Create/Table Design: –Field name –Field data type Create table by using table templates –Create/Table Templates/select template Create a primary key –Never let Access to create a primary key for you. Enter data

12 Example: Create an Employee Table Database name: HRdatabase Table name: Employee Table fields: –EmpID: Text, 10 characters –EmpName: Text, 30 characters –Sex: Text, 1 character –HireDate: DateTime field –Salary: Currency field

13 Create a new Query Create/Query design/Show table –Select fields –Add criteria Sorting Total and subtotal –Query design tools/Total –A Total row is added to the design view –Select function from the total row’s dropdown list

14 Creating a New Form Using Form Wizard –Create/Form –Create/More Forms/Form Wizard

15 Database design objectives Eliminate data duplication. –Problems with duplication: Inconsistent data double entry waste space Link related records in related tables. Example: –StudentTable: SID, Sname, Address, Major, –StudentAccountTable: SID, Sname, Address, Balance

16 Database Design Example Example: –Employee Table: EmpID, EmpName, Sex, HireDate,Salary –Department Table: DeptID, DepName, DeptPhone Assumption an employee works for one department and a department has many employees, –1. how to link an employee record to the department record the employee works for? –2. how to link a department record to all its employees? Note: A table’s key field plays an important role in linking related records.

17 MS Word’s Mail Merge with Data from a Query Mailings/Start Mail Merge/Step by Step Mail Merge Wizard Step 1: Select document type – letter Step 2: Select starting document – Use current document Step 3: Select recipients – From database/browse Step 4: Write your letter – Address book, greeting line, More item Step 5: Preview your letters Step 6: Complete the merge


Download ppt "Introduction to Database ISYS 263. File Concepts File consists of a group of records. Each record contains a group of fields. –Key field, grouping field,"

Similar presentations


Ads by Google