Chapter 5 Building Your Product Catalog database Objectives Create Database. Create Table. Connect to Database. Use ASP Script to add new products. Use.

Slides:



Advertisements
Similar presentations
Course ILT Working with related tables Unit objectives Use the Lookup Wizard to create a lookup field and a multivalued field Modify lookup field properties.
Advertisements

Creating a Login Process Creating a users table and a login form that denies access to unauthorized users.
Using a database to organize information
Connect to Excel Spreadsheet with an OLE DB Connection.
Access Lesson 2 Creating a Database
Access Tutorial 1 Creating a Database
4/8/99 C. Edward Chow Page 1 Active Server Page It is a server-side scripting environment for creating dynamic content. ASP are files with.asp extension,
Creating a Blank Database 1. Open up Microsoft Access 2. Click on Blank document button 3. On the right panel, Specify the location for saving your database.
Overview Importing text files Creating Forms Creating Reports.
4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.
Chapter 1 Databases and Database Objects: An Introduction
Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke.
Figure 1. Hit analysis in 2002 of database-driven web applications Hits by Category in 2002 N = 73,873 Results Reporting 27% GME 26% Research 20% Bed Availability.
Microsoft Access 2007 Microsoft Access 2007 Introduction to Database Programs.
Access Tutorial 8 Sharing, Integrating, and Analyzing Data
Access Tutorial 10 Automating Tasks with Macros
Chapter 2 Querying a Database
CIS 270—App Dev II Big Java Chapter 22 Relational Databases.
Chapter 3 Maintaining a Database
Access Lesson 2 Creating a Database
Advanced Database Management System Lab no. 11. SQL Commands (for MySQL) –Update –Replace –Delete.
ADO Connect Y.-H. Chen International College Ming-Chuan University Fall, 2004.
Chapter 7 PHP Interacts with Ms. Access (Open DataBase Connectivity (ODBC))
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
Chapter 1 Databases and Database Objects: An Introduction
Creating a Survey Using Dreamweaver’s Record Insertion Form Wizard.
CIS 270—Application Development II Chapter 25—Accessing Databases with JDBC.
Creating a Web Site to Gather Data and Conduct Research.
Needs for Accessing Database To make your web site more dynamic and maintainable, you can display information on your web pages that are retrieved from.
Tutorial 10 by Sam ine1020 Introduction to Internet Engineering 1 Database & Server-side Scripting Tutorial 10.
Course ILT Access basics Unit objectives Define database and database-related terminology, and plan a database Start Access and open, create, view, and.
MS-ACCESS BY SANGEETHA PARTHASARATHY Topics to be covered §Comparing Values in Selection Criteria §Calculating Values in a Query §Changing the appearance.
Dreamweaver MX. 2 Overview of Templates n Templates represent a web page design or _______ that will be common to multiple pages. n There are two situations.
Access Manual 2 By Dhawala Kovuri Elham S.Khorasani Ismail Guneydas.
Pasewark & Pasewark Microsoft Office 2003: Introductory 1 INTRODUCTORY MICROSOFT ACCESS Lesson 3 – Creating and Modifying Forms.
With Microsoft Office 2007 Introductory© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Office 2007 Introductory.
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.
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.
Pasewark & Pasewark Microsoft Office 2003: Introductory 1 INTRODUCTORY MICROSOFT ACCESS Lesson 3 – Creating and Modifying Forms.
Ch. 101 Database Management An Introduction to Databases.
Presentation On How To Create Connection To A Database.
AVCE ICT – Unit 7 - Programming Session 16 – Database and VB.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 7 1 Microsoft Office FrontPage 2003 Tutorial 8 – Integrating a Database with a FrontPage.
Planning & Creating a Database By Ms. Naira Microsoft Access.
INTRODUCTION TO ACCESS. OBJECTIVES  Define the terms field, record, table, relational database, primary key, and foreign key  Create a blank database.
CPS-Student Response System Dottie Betts ITRT June 2009.
Database Connectivity What is ADO. What is ADO? ADO is a Microsoft technology ADO stands for ActiveX Data Objects ADO is a Microsoft Active-X component.
Designing a Relational Database 13.4 Page A database should be created based on a design  Three steps Determine what information should be stored.
MSOffice Access Microsoft® Office 2010: Illustrated Introductory 1 Part 1 ® Database & Table.
CSCI 3327 Visual Basic Chapter 13: Databases and LINQ UTPA – Fall 2011.
1 CPE 332 Introduction DBMS: Relational Database Managment Systems Instructor:Suthep Madarasmi, Ph.D. ดร. สุเทพ มาดารัศมี
Build a database II: Create tables for a new Access database Create your tables In a relational database, tables store your data. Your data doesn’t “live”
COMPREHENSIVE Access Tutorial 1 Creating a Database.
Physical Layer of a Repository. March 6, 2009 Agenda – What is a Repository? –What is meant by Physical Layer? –Data Source, Connection Pool, Tables and.
Course Contents Overview: Database basics Lesson 1: Benefits of using a database Lesson 2: Table that data Lesson 3: Analyzing, viewing, and reporting.
Creating SQL Database file And Displaying a Database Table in a DataGridView.
Copyright © 2014 Pearson Canada Inc. Ext. 5b-1 Copyright © 2014 Pearson Canada Inc. Application Extension 5b Using Microsoft Access Part 2: Using Information.
Creating Data Base & Sql Data Source
, MS-Access, QBE, Access/Oracle
Access Tutorial 1 Creating a Database
Basic Database Concepts
Introduction to Microsoft Access
Access Tutorial 1 Creating a Database
VISUAL BASIC INTRODUCTION TO DATA CONNECTIVITY.
Creating Data Base & Sql Data Source
Chapter 7 Searching Your Products
Access Tutorial 1 Creating a Database
Access Tutorial 1 Creating a Database
Database Connections.
Presentation transcript:

