1 / 53

What is MySQL?

What is MySQL?. MySQL is a relational database management system (RDBMS) based on SQL (Structured Query Language). First released in January, 1998. Many Internet startups became interested in the original open source version of MySQL. What is MySQL? Continue.

yuma
Download Presentation

What is MySQL?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. What is MySQL? MySQL is a relational database management system (RDBMS) based on SQL (Structured Query Language). First released in January, 1998. Many Internet startups became interested in the original open source version of MySQL.

  2. What is MySQL?Continue MySQL is a database system used on the web. Basically, a MySQL database allows you to create a relational database structure on a web-server somewhere in order to store data or automate procedures.

  3. Installing MySQL on Windows These instructions are for version 5.1 (mysql-5.1.51-win32) • 1. Download the current version of MySQL from http://www.mysql.com. • 2. Double-click setup.exe to launch the installer.

  4. 3. At the Welcome screen of the Setup Wizard click Next.

  5. 4. Choose the Typical option as the setup type and click Next.

  6. 5. Click Install.

  7. 6.a. Click Next.

  8. 6.b. Click Next.

  9. 7. The MySQL Server Database Engine is now installed. At this point the server must be configured, choose the Configure the MySQL Server now option and click Finish.

  10. 8. At the Welcome screen of the MySQL Server Instance Configuration Wizard, click Next.

  11. 9. Choose the Detailed Configuration option and click Next.

  12. 10. Choose the Developer Machine option and click Next.

  13. 11. Choose the database usage type that best describes your installation. If you are unsure, choose the Multifunctional Database option and click Next.

  14. 12. Choose a location that will house the database tablespace and click Next. If the current machine will be used to store the Portfolio catalog, the default location will work fine.

  15. 13. This step of the Wizard allows you to help optimize the database for the number of concurrent connections that you expect to have to a Portfolio catalog. • If you are not sure how many concurrent users you will have, choose the Online Transaction Processing (OLTP) option • But we will choose the Decision Support (DSS)/OLAP option and click Next.

  16. 14. Choose the Enable TCP/IP Networking option , Enable Strict Mode and click Next.

  17. 15. Choose the Best Support for Multilingualism option and click Next.

  18. 16. To run MySQL server as a service,check the Install as a Windows Service option and choose a Service Name. It is also recommended to launch the MySQL Service automatically, check the Include Bin Directory in Windows PATH and click Next.

  19. 17. In this step you choose enable the root user and choose a password. Check the Modify Security Settings option, then enter and confirm the new root user password. When finished, click Next.

  20. 18. Click Execute to configure the MySQL instance.

  21. 19. Click Finish to close the Wizard.

  22. Launching MySQL

  23. There are to ways to launchthis program :1. Start --> Run --> cmd

  24. 2. Start --> All Program --> MySQL --> MySQL Server 5.0 --> MySQL Command Line Client

  25. Table • “A table is the primary unit of physical storage for data in a database.”1 • Usually a database contains more than one table.

  26. Table

  27. Field (Column) Customers a field

  28. Record (Row) Customers a record

  29. Primary Key Customers primary key field Primary key is a unique identifier of records in a table. Primary key values may be generated manually or automatically.

  30. Primary Key Roles (Performances) primary key fields A primary key can consist of more than one field.

  31. Foreign Key primary key field parent table Directors relationship child table Movies foreign key field

  32. Conceptual Data Models Use concepts such as entities, attributes, and relationships • An entity represents a real world object or concept. • An attribute represents some property of an entity. • A relationship among two or more entities represents an interaction among the entities.

  33. Relationship Types • One-to-one • One-to-many • Many-to-many

  34. One-to-Many • A film is directed by at most one director • A director can direct any number of films id Director Film Directed title name Director Directed Film

  35. Many-to-Many • A film is directed by any number of directors • A director can direct any number of films id Director Film Directed title name Director Directed Film

  36. One-to-One • A film is directed by at most one director • A director can direct at most one film id Director Film Directed title name Director Directed Film

  37. Download mysql-workbench from http://www.mysql.com. (mysql-workbench-gpl-5.2.28-win32_5)

  38. Select (open connection to start querying)

  39. Press OK, then enter your password

  40. show databases;

  41. create database New_database;

  42. show databases;

  43. use new_database;

  44. How to create tables • Use create create table <table_name> (column_namedata_type [not null] … , column_namedata_type [not null], primary key (column_name)); • To show the structure of the table describe <table_name>;

  45. Example

More Related