Chapter 7 Database Basics

Slides:



Advertisements
Similar presentations
Chapter 1 Getting Started with Access Databases. Objectives Identify Good Database Design Create a Table and Define Fields in a New Blank Database Change.
Advertisements

Data Base. Objective Become familiar with database terminology. Create a project to display data for a single database table. Use a DataGrid control.
MS-Access XP Lesson 1. Introduction to MS-Access Database Management System Software (DBMS) Store data in databases Database is a collection of table.
With Microsoft Access 2010© 2011 Pearson Education, Inc. Publishing as Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Access.
With Microsoft ® Access 2010© 2011 Pearson Education, Inc. Publishing as Prentice Hall1 Identify Good Database Design A database is an organized collection.
 Open the Paradise.exe file  Application displays records in the Books database  Allows the store manager to enter an author’s name (or part of a name)
Exploring Microsoft Access 97 Chapter 3 Information From the Database: Reports and Queries Office graphic copyright by Microsoft Corp.
INSERT BOOK COVER 1Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Access 2010 by Robert Grauer, Keith Mast,
Exploring Microsoft Access 2003 Chapter 1 Introduction to Microsoft Access: What Is A Database?
Copyright © 2008 Pearson Prentice Hall. All rights reserved. 1 1 Committed to Shaping the Next Generation of IT Experts. Chapter 2: Relational Databases.
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
Microsoft Access Manual 1 By Dhawala Kovuri Elham S.Khorasani Ismail Guneydas.
A Guide to SQL, Seventh Edition. Objectives Understand the concepts and terminology associated with relational databases Create and run SQL commands in.
Getting Started with Microsoft Access The Access Workbench: Section One DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 4 th Edition.
Microsoft Access 2007 Microsoft Access 2007 Introduction to Database Programs.
Chapter 8 Relational Databases ActiveX Database Controls 8 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
LESSON 17 PREPARED BY MANJU. database A database is a collection of related information Access is the Microsoft Office database program that enables you.
MS Access: Database Concepts Instructor: Vicki Weidler.
1 Programming Concepts Module Code : CMV6107 Class Contact Hours: 45 hours (Lecture 15 hours) (Laboratory/Tutorial 30 hours) Module Value: 1 Textbook:
CHAPTER 9 DATABASE MANAGEMENT © Prepared By: Razif Razali.
Databases and LINQ Visual Basic 2010 How to Program 1.
Programming with Microsoft Visual Basic 2012 Chapter 13: Working with Access Databases and LINQ.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall. 1 Skills for Success with Microsoft ® Office 2007 PowerPoint Lecture to Accompany.
Copyright © 2001 by Wiley. All rights reserved. Chapter 12: Programmer- Defined Types, Direct Access Files, and Object Classes Programmer Defined Data.
Chapter 9 Designing Databases Modern Systems Analysis and Design Sixth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
1 Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall. Access Module 1 Workshop 1 The Four Main Database Objects Series Editor Amy Kinser.
Appendices A - F A-F Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
INSERT BOOK COVER 1Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Access 2010 by Robert Grauer, Keith Mast,
Copyright © 2001 by Wiley. All rights reserved. Chapter 9: Introduction to Working with Databases in Visual Basic Database Concepts Relational Database.
Copyright © 2008 Pearson Prentice Hall. All rights reserved. 11 Committed to Shaping the Next Generation of IT Experts. Chapter 10 Customizing a Database.
Exploring Microsoft Access 2003 Chapter 2 Tables and Forms: Design, Properties, Views, and Wizards.
Exploring Microsoft Access 97 Chapter 1 Introduction to Microsoft Access: What Is A Database? Office graphic copyright by Microsoft Corp.
Course ILT Access basics Unit objectives Define database and database-related terminology, and plan a database Start Access and open, create, view, and.
With Microsoft ® Access 2010© 2011 Pearson Education, Inc. Publishing as Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Access.
DAY 14: MICROSOFT ACCESS – CHAPTER 1 Madhuri Siddula October 1, 2015.
Chapter 7 Database Basics Tables, Records, and Fields 7 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Chapter Thirteen Working with Access Databases and LINQ Programming with Microsoft Visual Basic th Edition.
CSCI 3327 Visual Basic Chapter 13: Databases and LINQ UTPA – Fall 2011.
INSERT BOOK COVER 1Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Getting Started with VBA for Microsoft Office 2010 by.
Ch. 101 Database Management An Introduction to Databases.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
INSERT BOOK COVER 1Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Getting Started with VBA for Microsoft Office 2010 by.
Lesson 13 Databases Unit 2—Using the Computer. Computer Concepts BASICS - 22 Objectives Define the purpose and function of database software. Identify.
McGraw-Hill Career Education© 2008 by the McGraw-Hill Companies, Inc. All Rights Reserved. Concept 1 Database – Organized collection of related information.
CPSC 203 Introduction to Computers T97 By Jie (Jeff) Gao.
GO! with Office 2013 Volume 1 By: Shelley Gaskin, Alicia Vargas, and Carolyn McLellan Access Chapter 1 Introduction to Microsoft Access 2013.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Address Book Application Introducing Database Programming.
Database (Microsoft Access). Database A database is an organized collection of related data about a specific topic or purpose. Examples of databases include:
Microsoft Visual Basic 2010: Reloaded Fourth Edition
Visual Basic 2010 How to Program
Databases.
GO! with Microsoft Office 2016
Access Chapter 2 Querying a Database.
MIS 322 – Enterprise Business Process Analysis
GO! with Microsoft Access 2016
Chapter 6 Programming with Office 97
Chapter 4 Relational Databases
CIS 155 INTRODUCTION TO ACCESS 2002
Database Management  .
Access Lesson 1 Understanding Access Fundamentals
GO! with Microsoft® Access e
Exploring Microsoft Excel
Introduction to Access
Working With Databases
Grauer and Barber Series Microsoft Access Chapter One
Chapter 4 Enhancing the Graphical User Interface
Microsoft Access Date.
Unit J: Creating a Database
Chapter 3 Programming Fundamentals
Unit – V Data Controls.
Presentation transcript:

