Why are Databases Better than Files? Multiple users can all use the same database, and have access to the current, up to the minute values for the data.

Slides:



Advertisements
Similar presentations
DATABASE RC D DD CMA C M R B PK E I S H S RC H L I V FK.
Advertisements

Data Base. Objective Become familiar with database terminology. Create a project to display data for a single database table. Use a DataGrid control.
Chapter 10 Database Applications Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
Obtain Data from Other Sources Data you need to include in an Access database often already exists in another file: in another Access database, in a table.
 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)
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making.
Creating Custom Forms. 2 Design and create a custom form You can create a custom form by modifying an existing form or creating a new form. Either way,
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Introduction to Databases CIS 5.2. Where would you find info about yourself stored in a computer? College Physician’s office Library Grocery Store Dentist’s.
Concepts of Database Management Sixth Edition
Databases and Database Management Systems
Enter here. Enter your User Id and click on Go.
Databases Ms. Scales. What is a Database? Database  A collection of data organized for fast search and retrieval  Examples: Telephone Directories Hospital.
2013.  Reconcile your checking account  Create bank reconciliation reports  Find errors during reconciliation  Correct errors found during reconciliation.
Databases & Data Warehouses Chapter 3 Database Processing.
Quick Start Guide: Filters Advanced Learn about: 1.What filters are and their functionality 2.How to create a filter using Samples, Equipment & Labels.
Some Basic Database Terminology
Unit J: Creating a Database Microsoft Office Illustrated Fundamentals.
Copyright © 2001 by Wiley. All rights reserved. Chapter 10: Advanced Database Operations Revising Vintage Videos Setting RecordSource at run time DBGrid.
DAY 15: ACCESS CHAPTER 2 Larry Reaves October 7,
Interacting with Databases Chapter 10. VB and Databases u It is often useful to have a VB program access data stored in a file other than a text file.
10-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
Navigating database with windows forms.. Tiered applications  Provide a means to develop many presentations of the same app  Makes changes to the back.
McGraw-Hill/Irwin Programming in Visual Basic 6.0 © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Update Edition Chapter 11 Accessing Database.
Eurotrace Hands-On The Eurotrace File System. 2 The Eurotrace file system Under MS ACCESS EUROTRACE generates several different files when you create.
**Database Notes** New Unit Plan Microsoft Access - known as a database management system or DBMS Database – a collection of organized information. Can.
Nasca Access BasicsMore Access Access Again Access Continued Access Leftovers.
Copyright © 2001 by Wiley. All rights reserved. Chapter 9: Introduction to Working with Databases in Visual Basic Database Concepts Relational Database.
Hello We are looking for a coder to code the following We have a network that has different sites: we need an application that will scan the network and.
Discovering Computers Fundamentals Fifth Edition Chapter 9 Database Management.
MS Access 2007 Management Information Systems 1. Overview 2  What is MS Access?  Access Terminology  Access Window  Database Window  Create New Database.
Datafaces Data Base Management Software (DBMS) is a tool used to transform Data into Information. What is Data…? What is Information…? What is a Database…?
Microsoft Office 2007 Access Chapter 3 Maintaining a Database.
Access Project 3 Notes. Introduction Maintaining the Database  Modifying the data to keep it up-to-date Restructure the Database  To change the database.
Chapter 4c, Database H Definition H Structure H Parts H Types.
INFORMATION MANAGEMENT Unit 2 SO 4 Explain the advantages of using a database approach compared to using traditional file processing; Advantages including.
INFO1408 Database Design Concepts Week 15: Introduction to Database Management Systems.
Windows Forms Navigating database with windows forms.
DAY 14: MICROSOFT ACCESS – CHAPTER 1 Madhuri Siddula October 1, 2015.
Tutorial 91 Databases A database is an organized collection of related information stored in a file on a disk A database allows companies to store information.
Maintaining a Database Access Project 3. 2 What is Database Maintenance ?  Maintaining a database means modifying the data to keep it up-to-date. This.
Access Forms and Queries. Entering Data in Your Table  You can add data to your table in Datasheet view, by typing in the columns and rows.  This.
Database revision.
DBT544. DB2/400 Advanced Features Level Check Considerations Database Constraints File Overrides Object and Record Locks Trigger Programs.
TRAINING SESSIONS.NET Controls.  Standard Controls  Label  Textbox  Checkbox  Button, Image Button, Image control  Radio Button  Literal  Hyperlink.
1 Lesson 18 Managing and Reporting Database Information Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
Labcheck Next Generation Quick Start Guide Filters.
Lesson 13 Databases Unit 2—Using the Computer. Computer Concepts BASICS - 22 Objectives Define the purpose and function of database software. Identify.
Chapter 10 Database Management. Data and Information How are data and information related? p Fig Next processing data stored on disk Step.
CPSC 203 Introduction to Computers T97 By Jie (Jeff) Gao.
1 Research Papers Database. 2 Form – Add – Delete – Change … information in the database.
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.
Using a Database Access97 Please use speaker notes for additional information!
Database Relationships Objective 5.01 Understand database tables used in business.
Access Queries and Forms. Adding a New Field  To insert a field after you have saved your table, open Access, and open the table  It is easier to add.
Access Test Questions Test Date: 05/05/16. Chapter 1 (Lynda.com) Question 1 An access database uses five main components (database objects). Which is.
VOCAB REVIEW. A field that can be computed from other fields Calculated field Click for the answer Next Question.
CSCI-235 Micro-Computers in Science Databases. Database Concepts Data is any unorganized text, graphics, sounds, or videos A database is a collection.
Reports. Reports display information retrieved from a database in an attractive printed format. Reports can be created directly from tables, but More.
Acess Test Questions. Chapter 1 (Lynda.com) Question 1 An access database uses five main components (database objects). Which is not one of them? Tables.
Database Presentation BIM, Mrs. Bailey. **Database Notes** Use new sheet of paper! Microsoft Access - known as a database management system or DBMS Database.
Database (Microsoft Access). Database A database is an organized collection of related data about a specific topic or purpose. Examples of databases include:
NextGen Trustee GL/Accounting This class will cover NextGen Financial Management for Trustee Offices. We will look at GL accounts, Transactions, Bank Reconciliation,
NextGen Trustee General Ledger Accounting
FTS 2 Failure Tracking System 2 Repair Process Flow
Spreadsheets, Modelling & Databases
Working With Databases
Access Test Questions Test Date: 05/05/16.
Presentation transcript:

