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

Unit 10: Database



            Databases panel:  Databases  panel  allows  you  to  define  your  database  connections  for  your   Notes
            site. This even gives you the opportunity to preview some of the data in your database once a
            connection is established.
            phpinfo( ): This function is check the database support in your installation process of PHP.
            Relational database: A relational database can be seen as the data handling part of another
            application. The application instructs the database to perform searches, as well as add, delete
            and modify data via the Structured Query Language or SQL.
            Sequence: A sequence is really a table in the database that keeps track of the last-assigned ID.
            You can explicitly create and destroy sequences with the createSequence( ) and dropSequence
            ( ) methods.

                          1.  Create an employee table with given field name and enter some data in it.
                                emp_id, emp_name, emp_addr, emp_profile.

                          2.  Write the commands to perform given operation on employee table
                                SELECT, ALTER TABLE, INSERT, DELETE.

            10.7 Review Questions

               1.  How do we access a database using PHP? Write the steps of database connectivity with
                 PHP.
               2.  How the relational database and SQL is used with PHP? How it provide the security of
                 database?
               3.  What are the MySQL tools? How does it work with PHP?
               4.  What are the basic concepts of PEAR DB? Write its advantages and disadvantages.
               5.  Why we use a database abstraction layer? When we can avoid it?
               6.  Discuss the advance database techniques.
               7.  What is the Query Response? Why it is used?
               8.  What are the sequences? Why these are used in databases?
               9.  What is metadata? How it is useful?
              10.  How the transactions are performed in the databases?

            Answers to Self Assessment
               1.  (c)    2.  (b)       3.  (a)      4.  (b)        5.  (b)
               6.  (a)    7.  (c)       8.  (a)      9.  (a)       10.  (a)

               11.  (b)
            10.8 Further Reading




                          PHP: The Complete Reference, by Steven Holzner.



                          http://www.keithjbrown.co.uk/vworks/php/







                                             LOVELY PROFESSIONAL UNIVERSITY                                   253
   254   255   256   257   258   259   260   261   262   263   264