Using Relational Databases and SQL Steven Emory Department of Computer Science California State University, Los Angeles Laboratory 1: Introduction to Relational.

Slides:



Advertisements
Similar presentations
PHP SQL. Connection code:- mysql_connect("server", "username", "password"); Connect to the Database Server with the authorised user and password. Eg $connect.
Advertisements

REPAIR TABLE Got 147 error table handler 1. Repair Table (All programs) 2. Repair Table (desktop) 3. Manual Repair thru MySQL Query Browser.
MS Access 2003 Tutorial By: Juan GUANTENG!!! Y7. Step 1 Launch the Microsoft Access 2003 program. This can be done by clicking an icon on the desktop.
Aqua Data Studio. Find the application We are using Aqua Data Studio v11.
What is MySQL? MySQL is a relational database management system (A relational database stores data in separate tables rather than putting all the data.
Using Relational Databases and SQL Steven Emory Department of Computer Science California State University, Los Angeles Lecture 1: Introduction to Relational.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 1 Creating and Using a Database.
MIS2502: Data Analytics MySQL and SQL Workbench David Schuff
Administrative Functions Certiport Offline Learning System 2.1 Administrative Functions © Certiport, Inc All Rights Reserved.
SOUL INSTALLATION Step-1 For this Please Install the Version 7.0 or SQL Server 2000 or onwards.
Dynamic Web site With PHP and MySQL. MySQL The combination of MySQL database and PHP scripting language is optimum for building dynamic websites. MySQL.
Ch 9 Managing Active Directory User Accounts. Objectives Create Organizational Unit Creating User Accounts in Active Directory Disabling, Enabling, and.
Access Tutorial 10 Automating Tasks with Macros
1 Working with MS SQL Server. 2 Objectives You will be able to Use Visual Studio for GUI based interactive access to a Microsoft SQL Server database.
A Guide to SQL, Eighth Edition Chapter Three Creating Tables.
Session 5: Working with MySQL iNET Academy Open Source Web Development.
Advanced Database Management System Lab no. 11. SQL Commands (for MySQL) –Update –Replace –Delete.
Chapter 7 PHP Interacts with Ms. Access (Open DataBase Connectivity (ODBC))
SQL HW1 Turn in as a hardcopy at the start of next class period. You may work this assignment in groups.
PHP Programming with MySQL Slide 8-1 CHAPTER 8 Working with Databases and MySQL.
Dr. Thomas E. Hicks Trinity University Computer Science.
Creating a Web Site to Gather Data and Conduct Research.
Chapter 7 Working with Databases and MySQL PHP Programming with MySQL 2 nd Edition.
LLRP GUI Client User Guide
Ways to manage DB in MySQL cs346. Six ways to CREATE and INSERT INTO tables Modelocalremotelocalremotewindow WhereMysql console Putty; Mysql console Mysql.
Office of Education Technology (OET) Active Directory Bulk Import Saturday March 11, 2006 /8:30 – 10:30 AM.
1 Working with MS SQL Server Textbook Chapter 14.
Installing and Using MySQL and phpMyAdmin. Last Time... Installing Apache server Installing PHP Running basic PHP scripts on the server Not necessary.
Open Source Server Side Scripting ECA 236 Open Source Server Side Scripting Installation and Testing.
Introduction to the Visual Studio.NET IDE (LAB 1 )
Database control Introduction. The Database control is a tool that used by the database administrator to control the database. To enter to Database control.
Present :Arezoo Mollahasani. Step 1  Define your server connection Open MySQL WorkBench and click New Server Instance on the right of the window.
Analyzing Data Using Access. Creating a new database To create a new database 1.Start Access. In the Task Pane, click Blank Database. 2.The File New Database.
MCTS Guide to Microsoft Windows Server 2008 Applications Infrastructure Configuration (Exam # ) Chapter Five Windows Server 2008 Remote Desktop Services,
Unit 5 Microsoft SQL Server and MySQL. Key Concepts DBMS variations SQL Server features SQL Server Management Studio MySQL features Scripts Queries Database.
DATABASE TOOLS CS 260 Database Systems. Overview  Database accounts  Oracle SQL Developer  MySQL Workbench.
JDBC Tutorial CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 1 Creating and Using a Database.
How to Download and Install the Naper eReader and eBook Naper Publishing Group.
Chapter 1 Getting Started With Dreamweaver. Exploring the Dreamweaver Workspace The Dreamweaver workspace is where you can find all the tools to create.
CS 281 – Fall 2015 Lab 4 Parametric Query and Forms in MS Access.
MySQL Getting Started BCIS 3680 Enterprise Programming.
RT-LAB Electrical Applications 1 Opal-RT Technologies Use of the “Store Embedded” mode Solution RT-LAB for PC-104.
INTRODUCTION TO ACCESS. OBJECTIVES  Define the terms field, record, table, relational database, primary key, and foreign key  Create a blank database.
(Winter 2016) Instructor: Craig Duckett Lecture 09: Thursday, February 4 th MySQL Workbench, TEAM WORK TIME 1.
Chapter 5 Introduction To Form Builder. Lesson A Objectives  Display Forms Builder forms in a Web browser  Use a data block form to view, insert, update,
WAMP Server Installatin Shiyun Wen. WAMP Server Installation  WAMP Server is an integrated installation of Apache, MySQL, and PHP for Windows. Following.
You may have already done this… Download the class files to the desktop Expand those files into root of USB stick Change your USB stick to drive “Z”!
4 Copyright © 2004, Oracle. All rights reserved. Creating a Basic Form Module.
Tomcat Setup BCIS 3680 Enterprise Programming. One-Click Tomcat Setup 2  This semester we’ll try to set up Tomcat with a PowerShell script.  Preparation.
MYSQL AND MYSQL WORKBENCH MIS2502 Data Analytics.
CMPE 226 Database Systems April 19 Class Meeting Department of Computer Engineering San Jose State University Spring 2016 Instructor: Ron Mak
CS 281 – Fall 2010 Lab 4 Parametric Query and Forms in MS Access.
MySQL Getting Started BCIS 3680 Enterprise Programming.
Software-Projekt 2008 Seminarvortrag“Short tutorial of MySql“ Wei Chen Verena Honsel.
Joomla Awdhesh Kumar Singsys Pte Ltd. What is Joomla? Joomla is an award-winning content management system (CMS), which enables you to build Web sites.
1.Switch on the computer and wait for loading. 2.Select the Windows 7 OS at the end of the list. 3.Click on the link ‘Administrator’ 4.Enter the administrator.
COM621: Advanced Interactive Web Development Lecture 10 PHP and MySQL.
Migrating Wordpress Migrating Wordpress can sometimes get more complicated as it should. There is no plugin that does this for you, the best way is to.
MySQL Installation Tarik Booker CS 122.
Analyzing Data Using Access
Basics on DB access Elke A. Rundensteiner.
Database application MySQL Database and PhpMyAdmin
Bomgar Remote support software
IS 220 Databases Fundamentals
Aqua Data Studio.
Chapter 8 Working with Databases and MySQL
CS1222 Using Relational Databases and SQL
8 6 MySQL Special Topics A Guide to MySQL.
Presentation transcript:

Using Relational Databases and SQL Steven Emory Department of Computer Science California State University, Los Angeles Laboratory 1: Introduction to Relational Databases and MySQL

Topics for Today Lab #0 Make sure you all have NIS accounts Make sure you all have CSNS accounts Get MySQL installed onto your computer Go over the Movie Archive Database Homework #0 Get MySQL installed on your home computer Become familiar with the Movie Archive Database

Using Relational Databases and SQL Running MySQL (Console)

Running MySQL Start the database server mysql /bin/mysqld.exe Start the database client mysql /bin/mysql.exe -u root If you get an error, verify that the database server (mysqld.exe) is running by checking the Task Manager and looking for mysqld.exe in the list of processes.

Simple MySQL Client Commands All commands and queries should be terminated by a semicolon You don’t need these commands if using the MySQL Query Browser SHOW databases; Displays a list of databases managed by the DBMS USE ; Sets the current database for which you want to extract data from

Creating the Movie Archive Database To create the Movie Archive database: At mysql> prompt, type in: CREATE DATABASE movie; You should a message like: Query OK, 1 rows affected (0.01 sec). This command creates an empty database with no tables

Loading the Movie Archive Database To load the Movie Archive database: Place the movie.sql file from the CS122 Wiki page into your mysql /bin directory At mysql> prompt, type in: USE movie; SOURCE movie.sql; You should see a bunch of messages like: Query OK, 1 rows affected (0.01 sec).

Unloading the Movie Archive Database To unload the Movie Archive database: Place the remove_movie.sql file from the CS122 Wiki page into your mysql /bin directory At mysql> prompt, type in: USE movie; SOURCE remove_movie.sql; You should see a bunch of messages like: Query OK, 1 rows affected (0.01 sec).

Deleting the Movie Archive Database To delete the Movie Archive database: At the mysql prompt, type in: DROP DATABASE movie; You should get the following message: Query OK, 0 rows affected (0.00 sec)

Displaying Table Names To display a list of table names: At the mysql prompt, type in: SHOW TABLES; You should get a list of table names.

Displaying Table Contents To display the contents of a specific table: At the mysql prompt, type in: SELECT * FROM tablename; For example: SELECT * FROM Companies;

Console Tips Use Notepad or Notepad++ to type your queries and then paste into the command prompt If the table has many attributes and each row is rendered in MySQL on multiple lines, do the following: Command Prompt > System Menu > Preferences Select the Layout tab Change Screen Buffer Size parameters to: Width: 1000 Height: 2400

Using Relational Databases and SQL Running MySQL (MySQL QueryBrowser)

MySQL Query Browser An alternative MySQL client with a GUI Download the zip (no installer) version of it from the GUI Tools link in my syllabus.

Running MySQL Start the database server mysql /bin/mysqld.exe Start the query browser MySQL GUI Tools 5.0/MySQLQueryBrowser.exe Server Host: localhost Port: 3306 Username: root Password: (leave this empty, unless you change it) Click on OK, then Ignore (if necessary).

Creating the Movie Archive Database To create the Movie Archive database: Right-click in the Schemata window and choose: Create New Schema Type in movie and press OK

Loading the Movie Archive Database To load the Movie Archive database: Double-click on movie in the Schemata window to make it current (the name of the current database will be bold) Choose File > New Script Tab Click on the Load button on the toolbar Choose movie.sql and press Open Click on the Execute button on the toolbar We are now ready to run queries

Unloading the Movie Archive Database To unload the Movie Archive database: Double-click on movie in the Schemata window to make it current (the name of the current database will be bold) Choose File > New Script Tab Click on the Load button on the toolbar Choose remove_movie.sql and press Open Click on the Execute button on the toolbar

Deleting the Movie Archive Database To delete the Movie Archive database: In the Schemata window, right-click on the movie database and choose Drop Schema

Displaying Table Contents To display the contents of a specific table: In the Schemata window, double-click on a table name and then press Execute (the green lightning bolt button on the main toolbar)