Docsity

MySQL Database Management: Creating and Manipulating Tables and Records, Study Guides, Projects, Research of Database Programming

Partial preview of the text

Download MySQL Database Management: Creating and Manipulating Tables and Records and more Study Guides, Projects, Research Database Programming in PDF only on Docsity!

 Xampp>mysql, apache server start  Mysql workbench, connection-open  Database programming language, database manipulation, SQL  Dbms-mysql  Mysql>database>tables>records  SHOW DATABASES;  DROP DATABASES;  CREATE DATABASE big_mart;

 USE big_mart;  CREATE TABLE USERS( (indentation here) id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, name VARCHAR(100), email VARCHAR(200) NOT NULL, username VARCHAR(100), password VARCHAR(255) )engine=innodb; show tables; describe users; drop table users; (deleting tables) insert into users(id,name,email,username,password) values(1,'Ram','[email protected]','Admin','netscape'); select *from users; select id, name from users; delete from users where id=1; (deleting a column) truncate table users; (deleting all columns at once) update students SET first_name=’sabjan’ WHERE id=1; alter table students ADD COLUMN address varchar(255); alter table students DROP COLUMN address;

)engine=innodb; à allows you to add relationship with the foreign key data types:

  • INT
  • Varchar
  • Date= Y-m-d
  • Time=h:i:s
  • DateTime
  • Text
  • Enum