Chapter 5 Building Your Product Catalog database Objectives Create Database. Create Table. Connect to Database. Use ASP Script to add new products. Use ASP Scripts to update existing product information.

Database Def: An organized collection of related information. Ex: MS Access, MS SQL Server, Oracle, Sybase, ingress etc. The first step in creating online store is to create a database to hold information about your products. MS Access is used to create database.

Creating Database Launch MS Access by selecting Start, Programs, MS Access. From the initial dialog box, choose the option to create a new database using a blank Access database. Within the File New Database dialog box, name your new database “storeDB” and save your new database to your hard drive.

Tables Database all by itself isn't particularly useful. Add one or more tables in a database before storing the information. A database table is structured like a spreadsheet or ledger. It contains one or more rows divided into one or more columns. Each column has a name & is used to store a particular type of information. Each row in a database table represents a distinct record.

Creating Tables Launch MS Access by selecting Start, Programs, MS Access. Select the option to open an existing file & select the database named storeDB. After you open the storeDB database, double-click the item labeled Create table in Design view. Enter the information into design view table grid. Make the product_id column into the table’s primary key by selecting the column within the grid and clicking the icon of the key. Save the new table by clicking Save and entering the same products.

Connecting to a Database To access the database within an ASP page, open a database connection but before that the physical location of the database has to be provided to ASP page & this is done with Data Source Name (DSN) Two types of DSN: File DSN – DB connection information is stored in a file. System DSN - DB connection information is stored in a computer’s registry.

Create System DSN Open Control Panel by selecting Start, settings, Control Panel. Click on ODBC Data sources applet. Select the tab labeled System DSN and click Add. Select the MS Access driver and click finish. In the ODBC MS Access Setup dialog box, click the button labeled Select and navigate through your Hard Drive to the database named storeDB. Click OK. Enter accessDSN for the Data Source Name and click OK. Click OK to close the ODBC Data Sources applet.

ActiveX Data Objects (ADO) is used to open database connection. ADO is a collection of objects that allows you o work with databases within your ASP Scripts. ASP script to open database connection: <% Set Con = Server.CreateObject(“ADODB.Connection”) Con.Open “accessDSN” %>

Inserting records into Table Syntax: Insert into table_name(column_list) values (value_list). ASP script: <% Set Con = Server.CreateObject(“ADOB.Connection”) Con.Open “accessDSN” Sqlstring=“Insert into products (p_name,p_price) &_ “VALUES(‘Gift Basket’,34.54)” Con.Execute sqlstring Con.close %>

Updating records in Table Modifying existing records. Syntax: Update table_name SET column_name = expression where column_name = expression. Ex: Update product set product_price=45.00 where product_id=17.

ASP Script to Update table <% Set Con = Server.CreateObject(“ADOB.Connection”) Con.Open “accessDSN” Sqlstring=“Udate products &_ “Set p_price = 45.00”&_ “where p_name = ‘Gift Basket’ “ Con.Execute sqlstring Con.close %>

Retrieving Product Names <% Set Con = Server.CreateObject(“ADOB.Connection”) Con.Open “accessDSN” Sqlstring=“select p_name from products” Set RS=con.execute(sqlstring) While not RS.EOF %> <% RS.MoveNext Wend %>