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

Slides:



Advertisements
Similar presentations
Using a database to organize information
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.
Computer Concepts BASICS 4th Edition
 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,
BIM211 – Visual Programming Database Operations 1.
Exploring Microsoft Access 2003 Chapter 6 Many-to-Many Relationships: A More Complex System.
Exploring Microsoft Access 2003 Chapter 1 Introduction to Microsoft Access: What Is A Database?
Chapter 3 Programming Fundamentals Writing Code 3 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
VBA Modules, Functions, Variables, and Constants
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.
MENUS AND THE MENU EDITOR Elements of a Menu Menu bar Menu title Separator bar Menu items.
Chapter 14: Advanced Topics: DBMS, SQL, and ASP.NET
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.
Exploring Microsoft Excel 2002 Chapter 8 Chapter 8 Automating Repetitive Tasks: Macros and Visual Basic for Applications By Robert T. Grauer Maryann Barber.
MS Access: Database Concepts Instructor: Vicki Weidler.
From VS C# 2010 Programming, John Allwork 1 VS2010 C# Programming - DB intro 1 Topics – Database Relational - linked tables SQL ADO.NET objects Referencing.
CHAPTER 9 DATABASE MANAGEMENT © Prepared By: Razif Razali.
Unit J: Creating a Database Microsoft Office Illustrated Fundamentals.
Databases and LINQ Visual Basic 2010 How to Program 1.
Programming with Microsoft Visual Basic 2012 Chapter 13: Working with Access Databases and LINQ.
Chapter 3 Programming Fundamentals Writing Code 3 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Copyright © 2001 by Wiley. All rights reserved. Chapter 12: Programmer- Defined Types, Direct Access Files, and Object Classes Programmer Defined Data.
Appendices A - F A-F Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Exploring Office Grauer and Barber 1 Introduction to Access: What is a Database?(Wk1)
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter Twelve Access Databases and LINQ.
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.
Exploring Microsoft Access 2003 Chapter 2 Tables and Forms: Design, Properties, Views, and Wizards.
Programming with Microsoft Visual Basic 2008 Fourth Edition Chapter Thirteen Working with Access Databases and LINQ.
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.
1 By: Nour Hilal. Microsoft Access is a database software where data is stored in one or more Tables. A Database is a group of related Tables. Access.
Key Applications Module Lesson 21 — Access Essentials
WaveMaker Visual AJAX Studio 4.0 Training Basics: Building Your First Application Binding Basics.
DAY 14: MICROSOFT ACCESS – CHAPTER 1 Madhuri Siddula October 1, 2015.
1 Committed to Shaping the Next Generation of IT Experts. Chapter 1- Introduction to Access: What is a Database? Robert Grauer and Maryann Barber Exploring.
Course ILT Forms and queries Unit objectives Create forms by using AutoForm and the Form Wizard, and add or modify form headers and footers Open and enter.
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.
SQL Jan 20,2014. DBMS Stores data as records, tables etc. Accepts data and stores that data for later use Uses query languages for searching, sorting,
INSERT BOOK COVER 1Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Getting Started with VBA for Microsoft Office 2010 by.
Microsoft Access is a database program to manage sort retrieve group filter for certain records.
Ch. 101 Database Management An Introduction to Databases.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
Microsoft FrontPage 2003 Illustrated Complete Integrating a Database with a Web Site.
Lesson 13 Databases Unit 2—Using the Computer. Computer Concepts BASICS - 22 Objectives Define the purpose and function of database software. Identify.
Chapter 24 I’m Suffering from Information Overload (Access Databases) Clearly Visual Basic: Programming with Visual Basic nd Edition.
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.
LINQ to DATABASE-2.  Creating the BooksDataContext  The code combines data from the three tables in the Books database and displays the relationships.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Address Book Application Introducing Database Programming.
10.1Retrieving a Database File – In the last chapter, we have created a database file and several tables for that database. – In order to view and modify.
ACCESS CHAPTER 2 Introduction to ACCESS Learning Objectives: Understand ACCESS icons. Use ACCESS objects, including tables, queries, forms, and reports.
Database (Microsoft Access). Database A database is an organized collection of related data about a specific topic or purpose. Examples of databases include:
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Programming with Microsoft Visual Basic 2012 Chapter 13: Working with Access Databases and LINQ.
Visual Basic 2010 How to Program
Databases.
Chapter 6 Programming with Office 97
Introduction to Access
Working With Databases
Chapter 3 Programming Fundamentals
Chapter 7 Database Basics
Presentation transcript:

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

Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.2 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.3 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.4 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.5 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.6 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.7 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.8 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.9 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.10 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.11 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.12 Navigating the Database Move Last Move Next Caption Move Previous Move First cmdLast cmdNext lblNumber cmdPrevious cmdFirst

Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.13 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.14 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.15 FlexGrid Properties FlexGrid control has over 100 different properties

Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.16 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.17 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.18 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.19 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.20 Case Studies  Database Mystery  Beginning Database Design  Flat-file Database  FlexGrid Case Study