Why are Databases Better than Files? Multiple users can all use the same database, and have access to the current, up to the minute values for the data. To get that in a file system, you’d have to rewrite the file to disk after every transaction, then reread it again before every transaction. It’s easier to find just the information you need, rather than reading the whole file Databases have sophisticated security features, backup features, etc.

Terminology Data FilesData Bases collection of filesdatabase (a collection of tables) filetablerecordfield key field current record

Linking to a Database from a VB program You use a “data control” which is another object on the VB form. This is “linked” to a specific database, and a specific table in that database. Then you can link individual text boxes to that data control, and to particular fields in that table. (You can also just refer to particular fields on the database in code, but we’ll get to that later.) As you change the “current record” the value displayed in the text box will change. If you (manually or through code) change the value in the text box, it automatically changes the value on the database for that record.

The Data Control, Key Properties: Connect Which DBMS? (i.e. ACCESS) DatabaseNameWhich Database? RecordSourceWhich Table? Data Bound Controls, examples: textbox, label, etc. (These are potential data bound controls) Data Bound Controls, Key Properties: DataSource Which Data Control? (Links to table) DataFieldWhich Field?

Some Data Control Methods for Moving: datBooks.Recordset.MoveNext datBooks.Recordset.MoveLast datBooks.Recordset.MovePrevious datBooks.Recordset.MoveFirst datBooks.Recordset.Update (use.Edit before changes) Some Data Control Methods for Finding a Particular Record: datBooks.Recordset.FindFirst [criteria] datBooks.Recordset.FindNext [criteria] datBooks.Recordset.FindLast [criteria] datBooks.Recordset.FindPrevious [criteria] Some Data Control Properties datBooks.Recordset.EOF(T if on last record) datBooks.Recordset.BOF(T if on first record) datBooks.Recordset.NoMatch (T if no match found)

Things you might want to do with a Database Find a particular record (i.e. account info for a particular customer) Get the value for a particular field in a record to use in computations Change the value for particular field in record Add a new record Delete an existing record

Finding a particular record, when the field you are searching for is a numeric value in the database. datBooks.Recordset.FindFirst “ISBN = “ & txtISBN Finds the first record of the table linked to datBooks that has its ISBN field equal to txtISBN datBooks.Recordset.FindNext “ISBN = “ & txtISBN Finds the next record of the table linked to datBooks that has its ISBN field equal to txtISBN

' FindFirst based on a numeric field -- a second example. With ‘ checking for no match. datCustBal.Recordset.FindFirst "CustomerID = " & txtCustID.Text If datCustBal.Recordset.NoMatch = True Then MsgBox "Not a current Customer" txtCustID.SetFocus Exit Sub endif ‘FindFirst based on a text field datCustBal.Recordset.FindFirst "CustomerName = '" & txtCustName.Text & "'" ‘FindFirst based on a date field datCustBal.Recordset.FindFirst ("DateLastTransaction = #" & TargetDate & "#")

Change a field on the database without linking to a textbox datCustBal.Recordset.Edit ‘Puts record in a buffer datCustBal.Recordset("Balance") = 99 ‘Changes value ‘or datCustBal.Recordset “Balance” = 99 ‘or datCustBal.Recordset!Balance = 99 datCustBal.Recordset.Update ‘Writes buffer to DB

Adding a new record to a database datCustBal.Recordset.addnew ‘Creates new record ‘(then you want to fill the fields, either by having the user ‘ fill in linked textboxes or through code such as the ‘ following) datCustBal.Recordset!CustomerID = Text3 datCustBal.Recordset!Balance = 9000 ‘ (Then update the record to actually write to the database) datCustBal.Recordset.Update

Deleting a record from a database datCustBal.Recordset.delete ‘deletes the current record ‘leaving NO current record datCustBal.Recordset.MoveNext ‘Makes the current record the ‘next record. If datCustBal.Recordset.EOF then ‘If you are “over the edge”, datCustBal.Recordset.MoveLast ‘then this brings you back. end if

A More Involved Example: Filling a List Box from a database Find all Customer IDs with this late fee datCustomer.Recordset.FindFirst "LateFees = " & txtLateFeeTarget If datCustomer.Recordset.NoMatch Then MsgBox "No Customer With this late fee" Exit Sub End If Do While datCustomer.Recordset.NoMatch = False lstCustomerIDs.AddItem datCustomer.Recordset!CustomerID datCustomer.Recordset.FindNext _"LateFees = " & txtLateFeeTarget Loop