Chapter 7 Database Basics Chapter 1 - Introduction to Visual Basic Exploring Visual Basic 6.0 7 Chapter 7 Database Basics Tables, Records, and Fields By Carlotta Eaton Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. Copyright 1999 Prentice-Hall, Inc.

Copyright 1999 Prentice-Hall, Inc. Objectives 1. Explain the differences between a flat-file database and a relational database. 2. Explain the basic terminology for databases such as table, record and field. 3. Implement a flat-file database using random access. 4. Explain the use of the Microsoft FlexGril control. Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Copyright 1999 Prentice-Hall, Inc. Database Concepts... Database - collection of data for a particular purpose that is stored and later retrieved Flat-file database - database that is stored in a single table Relational database - database that is stored in multiple tables and cross-referenced Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Copyright 1999 Prentice-Hall, Inc. Database Concepts Field - the smallest unit of data (or fact) in a database Record - consists of several fields; stores data about a single entity in a database such as a client, product, student Table - represents data where each row represents a record, and each column represents a field Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Copyright 1999 Prentice-Hall, Inc. The Type statement... Create records by defining a new data type Use the Type statement to define and create a new data type Example: Type Person Firstname As String * 25 Lastname As String * 50 Birthdate As String * 35 City As String * 25 State As String * 2 End Type Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Copyright 1999 Prentice-Hall, Inc. The Type statement Type variablename elementname1 As datatype elementname2 As datatype... End Type Where variablename is a programmer-named variable elementname is a programmer-named element (or field) contained within the new type datatype is a Visual Basic data type such as Integer, Currency, String etc. Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Declaring a New Data Type Public variablename As Typename Where variablename is a programmer named variable typename is a programmer named data type as defined with a type statement Example: Public CurrentRecord As Person Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Copyright 1999 Prentice-Hall, Inc. Birthday Database Create a flat-file database. Store the records in binary file format, and use random access. Notice the 7 fields in the displayed record. Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Copyright 1999 Prentice-Hall, Inc. Birthday Database Hands-On Exercise 1 Create a new project Set properties and add code for the Splash form Add code and test the module Create the Main form Add record declarations and code to the module Add more code and test the start procedure Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Navigating the Database... Variables in the Birthday database CurrentRecord - stores current record data NewRecord - flag that indicates if the record needs to be written to the database file RecordNumber - the number of the current record MaxNumber - the number of records in the database OldRecordNumber - previous record number displayed in form Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Navigating the Database... Procedures in the Birthday Database Main - opens the database file, and displays the Splash form Start - displays the Main form AddRecord - adds a new record DeleteRecord - deletes a record SaveRecord - writes a record to the file DisplayRecord - reads a record and displays it in the Main form ExitApplication - closes file, unloads form, exits Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Navigating the Database lblNumber cmdPrevious cmdNext cmdFirst cmdLast Move First Move Last Move Previous Caption Move Next Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Continue the Birthday Database Hands-On Exercise 2 Add code for AddRecord, DisplayRecord, SaveRecord, and ExitApplication procedures Add code to load & unload the Main form Add code for Add and Save Record buttons Test Start procedure and code for a new database Add first and last record and exit Add code and test first, last, next and previous buttons Test navigation buttons Test and add more records Exit the application Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

The Microsoft FlexGrid Control Specially designed to display tables or grids of data Use to sort, merge, and format tables Add to Toolbox first Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Copyright 1999 Prentice-Hall, Inc. FlexGrid Properties FlexGrid control has over 100 different properties Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Finish the Birthday Database Hands-On Exercise 3 Add code and test Cancel button Add code and test Delete button Create, add code and test the List form Add code for the GridHeadings and GridCells procedures Test the FlexGrid control Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Copyright 1999 Prentice-Hall, Inc. Summary ... A database is a collection of data A table consists of rows (records) and columns (field) A field is the smallest unit of data A record is composed of several fields and stores data about a single entity A flat-file database consists of a single table Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Copyright 1999 Prentice-Hall, Inc. Summary Use the Type statement to create your own data types The Microsoft FlexGrid control is designed to display tables or grids of data The Birthday database demonstrates a simple flat-file database application has shortcomings that can be overcome by adding more code such as searching and handling deleted records Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Practice with Visual Basic 1. WindChill Table 2. Personal Address Book 3. Practice with Access 4. Birthday Deletion Improvement Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Copyright 1999 Prentice-Hall, Inc. Case Studies Database Mystery Beginning Database Design Flat-file Database FlexGrid Case Study Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.