Page 238 - Open Soource Technologies 304.indd
P. 238

Web Technologies-I                                             Sarabjit Kumar, Lovely Professional University



                   Notes                                    Unit 10:  Database




                                   CONTENTS
                                   Objectives
                                   Introduction
                                   10.1  Using PHP to Access a Database
                                       10.1.1  Create a Connection to a MySQL Database
                                       10.1.2  Closing a Connection
                                   10.2  Relational Databases and SQL

                                       10.2.1  How it works
                                       10.2.2  Security
                                       10.2.3  MySQL Tools
                                   10.3  PEAR DB Basics
                                       10.3.1  Advantages and Disadvantages of PEAR DB
                                       10.3.2  Why use a database abstraction layer?
                                       10.3.3  When not to use a database abstraction layer?
                                       10.3.4  Using PEAR DB
                                       10.3.5  Code Sample: PEAR-DB/Demos/EmployeeReport.php
                                       10.3.6  Code Explanation
                                   10.4  Advanced Database Techniques
                                       10.4.1  Placeholders

                                       10.4.2  Prepare/Execute
                                       10.4.3  Shortcuts
                                       10.4.4  Details about a Query Response
                                       10.4.5  Sequences
                                       10.4.6  Metadata
                                       10.4.7  Transactions
                                   10.5   Summary
                                   10.6  Keywords
                                   10.7  Review Questions
                                   10.8  Further Reading

                                 Objectives

                                 After studying this unit, you will be able to:
                                    •  Understand how to access a database using PHP
                                    •  Explain relational databases and SQL used with PHP

                                    •  Discuss the basic concepts of PEAR DB
                                    •  Understand the advanced database techniques



        232                               LOVELY PROFESSIONAL UNIVERSITY
   233   234   235   236   237   238   239   240   241   242   243