IMS1907 – Database Systems Tutorial Week 8-9? More with MySQL ...
Recommend Documents
File: Tutorial database mysql pdf. Download now. Click here if your download doesn't start automatically. Page 1. tutori
Ralf Hartmut Güting, Tutorial Spatial Database Systems. 1 What is a Spatial
Database System? Requirement: Manage data related to some space. Spaces:.
In order to not clash with an existing installation, we will not do a proper install of the MySQL server but rather run
Designing Scalable application Architecture. • Role of Caching. • Replication/
Partition/Clustering. • Architectural notes for C/Perl/PHP/Java/.Net. • Application ...
This HowTo explains the configuration steps to combine JBoss Application
Server with ... Start mysql console using mysql -u admin -p - type admin as
password.
and processed data as a server-side with Adobe Flash. Flash is a powerful ... the
playing game process is presented in Figure 2. First theuser ... ActionScript .....
application is developed with Adobe Flash CS3 and. ActionScript 2.0. Flash as ...
record, including its sequential number (a unique electronic signature) and the selected candidate (her/his ID). ... solutions in Excel. Other students went even ...
set up their MySQL database tables efficiently and easily. Marc Delisle ... I hope
that this book will assist readers into building effective data structures. To Carole
...
Command Line Client. ▫ Read the MySQL documentation. ▫ c:\mysql\mysql\docs
\manual_toc.html. ▫ Read MySQL install instructions on CD. ▫ Command to ...
Jun 1, 2010 ... Information Technology. Name of the bachelor's thesis. MySQL Database.
Abstract. Objectives. The main objectives of this thesis were to show ...
2. mv /var/lib/mysql/mvc /var/lib/mysql/pepa rename source-file as target-file. 3. ls -la /var/lib/mysql/. 4. service mysql restart. 5. open phpmyadmin o write mysql.
permission of the publisher, except in the case of brief quotations embedded in ... networking, security, Linux servers,
Application. Slave. Parse/optimize/execute. Statements flushed at commit. SBR. MySQL Replication Architecture. MySQL 4.0
MySql 5 introduced concept of stored procedure functionality. If you have already
... In my post “Mysql Stored Procedure Tutorial” we will learn about some topic.
TUTORIALS POINT · Simply Easy Learning. Example: ................................................
.................................................. 28. Selecting MySQL Database Using PHP Script: .
Material for this tutorial can be downloaded from the replication tutorial page on
.... To start the server, we open a separate window and start the server with the ...
Database System Concepts, 5th Edition, A. Silberschatz, H. F. Korth, and S.
Sudarshan,. McGraw Hill, 2006. R f. · Midterm Exam: 4/22 (Wed). · Final Exam: 6/
10 ...
MySQL by Michael Kofler. " MySQL & PHP from scratch. " MySQL in 21 Days. "
MySQL/PHP Database Applications. " PHP and MySQL Web Development.
bukutamu, terlebih dahulu buat file koneksi.php untuk menghubungkan php ...
MySQL. Tampilan Awal Buku Tamu, akan menampilkan form inputan berupa ...
MySQL Database Management System Forks Comparison and Usage. Oļegs Äapligins1, Andrejs Ermuiža2. 1. JÄtnieku iela 77a-67, Daugavpils LV-5410, ...
Step-by-step Dreamweaver Add an online poll to your site. Tutorial: Create ...
provide Linux, the Apache Web server, the MySQL database and the PHP
scripting ...
managed compute infrastructure capable of hosting end customer applications and billed by ... XaaS is quickly emerging a
managed compute infrastructure capable of hosting end customer applications and billed by consumptionâ ... Hybrid Clou
More with MySQL. Tutorial Objectives: - to further your understanding of
structured query language and how it is used to create databases and tables,
populate ...
IMS1907 week 8 tutorial 2005
IMS1907 – Database Systems Tutorial Week 8-9? More with MySQL
Tutorial Objectives: to further your understanding of structured query language and how it is used to create databases and tables, populate the tables and query the data contained in those tables to apply the understanding of SQL to create a simple database using MySQL. Tutorial Task: This week we will develop your understanding of SQL by creating a simple database, populating it, and generating queries against the data. You will create the database used in the lectures that stores information about boats and the sailors that reserve those boats. Your tutor will guide you through the structure of some queries but you should attempt them yourself – they are a useful aid to your understanding and will assist you with the assignment. Use the lecture notes and the MySQL Reference Manual to assist you with the creation of your database. 1. Create a database and name it according to the nature of the data it contains – ‘boats’ or ‘reservations’ or ‘boat_reservations’ or something like that (Note: It is useful when working in the labs to name your databases with your initials first to distinguish it from other databases that may be stored on the same machine eg DG_ boats would be different from RS_boats. It can also be useful to DROP your database once you have completed an exercise so that no one else can see it!) 2. Create the following tables for your database and populate them with the data values shown in the tables. Use SHOW TABLE and SELECT statements to verify that that your tables have been created and populated correctly. sailor +-----+----------+---------+-----+ | sid | sname | rating | age | +-----+----------+---------+-----+ | 22 | Dustin | 7.00 | 45 | | 29 | Brutus | 1.00 | 33 | | 31 | Lubber| 8.00 | 55 | | 32 | Andy | 8.00 | 25 | +-----+----------+---------+-----+ boat +------+------------+---------+--------+ | bid | bname | colour | cost | +------+------------+---------+--------+ | 101 | Voyager | blue | 10.00 | | 102 | Voyager | red | 20.00 | | 103 | Clipper | green | 10.00 | | 104 | Shark | red | 30.00 | +------+------------+---------+--------+ Page 1 of 3 Thanks to David Grant for the development of this tutorial.
PDF created with FinePrint pdfFactory trial version http://www.pdffactory.com
3. Use the ALTER TABLE statement to add a column named ‘cost’ to the ‘boat’ table. This column should be able to store a dollar amount from $0.00 to $999.99. Use SELECT statements to verify that that your table has been modified correctly. 4. Use the UPDATE statement to add the following values for the new column of the records. Use a SELECT * statement to verify that that your table has been updated correctly. +----+--------+ | bid | cost | +----+--------+ | 101 | 10.00 | | 102 | 20.00 | | 103 | 10.00 | | 104 | 30.00 | +----+--------+ 5. Use a SELECT statement to list the costs for each boat. Use a DISTINCT statement to remove any duplicate values from the list. 6. Write a query to list the details of all boats that cost $10 to reserve. Modify the query to list the details of all boats that cost $10 to reserve and are green in colour. Modify the query again to list the details of all boats that cost more than $10 to reserve. 7. Write a query to display the number, name, cost, the GST charge (at a rate of 22%), and cost including GST for each boat. 8. Write a query to display the average age of sailors. 9. Write a query to display the sum of the cost of boat reservations. 10. Write a query to display the total number of reservations.
Page 2 of 3 Thanks to David Grant for the development of this tutorial.
PDF created with FinePrint pdfFactory trial version http://www.pdffactory.com
IMS1907 week 8 tutorial 2005
11. Write a query to display the total number of reservations. Made for each boat ID number 12. Write a query to display the boat ID number, name, and total number of reservations made for each boat. 13. Write a query to display the boat ID number, name, and date of reservations made for each boat. 14. Write the previous query so that the records are in date order. 15. Write a simple query to show the total reservation costs for each boat. Rewrite the simple query to arrange the result in order of the cost. Rewrite the query again using a join to show the name of each boat as well as the total costs. 16. Write a query to display the boat number, boat name, sailor name and the reservation date for each reservation. Play with the way that the results are displayed by ordering on different columns. 17. Add the following record to the boat table using an INSERT statement +-----+-----------+----------+--------+ | bid | bname | colour | cost | +-----+-----------+----------+--------+ | 105 | Titanic | ice blue | 50.00 | +-----+-----------+----------+--------+ Now write a query using an outer join to list all boats showing the days they have been reserved or NULL if they have not yet been reserved. Now rewrite the query to show just those boats that have not been reserved. Once you have completed these exercises, make up your own queries and test them see if you get the answers you expected.
Page 3 of 3 Thanks to David Grant for the development of this tutorial.
PDF created with FinePrint pdfFactory trial version http://www.pdffactory.com