CSCI-UA: Database Design & Web Implementation. Professor Evan Sandhaus

Size: px
Start display at page:

Download "CSCI-UA: Database Design & Web Implementation. Professor Evan Sandhaus"

Transcription

1 CSCI-UA: Database Design & Web Implementation Professor Evan Sandhaus Lecture #15: Post Spring Break Massive MySQL Review Database Design and Web Implementation

2 Database Design and Web Implementation 2

3 Administrivia Midterm Readings: Read through chapter 10 if you haven t already Homework Homework 5 is due Thursday Database Design and Web Implementation 3

4 On Today s Menu Creating tables Inserting data Selecting Data Updating Data Deleting Data Database Design and Web Implementation 4

5 Create Table Syntax CREATE TABLE [table_name] ( [column_name] [column_type] [column_details], KEY([column_name(s)], UNIQUE KEY([column_name(s)], PRIMARY KEY([column_name(s)], FOREIGN KEY ([column_name]) REFERENCES [table_name]([column_name]) ) ENGINE=[engine] DEFAULT CHARSET=[charset] COLLATE=[collation]; Database Design and Web Implementation 5

6 Create Table Syntax [column_name] [column_type] [column_details] CREATE TABLE example ( example_id int(11) NOT AUTO_INCREMENT, example_col1 varchar(255) DEFAULT Evan, example_col2 timestamp NOT DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ); Database Design and Web Implementation 6

7 Create Table Syntax KEYS!! CREATE TABLE example ( example_id int(11) NOT AUTO_INCREMENT, example_col1 varchar(255) DEFAULT Evan, example_col2 timestamp NOT DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY_KEY (example_id), UNIQUE KEY(example_col1), KEY(example_col2) ); Database Design and Web Implementation 7

8 Create Table Syntax Engine, Charset, Collate CREATE TABLE example ( example_id int(11) NOT AUTO_INCREMENT, example_col1 varchar(255) DEFAULT Evan, example_col2 timestamp NOT DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci; Database Design and Web Implementation 8

9 Data Types Type {storage} Name Range Attributes Default Numeric {1 byte} Numeric {2 bytes} Numeric {3 bytes} Numeric {4 bytes} Numeric {8 bytes} Numeric {4 or 8} Numeric {4 bytes} Numeric {8 bytes} Numeric {M+2} Bit {8 bytes} TINYINT[(M)] -128 TO 127 [0 to 255 if UNSIGNED] SMALLINT[(M)] -32,768 to 32,767 [0 to 65,535] MEDIUMINT[(M)] -8,388,608 to 8,388,607 [0 to 16,777,215] INT[(M)] BIGINT[(M)] FLOAT(p) FLOAT[(M,D)] DOUBLE[(M,D)] DECIMAL[(M,[D])] Stored as string BIT[(M)] -2,147,483,648 to 2,147,483,647 [0 to 4,294,967,295] -/+9.223E+18 [0 to 18.45E+18] p= > "FLOAT" p= > "DOUBLE" Min=+/-1.175E-38 Max=+/-3.403E+38 Min=+/-2.225E-308 Max=+/-1.800E+308 Max Range = DOUBLE range Fixed point vs. DOUBLE float Binary. Display by [add zero converting with BIN()]. M=1-64 AUTO_INCREMENT UNSIGNED, ZEROFILL, SERIAL DEFAULT VALUE AUTO_INCREMENT, UNSIGNED, ZEROFILL, SERIAL DEFAULT VALUE AUTO_INCREMENT, UNSIGNED, ZEROFILL, SERIAL DEFAULT VALUE AUTO_INCREMENT, UNSIGNED, ZEROFILL, SERIAL DEFAULT VALUE AUTO_INCREMENT, UNSIGNED, ZEROFILL UNSIGNED, ZEROFILL UNSIGNED, ZEROFILL UNSIGNED, ZEROFILL UNSIGNED, ZEROFILL Prior to 5.03 TINYINT(1) Synonym Source: [0 if NOT ] [0 if NOT ] [0 if NOT ] [0 if NOT ] [0 if NOT ] [0 if NOT ] [0 if NOT ] [0 if NOT ] [0 if NOT ] [0 if NOT ] Database Design and Web Implementation 9

10 Data Types Type {storage} Name Range Attributes Default String {M char's} String {M char's1} String {#char's1} String {#char's1} String {#char's1} String {#char's1} CHAR[(M)] VARCHAR(M) M=0-255 Characters, FIXED. Right padded with spaces. M=0-65,535 Characters M=0-255 <v5.0.3 BINARY, CHARACTER SET BINARY, CHARACTER SET [ if NOT ] [ if NOT ] TINYTEXT Characters BINARY, CHARACTER SET ["" if NOT ] TEXT2 0-65,535 Char's BINARY, CHARACTER SET ["" if NOT ] MEDIUMTEXT2 0-16,777,215 Char's BINARY, CHARACTER SET ["" if NOT ] LONGTEXT2 0-4,294,967,295 Char's BINARY, CHARACTER SET ["" if NOT ] Source: Database Design and Web Implementation 10

11 Data Types Type {storage} Name Range Attributes Default String {M bytes} String {M bytes} String {#bytes1} String {#bytes1} String {#bytes1} String {#bytes1} String {1-2 bytes} BINARY[(M)] M=0-255 bytes, FIXED. Global Only (case sensitive) VARBINARY(M) 0-65,535 bytes M=0-255 <v5.0.3 Global Only (case sensitive) TINYBLOB bytes Global Only (case sensitive) BLOB 0-65,535 bytes Global Only (case sensitive) MEDIUMBLOB 0-16,777,215 bytes Global Only (case sensitive) LONGBLOB 0-4,294,967,295 bytes Global Only (case sensitive) ENUM2 ("A1","A2",...) Column is exactly 1 of values (1-255 values) CHARACTER SET ["" if NOT ] ["" if NOT ] [ if NOT ] [ if NOT ] [ if NOT ] [ if NOT ] [ if NOT ] Source: Database Design and Web Implementation 11

12 Data Types Type {storage} Name Range Attributes Default Date & Time {3 bytes} Date & Time {8 bytes} Date & Time {3 bytes} Date & Time {4 bytes} Date & Time {1 bytes} DATE " " - " " Global Only (YYYY-MM-DD) DATETIME " :00:00" - " :59:59" TIME "-838:59:59" - "838:59:59" Global Only (hh:mm:ss) TIMESTAMP Global Only (YYYY-MM-DD hh:mm:ss) Global Only (YYYYMMDDhhmmss) YEAR Global Only (YYYY) [" " if NOT ] [" :00:00" if NOT ] ["00:00:00 " if NOT ] Current Date & Time ["0000" if NOT ] Source: Database Design and Web Implementation 12

13 Article Data { "authors": { "person": [ "Peter APPLEBOME" ] }, "body": "Christopher S. Murphy, a 39-year-old three-term congressman, defeated the former wrestling executive Linda E. McMahon in a long and bitter Senate race.", "headline": "Democrat Elected Senator in Costly Connecticut Race", "publication_date": " ", "section": "U.S.", "tags": { "DES": [ "United States Politics and Government", "Voting and Voters" ], "GEO": [ "Connecticut" ], "ORG": [ "Senate" ], "PER": [ "Murphy, Christopher Scott", "McMahon, Linda E" ] } } Database Design and Web Implementation 13

14 Database Design and Web Implementation 14

15 CREATE TABLE CREATE TABLE `section` ( `section_name` VARCHAR(45), PRIMARY KEY (`section_name`) ) ENGINE = InnoDB; CREATE TABLE IF `author` ( `author_id` INT NOT AUTO_INCREMENT, `author_name` VARCHAR(255) NOT, `author_type` ENUM('PER','ORG') NOT, PRIMARY KEY (`author_id`) ) ENGINE = InnoDB; Database Design and Web Implementation 15

16 CREATE TABLE CREATE TABLE `tag` ( `tag_id` INT NOT AUTO_INCREMENT, `tag` VARCHAR(255) NOT, `tag_type` ENUM('PER','ORG','GEO','DES','TTL') NOT, PRIMARY KEY (`tag_id`) ) ENGINE = InnoDB; Database Design and Web Implementation 16

17 CREATE TABLE CREATE TABLE `article` ( `article_id` INT NOT AUTO_INCREMENT, `article_headline` VARCHAR(255) NOT, `article_publication_date` DATETIME NOT, `article_body` MEDIUMTEXT NOT, `section` VARCHAR(255) NOT, `article_correction` TEXT, PRIMARY KEY (`article_id`), FOREIGN KEY (`section` ) REFERENCES `section` (`section_name` )) ENGINE = InnoDB; Database Design and Web Implementation 17

18 CREATE TABLE CREATE TABLE `article_tag` ( `article_id` INT NOT, `tag_id` INT NOT, PRIMARY KEY (`article_id`, `tag_id`), FOREIGN KEY (`article_id` ) REFERENCES `article` (`article_id` ) FOREIGN KEY (`tag_id` ) REFERENCES `tag` (`tag_id` )) ENGINE = InnoDB; Database Design and Web Implementation 18

19 CREATE TABLE CREATE TABLE `article_author` ( `article_id` INT NOT, `author_id` INT NOT, PRIMARY KEY (`article_id`, `author_id`), FOREIGN KEY (`article_id` ) REFERENCES `article` (`article_id` ) FOREIGN KEY (`author_id` ) REFERENCES `author` (`author_id` )) ENGINE = InnoDB; Database Design and Web Implementation 19

20 INSERT Syntax INSERT INTO [table_name] (column_1, column_2,...) VALUES (value_1, value_2,...); Database Design and Web Implementation 20

21 INSERT Syntax INSERT INTO [table_name] (column_1, column_2,...) VALUES (value_1, value_2,...), (value_1, value_2,...), (value_1, value_2,...), (value_1, value_2,...), (value_1, value_2,...); Database Design and Web Implementation 21

22 Inserting Test Data Insert test article, tag, author and section. Database Design and Web Implementation 22

23 Loading Data LOAD DATA LOCAL INFILE "[file_name]" INTO TABLE [table_name]( [column_1], [column_2],... [column_n] ); Database Design and Web Implementation 23

24 Loading Data - From CSV LOAD DATA LOCAL INFILE "[file_name]" INTO TABLE [table_name]( [column_1]... [column_n] ) FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' Database Design and Web Implementation 24

25 Simple Select Statement SELECT * FROM table LIMIT x OFFSET y Database Design and Web Implementation 25

26 Simple Select Statement SELECT row_1, row_2,... FROM table_1, table_2,... WHERE condition_1 (AND OR) condition_2 (AND OR)... Database Design and Web Implementation 26

27 Simple Select Statement with order by SELECT row_1, row_2,... FROM table_1, table_2,... WHERE condition_1 (AND OR) condition_2 (AND OR) ORDER BY column_1, column_2 Database Design and Web Implementation 27

28 Aggregate Queries SELECT SUM(numeric_column_1), MIN(numeric_column_2), MAX(numeric_column_3), AVG(numeric_column_4), COUNT(numeric_column_5), COUNT(DISTINCT numeric_column_1), FROM table_1... Database Design and Web Implementation 28

29 Aggregate Queries With Group By SELECT SUM(numeric_column_1), other_column_1, FROM table_1 GROUP BY other_column_1 Database Design and Web Implementation 29

30 Select Join Syntax SELECT * FROM table_1 JOIN table_2 ON table_1.id = table_2.id Database Design and Web Implementation 30

31 Select Alternate Join Syntax SELECT * FROM table_1, table_2 WHERE table_1.id = table_2.id Database Design and Web Implementation 31

32 Select Alternate Join Syntax SELECT * FROM table_1, table_2, table_3 WHERE table_1.id = table_2.id AND table_2.id = table_3.id Database Design and Web Implementation 32

33 Select CONCAT SELECT CONCAT(column_1,glue_1,column_2) FROM table_1; Database Design and Web Implementation 33

34 Select Subselect SELECT column_1 FROM table_1; WHERE column_n < (SELECT FUNC(*) FROM table); Database Design and Web Implementation 34

35 Query Me This How many tags are there of each type? How many authors are there of each type? Find the article with the most tags? Find the most commonly applied tag? How many articles are authored by more than one author? How many articles are authored by organizations services? Database Design and Web Implementation 35

36 UPDATE Syntax UPDATE [table_name] SET [column_1] = [value_1] [column_2] = [value_2] WHERE [condition_1] [(AND OR) condition_2] [(AND OR) condition_3]... [(AND OR) condition_n] Database Design and Web Implementation 36

37 DELETE Syntax DELETE FROM [table_name] WHERE [condition_1] [(AND OR) condition_2] [(AND OR) condition_3]... [(AND OR) condition_n] Database Design and Web Implementation 37

CSCI-UA: Database Design & Web Implementation. Professor Evan Sandhaus

CSCI-UA: Database Design & Web Implementation. Professor Evan Sandhaus CSCI-UA:0060-02 Database Design & Web Implementation Professor Evan Sandhaus sandhaus@cs.nyu.edu evan@nytimes.com Lecture #10: Open Office Base, Life on the Console, MySQL Database Design and Web Implementation

More information

CSCI-UA: Database Design & Web Implementation. Professor Evan Sandhaus

CSCI-UA: Database Design & Web Implementation. Professor Evan Sandhaus CSCI-UA:0060-02 Database Design & Web Implementation Professor Evan Sandhaus sandhaus@cs.nyu.edu evan@nytimes.com Lecture #16: JOIN, SELECT, UPDATE DELETE Database Design and Web Implementation Database

More information

TINYINT[(M)] [UNSIGNED] [ZEROFILL] A very small integer. The signed range is -128 to 127. The unsigned range is 0 to 255.

TINYINT[(M)] [UNSIGNED] [ZEROFILL] A very small integer. The signed range is -128 to 127. The unsigned range is 0 to 255. MySQL: Data Types 1. Numeric Data Types ZEROFILL automatically adds the UNSIGNED attribute to the column. UNSIGNED disallows negative values. SIGNED (default) allows negative values. BIT[(M)] A bit-field

More information

Lab # 2 Hands-On. DDL Basic SQL Statements Institute of Computer Science, University of Tartu, Estonia

Lab # 2 Hands-On. DDL Basic SQL Statements Institute of Computer Science, University of Tartu, Estonia Lab # 2 Hands-On DDL Basic SQL Statements Institute of Computer Science, University of Tartu, Estonia Part A: Demo by Instructor in Lab a. Data type of MySQL b. CREATE table c. ALTER table (ADD, CHANGE,

More information

CSCI-UA: Database Design & Web Implementation. Professor Evan Sandhaus Lecture #17: MySQL Gets Done

CSCI-UA: Database Design & Web Implementation. Professor Evan Sandhaus  Lecture #17: MySQL Gets Done CSCI-UA:0060-02 Database Design & Web Implementation Professor Evan Sandhaus sandhaus@cs.nyu.edu evan@nytimes.com Lecture #17: MySQL Gets Done Database Design and Web Implementation Database Design and

More information

General References on SQL (structured query language) SQL tutorial.

General References on SQL (structured query language) SQL tutorial. Week 8 Relational Databases Reading DBI - Database programming with Perl Appendix A and B, Ch 1-5 General References on SQL (structured query language) SQL tutorial http://www.w3schools.com/sql/default.asp

More information

The M in LAMP: MySQL CSCI 470: Web Science Keith Vertanen Copyright 2014

The M in LAMP: MySQL CSCI 470: Web Science Keith Vertanen Copyright 2014 The M in LAMP: MySQL CSCI 470: Web Science Keith Vertanen Copyright 2014 MySQL Setup, using console Data types Overview Creating users, databases and tables SQL queries INSERT, SELECT, DELETE WHERE, ORDER

More information

Chapter 8 How to work with data types

Chapter 8 How to work with data types Chapter 8 How to work with data types Murach's MySQL, C8 2015, Mike Murach & Associates, Inc. Slide 1 Objectives Applied Code queries that convert data from one data type to another. Knowledge Describe

More information

Chapter 3 Introduction to relational databases and MySQL

Chapter 3 Introduction to relational databases and MySQL Chapter 3 Introduction to relational databases and MySQL Murach's PHP and MySQL, C3 2014, Mike Murach & Associates, Inc. Slide 1 Objectives Applied 1. Use phpmyadmin to review the data and structure of

More information

Introduction to SQL on GRAHAM ED ARMSTRONG SHARCNET AUGUST 2018

Introduction to SQL on GRAHAM ED ARMSTRONG SHARCNET AUGUST 2018 Introduction to SQL on GRAHAM ED ARMSTRONG SHARCNET AUGUST 2018 Background Information 2 Background Information What is a (Relational) Database 3 Dynamic collection of information. Organized into tables,

More information

CSCI-UA: Database Design & Web Implementation. Professor Evan Sandhaus

CSCI-UA: Database Design & Web Implementation. Professor Evan Sandhaus CSCI-UA:0060-02 Database Design & Web Implementation Professor Evan Sandhaus sandhaus@cs.nyu.edu evan@nytimes.com Lecture #28: This is the end - the only end my friends. Database Design and Web Implementation

More information

Data Types in MySQL CSCU9Q5. MySQL. Data Types. Consequences of Data Types. Common Data Types. Storage size Character String Date and Time.

Data Types in MySQL CSCU9Q5. MySQL. Data Types. Consequences of Data Types. Common Data Types. Storage size Character String Date and Time. - Database P&A Data Types in MySQL MySQL Data Types Data types define the way data in a field can be manipulated For example, you can multiply two numbers but not two strings We have seen data types mentioned

More information

Overview of MySQL Structure and Syntax [2]

Overview of MySQL Structure and Syntax [2] PHP PHP MySQL Database Overview of MySQL Structure and Syntax [2] MySQL is a relational database system, which basically means that it can store bits of information in separate areas and link those areas

More information

CSCI-UA: Database Design & Web Implementation. Professor Evan Sandhaus Lecture #23: SQLite

CSCI-UA: Database Design & Web Implementation. Professor Evan Sandhaus  Lecture #23: SQLite CSCI-UA:0060-02 Database Design & Web Implementation Professor Evan Sandhaus sandhaus@cs.nyu.edu evan@nytimes.com Lecture #23: SQLite Database Design and Web Implementation Administrivia! Homework HW 8

More information

Data and Tables. Bok, Jong Soon

Data and Tables. Bok, Jong Soon Data and Tables Bok, Jong Soon Jongsoon.bok@gmail.com www.javaexpert.co.kr Learning MySQL Language Structure Comments and portability Case-sensitivity Escape characters Naming limitations Quoting Time

More information

More MySQL ELEVEN Walkthrough examples Walkthrough 1: Bulk loading SESSION

More MySQL ELEVEN Walkthrough examples Walkthrough 1: Bulk loading SESSION SESSION ELEVEN 11.1 Walkthrough examples More MySQL This session is designed to introduce you to some more advanced features of MySQL, including loading your own database. There are a few files you need

More information

Basis Data Terapan. Yoannita

Basis Data Terapan. Yoannita Basis Data Terapan Yoannita SQL Server Data Types Character strings: Data type Description Storage char(n) varchar(n) varchar(max) text Fixed-length character string. Maximum 8,000 characters Variable-length

More information

Data Definition Language with mysql. By Kautsar

Data Definition Language with mysql. By Kautsar Data Definition Language with mysql By Kautsar Outline Review Create/Alter/Drop Database Create/Alter/Drop Table Create/Alter/Drop View Create/Alter/Drop User Kautsar -2 Review Database A container (usually

More information

Careerarm.com. 1. What is MySQL? MySQL is an open source DBMS which is built, supported and distributed by MySQL AB (now acquired by Oracle)

Careerarm.com. 1. What is MySQL? MySQL is an open source DBMS which is built, supported and distributed by MySQL AB (now acquired by Oracle) 1. What is MySQL? MySQL is an open source DBMS which is built, supported and distributed by MySQL AB (now acquired by Oracle) 2. What are the technical features of MySQL? MySQL database software is a client

More information

Tool/Web URL Features phpmyadmin. More on phpmyadmin under User Intefaces. MySQL Query Browser

Tool/Web URL Features phpmyadmin.   More on phpmyadmin under User Intefaces. MySQL Query Browser To store data in MySQL, we will set up a database and then place tables, relationships and other objects in that database, following a design that maps to our application requirements. We will use a command-line

More information

Advanced SQL. Nov 21, CS445 Pacific University 1

Advanced SQL. Nov 21, CS445 Pacific University 1 Advanced SQL Nov 21, 2017 http://zeus.cs.pacificu.edu/chadd/cs445f17/advancedsql.tar.gz Pacific University 1 Topics Views Triggers Stored Procedures Control Flow if / case Binary Data Pacific University

More information

CSCI-UA: Database Design & Web Implementation. Professor Evan Sandhaus

CSCI-UA: Database Design & Web Implementation. Professor Evan Sandhaus CSCI-UA:0060-02 Database Design & Web Implementation Professor Evan Sandhaus sandhaus@cs.nyu.edu evan@nytimes.com Lecture #10: Open Office Base, Life on the Console, MySQL Database Design and Web Implementation

More information

*this is a guide that was created from lecture videos and is used to help you gain an understanding of what is mysql used for.

*this is a guide that was created from lecture videos and is used to help you gain an understanding of what is mysql used for. mysql. 1 what is mysql used for. *this is a guide that was created from lecture videos and is used to help you gain an understanding of what is mysql used for. MySQL Installation MySQL is an open source

More information

Create Basic Databases and Integrate with a Website Lesson 1

Create Basic Databases and Integrate with a Website Lesson 1 Create Basic Databases and Integrate with a Website Lesson 1 Getting Started with Web (SQL) Databases In order to make a web database, you need three things to work in cooperation. You need a web server

More information

Oracle SQL Developer. Supplementary Information for MySQL Migrations Release 2.1 E

Oracle SQL Developer. Supplementary Information for MySQL Migrations Release 2.1 E Oracle SQL Developer Supplementary Information for MySQL Migrations Release 2.1 E15225-01 December 2009 This document contains information for migrating from MySQL to Oracle. It supplements the information

More information

Acknowledgments About the Authors

Acknowledgments About the Authors Acknowledgments p. xi About the Authors p. xiii Introduction p. xv An Overview of MySQL p. 1 Why Use an RDBMS? p. 2 Multiuser Access p. 2 Storage Transparency p. 2 Transactions p. 3 Searching, Modifying,

More information

MySQL Introduction. By Prof. B.A.Khivsara

MySQL Introduction. By Prof. B.A.Khivsara MySQL Introduction By Prof. B.A.Khivsara Note: The material to prepare this presentation has been taken from internet and are generated only for students reference and not for commercial use. Introduction

More information

Standard Query Language: Current standard Logical Schema Design: Schema Definition with SQL (DDL)

Standard Query Language: Current standard Logical Schema Design: Schema Definition with SQL (DDL) Standard Query Language: Current standard Logical Schema Design: Schema Definition with SQL (DDL) 1999: standard (ANSI SQL-3) about 2200 pages as full standard SQL history and standards SQL type system

More information

DB Programming. Database Systems

DB Programming. Database Systems DB Programming Database Systems 1 Agenda MySQL data types Altering the Schema More Advanced MySQL JDBC DB Coding Tips 2 MySQL Data Types There are 3 main groups of types: Numeric Date String http://dev.mysql.com/doc/refman/5.6/en/data-types.html

More information

Selections. Lecture 4 Sections Robb T. Koether. Hampden-Sydney College. Wed, Jan 22, 2014

Selections. Lecture 4 Sections Robb T. Koether. Hampden-Sydney College. Wed, Jan 22, 2014 Selections Lecture 4 Sections 4.2-4.3 Robb T. Koether Hampden-Sydney College Wed, Jan 22, 2014 Robb T. Koether (Hampden-Sydney College) Selections Wed, Jan 22, 2014 1 / 38 1 Datatypes 2 Constraints 3 Storage

More information

Vidya Pratishthan s College Of Engineering, Baramati. Laboratory Manual Database Management System Laboratory

Vidya Pratishthan s College Of Engineering, Baramati. Laboratory Manual Database Management System Laboratory Vidya Pratishthan s College Of Engineering, Baramati Laboratory Manual Database Management System Laboratory Third Year - Information Technology (2012) Examination Scheme Practical: 50 marks Oral: 50 Marks

More information

MySQL Schema Best Practices

MySQL Schema Best Practices MySQL Schema Best Practices 2 Agenda Introduction 3 4 Introduction - Sample Schema Key Considerations 5 Data Types 6 Data Types [root@plive-2017-demo plive_2017]# ls -alh action*.ibd -rw-r-----. 1 mysql

More information

MySQL: an application

MySQL: an application Data Types and other stuff you should know in order to amaze and dazzle your friends at parties after you finally give up that dream of being a magician and stop making ridiculous balloon animals and begin

More information

EE 495M - Lecture 3. Overview

EE 495M - Lecture 3. Overview EE 495M - Lecture 3 mysql and PHP Mustafa Kamasak September 10, 2003 Overview Database Tier (MySQL) SQL Logic Tier (PHP) Web Server Presentation Tier (Browsers) MySQL SQL PHP MySQL & PHP interface MySQL

More information

Introduction to MySQL /MariaDB and SQL Basics. Read Chapter 3!

Introduction to MySQL /MariaDB and SQL Basics. Read Chapter 3! Introduction to MySQL /MariaDB and SQL Basics Read Chapter 3! http://dev.mysql.com/doc/refman/ https://mariadb.com/kb/en/the-mariadb-library/documentation/ MySQL / MariaDB 1 College Database E-R Diagram

More information

MySQL by Examples for Beginners

MySQL by Examples for Beginners yet another insignificant programming notes... HOME MySQL by Examples for Beginners Read "How to Install MySQL and Get Started" on how to install, customize, and get started with MySQL. 1. Summary of MySQL

More information

MySQL Schema Review 101

MySQL Schema Review 101 MySQL Schema Review 101 How and What you should be looking at... Mike Benshoof - Technical Account Manager, Percona Agenda Introduction Key things to consider and review Tools to isolate issues Common

More information

Basic SQL. Basic SQL. Basic SQL

Basic SQL. Basic SQL. Basic SQL Basic SQL Dr Fawaz Alarfaj Al Imam Mohammed Ibn Saud Islamic University ACKNOWLEDGEMENT Slides are adopted from: Elmasri & Navathe, Fundamentals of Database Systems MySQL Documentation Basic SQL Structured

More information

This lab will introduce you to MySQL. Begin by logging into the class web server via SSH Secure Shell Client

This lab will introduce you to MySQL. Begin by logging into the class web server via SSH Secure Shell Client Lab 2.0 - MySQL CISC3140, Fall 2011 DUE: Oct. 6th (Part 1 only) Part 1 1. Getting started This lab will introduce you to MySQL. Begin by logging into the class web server via SSH Secure Shell Client host

More information

Percona XtraDB: Compressed Columns with Dictionaries an alternative to InnoDB table compression. Yura Sorokin, Senior Software Engineer at Percona

Percona XtraDB: Compressed Columns with Dictionaries an alternative to InnoDB table compression. Yura Sorokin, Senior Software Engineer at Percona Percona XtraDB: Compressed Columns with Dictionaries an alternative to InnoDB table compression Yura Sorokin, Senior Software Engineer at Percona Existing compression methods Overview Existing compression

More information

Mysql Information Schema Update Time Null >>>CLICK HERE<<< doctrine:schema:update --dump-sql ALTER TABLE categorie

Mysql Information Schema Update Time Null >>>CLICK HERE<<< doctrine:schema:update --dump-sql ALTER TABLE categorie Mysql Information Schema Update Time Null I want to update a MySQL database schema (with MySQL code) but I am unfortunately not sure 'name' VARCHAR(64) NOT NULL 'password' VARCHAR(64) NOT NULL fieldname

More information

SQL: Concepts. Todd Bacastow IST 210: Organization of Data 2/17/ IST 210

SQL: Concepts. Todd Bacastow IST 210: Organization of Data 2/17/ IST 210 SQL: Concepts Todd Bacastow IST 210: Organization of Data 2/17/2004 1 Design questions How many entities are there? What are the major entities? What are the attributes of each entity? Is there a unique

More information

Exact Numeric Data Types

Exact Numeric Data Types SQL Server Notes for FYP SQL data type is an attribute that specifies type of data of any object. Each column, variable and expression has related data type in SQL. You would use these data types while

More information

Percona XtraDB: Compressed Columns with Dictionaries an alternative to InnoDB table compression. Yura Sorokin, Senior Software Engineer at Percona

Percona XtraDB: Compressed Columns with Dictionaries an alternative to InnoDB table compression. Yura Sorokin, Senior Software Engineer at Percona Percona XtraDB: Compressed Columns with Dictionaries an alternative to InnoDB table compression Yura Sorokin, Senior Software Engineer at Percona Existing compression methods Overview Existing compression

More information

Programming and Database Fundamentals for Data Scientists

Programming and Database Fundamentals for Data Scientists Programming and Database Fundamentals for Data Scientists Database Fundamentals Varun Chandola School of Engineering and Applied Sciences State University of New York at Buffalo Buffalo, NY, USA chandola@buffalo.edu

More information

Basic SQL. Dr Fawaz Alarfaj. ACKNOWLEDGEMENT Slides are adopted from: Elmasri & Navathe, Fundamentals of Database Systems MySQL Documentation

Basic SQL. Dr Fawaz Alarfaj. ACKNOWLEDGEMENT Slides are adopted from: Elmasri & Navathe, Fundamentals of Database Systems MySQL Documentation Basic SQL Dr Fawaz Alarfaj Al Imam Mohammed Ibn Saud Islamic University ACKNOWLEDGEMENT Slides are adopted from: Elmasri & Navathe, Fundamentals of Database Systems MySQL Documentation MIDTERM EXAM 2 Basic

More information

DATABASE MANAGEMENT SYSTEMS

DATABASE MANAGEMENT SYSTEMS DATABASE MANAGEMENT SYSTEMS Associate Professor Dr. Raed Ibraheem Hamed University of Human Development, College of Science and Technology Departments of IT and Computer Science 2015 2016 1 The ALTER TABLE

More information

Advanced MySQL Query Tuning

Advanced MySQL Query Tuning Advanced MySQL Query Tuning Alexander Rubin August 6, 2014 About Me My name is Alexander Rubin Working with MySQL for over 10 years Started at MySQL AB, then Sun Microsystems, then Oracle (MySQL Consulting)

More information

Writing High Performance SQL Statements. Tim Sharp July 14, 2014

Writing High Performance SQL Statements. Tim Sharp July 14, 2014 Writing High Performance SQL Statements Tim Sharp July 14, 2014 Introduction Tim Sharp Technical Account Manager Percona since 2013 16 years working with Databases Optimum SQL Performance Schema Indices

More information

Lecture 1. Monday, August 25, 2014

Lecture 1. Monday, August 25, 2014 Lecture 1 Monday, August 25, 2014 What is a database? General definition: An organized collection of information. 1 Different Types of Databases Flat file o A one-table database o Usually loaded into a

More information

Simple Quesries in SQL & Table Creation and Data Manipulation

Simple Quesries in SQL & Table Creation and Data Manipulation Simple Quesries in SQL & Table Creation and Data Manipulation Based on CBSE Curriculum Class -11 By- Neha Tyagi PGT CS KV 5 Jaipur II Shift Jaipur Region Neha Tyagi, PGT CS II Shift Jaipur Introduction

More information

Chapter 9: MySQL for Server-Side Data Storage

Chapter 9: MySQL for Server-Side Data Storage Chapter 9: MySQL for Server-Side Data Storage General Notes on the Slides for This Chapter In many slides you will see webbook as a database name. That was the orginal name of our database. For this second

More information

ALTER TABLE Improvements in MARIADB Server. Marko Mäkelä Lead Developer InnoDB MariaDB Corporation

ALTER TABLE Improvements in MARIADB Server. Marko Mäkelä Lead Developer InnoDB MariaDB Corporation ALTER TABLE Improvements in MARIADB Server Marko Mäkelä Lead Developer InnoDB MariaDB Corporation Generic ALTER TABLE in MariaDB CREATE TABLE ; INSERT SELECT; RENAME ; DROP TABLE ; Retroactively named

More information

MTAT Introduction to Databases

MTAT Introduction to Databases MTAT.03.105 Introduction to Databases Lecture #6 Constraints Ljubov Jaanuska (ljubov.jaanuska@ut.ee) Lecture 5. Summary E-R model according to Crow s Foot notation Model normalization Lecture 2-3. What

More information

CIS 363 MySQL. Chapter 4 MySQL Connectors Chapter 5 Data Types Chapter 6 Identifiers

CIS 363 MySQL. Chapter 4 MySQL Connectors Chapter 5 Data Types Chapter 6 Identifiers CIS 363 MySQL Chapter 4 MySQL Connectors Chapter 5 Data Types Chapter 6 Identifiers Ch. 4 MySQL Connectors *** Chapter 3 MySQL Query Browser is Not covered on MySQL certification exam. For details regarding

More information

High Performance MySQL Practical Tuesday, April 01, :45

High Performance MySQL Practical Tuesday, April 01, :45 High Performance MySQL Practical Tuesday, April 01, 2014 16:45 1. Optimal Data Types: a. Choose Data Type Suggestion: i. Smaller is usually better ii. Simple is good iii. Avoid NULL if possible b. MySQL

More information

The Top 20 Design Tips

The Top 20 Design Tips The Top 20 Design Tips For MySQL Enterprise Data Architects Ronald Bradford COO PrimeBase Technologies April 2008 Presented Version By: 1.1 Ronald 10.Apr.2008 Bradford 1. Know Your Technology Tools Generics

More information

CS 327E Lecture 11. Shirley Cohen. March 2, 2016

CS 327E Lecture 11. Shirley Cohen. March 2, 2016 CS 327E Lecture 11 Shirley Cohen March 2, 2016 Agenda Announcements Readings for today Reading Quiz Concept Questions Homework for next time Announcements Midterm 2 will be next Wednesday There will be

More information

Chapter 13 : Informatics Practices. Class XI ( As per CBSE Board) SQL Commands. New Syllabus Visit : python.mykvs.in for regular updates

Chapter 13 : Informatics Practices. Class XI ( As per CBSE Board) SQL Commands. New Syllabus Visit : python.mykvs.in for regular updates Chapter 13 : Informatics Practices Class XI ( As per CBSE Board) SQL Commands New Syllabus 2018-19 SQL SQL is an acronym of Structured Query Language.It is a standard language developed and used for accessing

More information

MySQL 101. Designing effective schema for InnoDB. Yves Trudeau April 2015

MySQL 101. Designing effective schema for InnoDB. Yves Trudeau April 2015 MySQL 101 Designing effective schema for InnoDB Yves Trudeau April 2015 About myself : Yves Trudeau Principal architect at Percona since 2009 With MySQL then Sun, 2007 to 2009 Focus on MySQL HA and distributed

More information

SQL. Often times, in order for us to build the most functional website we can, we depend on a database to store information.

SQL. Often times, in order for us to build the most functional website we can, we depend on a database to store information. Often times, in order for us to build the most functional website we can, we depend on a database to store information. If you ve ever used Microsoft Excel or Google Spreadsheets (among others), odds are

More information

SQL Fundamentals. Chapter 3. Class 03: SQL Fundamentals 1

SQL Fundamentals. Chapter 3. Class 03: SQL Fundamentals 1 SQL Fundamentals Chapter 3 Class 03: SQL Fundamentals 1 Class 03: SQL Fundamentals 2 SQL SQL (Structured Query Language): A language that is used in relational databases to build and query tables. Earlier

More information

Oral Questions and Answers (DBMS LAB) Questions & Answers- DBMS

Oral Questions and Answers (DBMS LAB) Questions & Answers- DBMS Questions & Answers- DBMS https://career.guru99.com/top-50-database-interview-questions/ 1) Define Database. A prearranged collection of figures known as data is called database. 2) What is DBMS? Database

More information

SQL Functionality SQL. Creating Relation Schemas. Creating Relation Schemas

SQL Functionality SQL. Creating Relation Schemas. Creating Relation Schemas SQL SQL Functionality stands for Structured Query Language sometimes pronounced sequel a very-high-level (declarative) language user specifies what is wanted, not how to find it number of standards original

More information

How to Use JSON in MySQL Wrong

How to Use JSON in MySQL Wrong How to Use JSON in MySQL Wrong Bill Karwin, Square Inc. October, 2018 1 Me Database Developer at Square Inc. MySQL Quality Contributor Author of SQL Antipatterns: Avoiding the Pitfalls of Database Programming

More information

3.2.4 Enforcing constraints

3.2.4 Enforcing constraints 3.2.4 Enforcing constraints Constraints SQL definition of the schema Up to now: primary Key, foreign key, NOT NULL Different kinds of integrity constraints value constraints on attributes cardinalities

More information

Deepak Bhinde PGT Comp. Sc.

Deepak Bhinde PGT Comp. Sc. Deepak Bhinde PGT Comp. Sc. SQL Elements in MySQL Literals: Literals refers to the fixed data value. It may be Numeric or Character. Numeric literals may be integer or real numbers and Character literals

More information

tablename ORDER BY column ASC tablename ORDER BY column DESC sortingorder, } The WHERE and ORDER BY clauses can be combined in one

tablename ORDER BY column ASC tablename ORDER BY column DESC sortingorder, } The WHERE and ORDER BY clauses can be combined in one } The result of a query can be sorted in ascending or descending order using the optional ORDER BY clause. The simplest form of an ORDER BY clause is SELECT columnname1, columnname2, FROM tablename ORDER

More information

SQL Data Definition and Data Manipulation Languages (DDL and DML)

SQL Data Definition and Data Manipulation Languages (DDL and DML) .. Cal Poly CPE/CSC 365: Introduction to Database Systems Alexander Dekhtyar.. SQL Data Definition and Data Manipulation Languages (DDL and DML) Note: This handout instroduces both the ANSI SQL synatax

More information

What is MySQL? [Document provides the fundamental operations of PHP-MySQL connectivity]

What is MySQL? [Document provides the fundamental operations of PHP-MySQL connectivity] What is MySQL? [Document provides the fundamental operations of PHP-MySQL connectivity] MySQL is a database. A database defines a structure for storing information. In a database, there are tables. Just

More information

MySQL Workshop. Scott D. Anderson

MySQL Workshop. Scott D. Anderson MySQL Workshop Scott D. Anderson Workshop Plan Part 1: Simple Queries Part 2: Creating a database: creating a table inserting, updating and deleting data handling NULL values datatypes Part 3: Joining

More information

Mysql Insert Manual Datetime Format Dd Mm Yyyy

Mysql Insert Manual Datetime Format Dd Mm Yyyy Mysql Insert Manual Datetime Format Dd Mm Yyyy This brings up the datepicker, and enters the date in dd/mm/yy. I'm trying to save this 'yy-mmdd' )). This function will come up with MySQL Date-Time format.

More information

Data Storage and Query Answering. Data Storage and Disk Structure (4)

Data Storage and Query Answering. Data Storage and Disk Structure (4) Data Storage and Query Answering Data Storage and Disk Structure (4) Introduction We have introduced secondary storage devices, in particular disks. Disks use blocks as basic units of transfer and storage.

More information

Server 2 - MySQL #1 Lab

Server 2 - MySQL #1 Lab Server-Configuration-2-MySQL-1-HW.docx CSCI 2320 Initials P a g e 1 If this lab is an Individual assignment, you must do all coded programs on your own. You may ask others for help on the language syntax,

More information

Lab # 4. Data Definition Language (DDL)

Lab # 4. Data Definition Language (DDL) Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4113: Lab # 4 Data Definition Language (DDL) Eng. Haneen El-Masry November, 2014 2 Objective To be familiar with

More information

MySQL and MariaDB. March, Introduction 3

MySQL and MariaDB. March, Introduction 3 MySQL and MariaDB March, 2018 Contents 1 Introduction 3 2 Starting SQL 3 3 Databases 3 i. See what databases exist........................... 3 ii. Select the database to use for subsequent instructions..........

More information

GridDB Advanced Edition SQL reference

GridDB Advanced Edition SQL reference GMA022C1 GridDB Advanced Edition SQL reference Toshiba Solutions Corporation 2016 All Rights Reserved. Introduction This manual describes how to write a SQL command in the GridDB Advanced Edition. Please

More information

Installing and Configuring Oracle GoldenGate for MySQL 12c (12.1.2)

Installing and Configuring Oracle GoldenGate for MySQL 12c (12.1.2) [1]Oracle GoldenGate Installing and Configuring Oracle GoldenGate for MySQL 12c (12.1.2) E29286-04 May 2015 This document contains installation and initial setup instructions for Oracle GoldenGate for

More information

Database Migration with MySQL Workbench. Alfredo Kojima, Team Lead MySQL Workbench Mike Frank, Product Manager

Database Migration with MySQL Workbench. Alfredo Kojima, Team Lead MySQL Workbench Mike Frank, Product Manager Database Migration with MySQL Workbench Alfredo Kojima, Team Lead MySQL Workbench Mike Frank, Product Manager Copyright Copyright 2014, 2014, Oracle Oracle and/or and/or its its affiliates. affiliates.

More information

MTAT Introduction to Databases

MTAT Introduction to Databases MTAT.03.105 Introduction to Databases Lecture #3 Data Types, Default values, Constraints Ljubov Jaanuska (ljubov.jaanuska@ut.ee) Lecture 1. Summary SQL stands for Structured Query Language SQL is a standard

More information

SAS/ACCESS Supplement for MySQL. SAS/ACCESS for Relational Databases

SAS/ACCESS Supplement for MySQL. SAS/ACCESS for Relational Databases SAS/ACCESS 9.1.3 Supplement for MySQL SAS/ACCESS for Relational Databases The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2006. SAS/ACCESS 9.1.3 Supplement for MySQL

More information

SQL: Data Definition Language

SQL: Data Definition Language SQL: Data Definition Language CSC 343 Winter 2018 MICHAEL LIUT (MICHAEL.LIUT@UTORONTO.CA) DEPARTMENT OF MATHEMATICAL AND COMPUTATIONAL SCIENCES UNIVERSITY OF TORONTO MISSISSAUGA Database Schemas in SQL

More information

Advanced MySQL Query Tuning

Advanced MySQL Query Tuning Advanced MySQL Query Tuning Alexander Rubin July 21, 2013 About Me My name is Alexander Rubin Working with MySQL for over 10 years Started at MySQL AB, then Sun Microsystems, then Oracle (MySQL Consulting)

More information

SQL Commands & Mongo DB New Syllabus

SQL Commands & Mongo DB New Syllabus Chapter 15 : Computer Science Class XI ( As per CBSE Board) SQL Commands & Mongo DB New Syllabus 2018-19 SQL SQL is an acronym of Structured Query Language.It is a standard language developed and used

More information

Outline. Introduction to SQL. What happens when you run an SQL query? There are 6 possible clauses in a select statement. Tara Murphy and James Curran

Outline. Introduction to SQL. What happens when you run an SQL query? There are 6 possible clauses in a select statement. Tara Murphy and James Curran Basic SQL queries Filtering Joining tables Grouping 2 Outline Introduction to SQL Tara Murphy and James Curran 1 Basic SQL queries 2 Filtering 27th March, 2008 3 Joining tables 4 Grouping Basic SQL queries

More information

Introduction to SQL. Tara Murphy and James Curran. 15th April, 2009

Introduction to SQL. Tara Murphy and James Curran. 15th April, 2009 Introduction to SQL Tara Murphy and James Curran 15th April, 2009 Basic SQL queries Filtering Joining tables Grouping 2 What happens when you run an SQL query? ˆ To run an SQL query the following steps

More information

SQL OVERVIEW. CS121: Relational Databases Fall 2017 Lecture 4

SQL OVERVIEW. CS121: Relational Databases Fall 2017 Lecture 4 SQL OVERVIEW CS121: Relational Databases Fall 2017 Lecture 4 SQL 2 SQL = Structured Query Language Original language was SEQUEL IBM s System R project (early 1970 s) Structured English Query Language Caught

More information

Senturus Analytics Connector. User Guide Cognos to Power BI Senturus, Inc. Page 1

Senturus Analytics Connector. User Guide Cognos to Power BI Senturus, Inc. Page 1 Senturus Analytics Connector User Guide Cognos to Power BI 2019-2019 Senturus, Inc. Page 1 Overview This guide describes how the Senturus Analytics Connector is used from Power BI after it has been configured.

More information

Data File Header Structure for the dbase Version 7 Table File

Data File Header Structure for the dbase Version 7 Table File Page 1 of 5 Data File Header Structure for the dbase Version 7 Table File Note: Unless prefaced by "0x", all s specified in the Description column of the following tables are decimal. 1.1 Table File Header

More information

MySQL Creating a Database Lecture 3

MySQL Creating a Database Lecture 3 MySQL Creating a Database Lecture 3 Robb T Koether Hampden-Sydney College Mon, Jan 23, 2012 Robb T Koether (Hampden-Sydney College) MySQL Creating a DatabaseLecture 3 Mon, Jan 23, 2012 1 / 31 1 Multiple

More information

OKC MySQL Users Group

OKC MySQL Users Group OKC MySQL Users Group OKC MySQL Discuss topics about MySQL and related open source RDBMS Discuss complementary topics (big data, NoSQL, etc) Help to grow the local ecosystem through meetups and events

More information

WHAT IS A DATABASE? There are at least six commonly known database types: flat, hierarchical, network, relational, dimensional, and object.

WHAT IS A DATABASE? There are at least six commonly known database types: flat, hierarchical, network, relational, dimensional, and object. 1 WHAT IS A DATABASE? A database is any organized collection of data that fulfills some purpose. As weather researchers, you will often have to access and evaluate large amounts of weather data, and this

More information

QMP 7.1 D/D Channabasaveshwara Institute of Technology (An ISO 9001:2008 Certified Institution) NH 206 (B.H. Road), Gubbi, Tumkur Karnataka.

QMP 7.1 D/D Channabasaveshwara Institute of Technology (An ISO 9001:2008 Certified Institution) NH 206 (B.H. Road), Gubbi, Tumkur Karnataka. QMP 7.1 D/D Channabasaveshwara Institute of Technology (An ISO 9001:2008 Certified Institution) NH 206 (B.H. Road), Gubbi, Tumkur 572 216. Karnataka. Department of Information Science & Engineering SYLLABUS

More information

1 INTRODUCTION TO EASIK 2 TABLE OF CONTENTS

1 INTRODUCTION TO EASIK 2 TABLE OF CONTENTS 1 INTRODUCTION TO EASIK EASIK is a Java based development tool for database schemas based on EA sketches. EASIK allows graphical modeling of EA sketches and views. Sketches and their views can be converted

More information

MariaDB 10.3 vs MySQL 8.0. Tyler Duzan, Product Manager Percona

MariaDB 10.3 vs MySQL 8.0. Tyler Duzan, Product Manager Percona MariaDB 10.3 vs MySQL 8.0 Tyler Duzan, Product Manager Percona Who Am I? My name is Tyler Duzan Formerly an operations engineer for more than 12 years focused on security and automation Now a Product Manager

More information

Applied Databases. Sebastian Maneth. Lecture 7 Simple SQL Queries. University of Edinburgh - February 1 st, 2016

Applied Databases. Sebastian Maneth. Lecture 7 Simple SQL Queries. University of Edinburgh - February 1 st, 2016 Applied Databases Lecture 7 Simple SQL Queries Sebastian Maneth University of Edinburgh - February 1 st, 2016 Outline 2 1. Structured Querying Language (SQL) 2. Creating Tables 3. Simple SQL queries SQL

More information

CSCI-UA: Database Design & Web Implementation. Professor Evan Sandhaus Lecture #7: Normalization

CSCI-UA: Database Design & Web Implementation. Professor Evan Sandhaus  Lecture #7: Normalization CSCI-UA:0060-02 Database Design & Web Implementation Professor Evan Sandhaus sandhaus@cs.nyu.edu evan@nytimes.com Lecture #7: Normalization Database Design and Web Implementation Database Design and Web

More information

Part 1: IoT demo Part 2: MySQL, JSON and Flexible storage

Part 1: IoT demo Part 2: MySQL, JSON and Flexible storage Part 1: IoT demo Part 2: MySQL, JSON and Flexible storage $ node particle_mysql_all.js Starting... INSERT INTO cloud_data_json (name, data) values ('particle', '{\"data\":\"null\",\"ttl\":60,\"published_at\":\"2017-09-28t19:40:49.869z\",\"coreid\":\"1f0039000947343337373738

More information

Unit 1 - Chapter 4,5

Unit 1 - Chapter 4,5 Unit 1 - Chapter 4,5 CREATE DATABASE DatabaseName; SHOW DATABASES; USE DatabaseName; DROP DATABASE DatabaseName; CREATE TABLE table_name( column1 datatype, column2 datatype, column3 datatype,... columnn

More information

Mysql Manually Set Auto Increment To 1000

Mysql Manually Set Auto Increment To 1000 Mysql Manually Set Auto Increment To 1000 MySQL: Manually increment a varchar for one insert statement Auto Increment only works for int values, but i'm not at liberty here to change the data type. If

More information