Presentation is loading. Please wait.

Presentation is loading. Please wait.

2nd year Computer Science & Engineer

Similar presentations


Presentation on theme: "2nd year Computer Science & Engineer"— Presentation transcript:

1 2nd year Computer Science & Engineer
DataBase 2nd year Computer Science & Engineer DataBase course notes 1

2 Database Design using MySQL
DataBase course notes 1

3 many books, tutorials, that describe MySQL and PHP
use of MySQL database server and client MySQL and PHP originally appeared on Linux platform Linux, Apache, Mysql, Php Windows, Apache, Mysql, Php DataBase course notes 1

4 www.mysql.com “world’s most popular Open Source database”
if you need MySQL for non-commercial use, you can download a copy free DataBase course notes 1

5 Databases and Internet
in early days of the internet, websites were just static things that required each page to be created manually sales catalogue on the web had to create page for every item in catalogue create standard template page retrieve product detail from database create webpage “on the fly” for each product DataBase course notes 1

6 Database Management System (DBMS)
management system decides how data is stored and retrieved, as well as controlling user access to it. every time user retrieves data, deletes, change or adds more data, DBMS deals with the request user cannot access data files directly, he can only talk to DBMS management system is a barrier that controls access to the underlying data DataBase course notes 1

7 Database MySQL can control several databases at once
DataBase course notes 1

8 Tables database is a container to store your tables in
table is a collection of data of a similar type each table in a database has a unique name within that database, and that is how we refer to the table DataBase course notes 1

9 Columns any table will have a set of attributes, that is, a list of types of items that each table will store we will refer to this attribute as a column you would have called this a field each column contains a specific type of data each column in a table has a unique name within that table, and that is how we refer to the column DataBase course notes 1

10 Relations database allowed to set up more than a table.
database systems are classed as relational, allows you to relate data in tables to data in other tables in relational database theory, tables are called relations (columns are called attributes) DataBase course notes 1

11 Rows row (or record) are all different ways of referring to a line of data within a table tuple is relational theory term for row, and record is the earlier form of databases term DataBase course notes 1

12 Client-server Systems
DataBase course notes 1

13 Client-server Systems
data is stored on the server when client needs to access data, it makes request to server on receiving request, server takes necessary action, and sends its response back to client response could be data, request for more details, or error message one of the most widespread client-server systems is internet DataBase course notes 1

14 Client-server Systems
client and server do not necessarily have to be on different machines you can set up MySQL server software and client software on the same machine system is still a client-server system even if it all runs in the same box DataBase course notes 1

15 DBMS controls access to data
DataBase course notes 1

16 MySQL database behind website
DataBase course notes 1

17 user asks web browser (Internet Explorer, Mozilla Firefox, Opera) to look at webpage
request gets sent to webserver (Apache, Internet Information Services (IIS), formerly called Internet Information Server) if that webpage is built using a scripting language such as PHP or ASP.NET, the request gets forwarded to the script processor if script processor finds database commands (SQL) passes them to DBMS, that is, MySQL server or Oracle, Microsoft SQL Server, PostgreSQL, … DataBase course notes 1

18 gets sent back to the user in HTML
database (DBMS) processes SQL, which is sent back to script processor as text text is used to generate HTML along with other commands in scripting language gets sent back to the user in HTML finally gets processed by web browser into a webpage happen very quickly, even when servers are on different machines each server is specifically optimized to do its own task quickly, so they all work well together DataBase course notes 1

19 Structured Query Language
as databases became more prominent, some standard method of obtaining information from them was required does not really matter how DBMS stores data or controls access to it, as long as you get information that you want from it back in an acceptable way standard way of communicating with database servers was needed most of commands are standard across all SQL platforms you should be able to transfer your knowledge of SQL to other DBMS quickly DataBase course notes 1

20 more enterprise features free license
MySQL MS SQL Server lighter free license release 5 more enterprise features free license for Computer Science personnel release 2005, 2008 DataBase course notes 1

21 Oracle Database 10g Express
SQL Server 2005 Express SQL Server 2008 Express Oracle Database 10g Express DataBase course notes 1

22 Interactive SQL tutorial
Andrew Cumming - lecturer at Napier University in Edinburgh, Scotland, UK DataBase course notes 1

23 MySQL Community Server is free MS SQL Server 2005/2008 Express
unix, windows, mac osx... MS SQL Server 2005/2008 Express totally free, but limited to max 1 GB bufferpool, max 1 processor, max 4 GB per database Windows NT or 2000 or more Oracle 11g Express unix, windows, mac osx DataBase course notes 1

24 Mimer IBM DB2 9.5 Express PostgreSQL
free downloads available for developers unix, windows, mac osx, symbian ... IBM DB2 9.5 Express totally free and no database size limit, but limited to max 2 GB bufferpool, max 2 processors linux and windows PostgreSQL free often bundled with linux, windows DataBase course notes 1

25 Installing MySQL DataBase course notes 1

26 Install MySQL Server DataBase course notes 1

27 Install Graphical Client Tool
Toad® for MySQL - freeware development tool improves productivity of developers and administrators running MySQL on Windows phpMyAdmin free software tool written in PHP intended to handle administration of MySQL over internet included in most WAMP distributions DataBase course notes 1

28 MySQL Directory Structure
DataBase course notes 1

29 Starting MySQL Service
default the directory where all of MySQL’s executable files are stored is \mysql\bin to start MySQL service, double click on winmysqladmin.exe file screen shown in next figure will appear for few moments and then hide itself first time it is run the MySQL service will prompt you for some user credentials for the administrative user DataBase course notes 1

30 MySQL admin screen DataBase course notes 1

31 depending on your operating system and version of MySQL that you have, preceding process also installs shortcut to WinMySQLadmin.exe in your start-up group ensures that MySQL server starts up every time you restart your machine can also register mysql as a win32 service on certain operating systems DataBase course notes 1

32 MySQL Configuration Files
my.ini usually stored in \windows directory, if you have chosen a standard installation. Any changes you make to this file can be contains various parameters, such as location of datastore, IP address of server, username and password that you just entered everything is now set up and running we need to test that we can connect to server DataBase course notes 1

33 Connecting to MySQL Server
the most basic way, via command line interface start command box get into the directory with MySQL executables cd \mysql\bin run MySQL command interpreter mysql DataBase course notes 1

34 SQL commands connect database exit connect with Graphical Tool
DataBase course notes 1

35 Use MySQL graphical client
select required database using Database Selector type the SQL query that you wish to execute into the Query Window once typed, click on Execute Query button to run the query if query does not trigger output, check text in Status Window DataBase course notes 1


Download ppt "2nd year Computer Science & Engineer"

Similar presentations


Ads by Google