220 likes | 448 Views
Database Design and Creation Using MySQL. Track 3 : Basic Course in Database. Learning Objectives:. At the end of the session, you should be able to: Model a database Understand (Relational Database Management System) RDBMS concept Appreciate MySQL as an open-source RDBMS. Database Design.
E N D
Database Design and Creation Using MySQL Track 3 : Basic Course in Database
Learning Objectives: At the end of the session, you should be able to: • Model a database • Understand (Relational Database Management System) RDBMS concept • Appreciate MySQL as an open-source RDBMS
Database Design Entity-Relationship Diagram (ERD) is a tool for modeling data. 3 concepts to remember about ERD • Entity - the main object in the problem domain. • Attribute - describes the main object (entity). • Relation - association defines the between entity.
How to maintain an inventory of contact individuals and institutions? Database Case Study Mayang: I have a problem in my Resource Center Wilma: I suggest you use a DBMS to help you manage your data...
Steps to Create ERD • Identify the entity • Identify the entity's attributes • Identify the relation between entities
Steps to Create ERD • Identify the entity
Steps to Create ERD • Identify the entity's attributes • 1st Form
Steps to Create ERD • Identify the entity's attributes • 2nd Form
Steps to Create ERD • Identify the relation between entities
Additional DBMS Concepts • Relational DBMS (RDBMS • Commercial RDBMS (expensive) • Oracle, Informix, SQL Server • GNU General Public License software (free) • MySQL, mSQL or PostGres.
MySQL • A Relational Database Management System (RDBMS) that is multi-user • Say it as ``My Ess Que Ell". several computer workstations can access and write into a single database
Where to get MySQL • Stable version at this time is MySQL version 3.22.x. • Asia: • China [Freecode] http://mysql.freecode.com.cn • China [Netfirm] http://mysql.netfirm.net • Korea [KREONet] http://linux.kreonet.re.kr/mysql/ • Japan [Soft Agency] http://www.softagency.co.jp/MySQL
Where to get MySQL • Stable version at this time is MySQL version 3.22.x. • Asia: • Japan [Nagoya Syouka University] http://mirror.nucba.ac.jp/mirror/mysql or ftp://mirror.nucba.ac.jp/mirror/mysql • Singapore [HJC] http://mysql.hjc.edu.sg or ftp://ftp.hjc.edu.sg/mysql • Taiwan [HT] http://mysql.ht.net.tw
Where to get MySQL • Stable version at this time is MySQL version 3.22.x. • Australia: • Australia [AARNet/Queensland] http://mirror.aarnet.edu.au/mysql or ftp://mirror.aarnet.edu.au/pub/mysql • Australia [Blue Planet/Melbourne] http://mysql.bluep.com/ • Australia [ITworks Consulting/Victoria] http://mysql.itworks.com.au
MySQL Datatypes • INT • can contain values up to 2147483648 • INT • INT(3) • REAL • can contain values from-3.402823466E+38 to -1.175494351E-38, 0 and 1.175494351E-38 to 3.402823466E+38
MySQL Datatypes • DECIMAL[(M[,D])] • DECIMAL(5,2) • CHAR(length) • fixed character length, wastes diskspace • CHAR(10) • VARCHAR(length) • variable character length, economical to use • VARCHAR(10)
MySQL Datatypes • DATE • Y2K Compliant • displays DATE values in 'YYYY-MM-DD' format • TIME • displays TIME values in 'HH:MM:SS' format • DATETIME • displays DATETIME values in 'YYYY-MM-DD HH:MM:SS' format
Recommended MySQL datatypes • INT • DECIMAL (M,D) • VARCHAR(length) • DATE