0% found this document useful (0 votes)
55 views2 pages

Name: - Score: - / PRELIM - Hands On Activity#1 Task

The document provides steps to create a database with four tables in MySQL: 1. The tables are tbl_student, tbl_employee, tbl_book, and tbl_subject for storing student, employee, book, and subject data respectively. 2. The steps include starting MySQL, logging in, creating the database, and then creating each table with the appropriate column names and data types. 3. Columns like student_id, first_name, and course are defined for the tbl_student table. Similarly, the other tables define columns for the different entities.

Uploaded by

Michael Kit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views2 pages

Name: - Score: - / PRELIM - Hands On Activity#1 Task

The document provides steps to create a database with four tables in MySQL: 1. The tables are tbl_student, tbl_employee, tbl_book, and tbl_subject for storing student, employee, book, and subject data respectively. 2. The steps include starting MySQL, logging in, creating the database, and then creating each table with the appropriate column names and data types. 3. Columns like student_id, first_name, and course are defined for the tbl_student table. Similarly, the other tables define columns for the different entities.

Uploaded by

Michael Kit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Name: _______________________________ _______ Score: ________/40 pts

PRELIM – Hands On Activity#1


Task:
To create a database that includes four tables namely: tbl_student, tbl_employee, tbl_subject, tbl_book.

Steps:
1. Start MySQL
Goto START > All Programs > MySQL > MySQL Adminstrator

2. LogIn into MySQL


Type the ff. strictly:
Server Host: localhost
User Name: root
Password: root
Then click OK

3. Create your database


In the left side of the main window, select CATALOGS
Right Click the Database Name: TEST
Select CREATE NEW SCHEMA
Type your database name.
e.g. PEDRO_DATABASE
Then click OK

4. Create your first table


Right Click your database
Select CREATE NEW TABLE
Type your table name: TBL_STUDENT
Type your DATA’s in the COLUMNS & DATATYPES
COLUMNS DATA TYPES
STUDENT_ID VARCHAR(11)
FIRST_NAME VARCHAR(20)
MIDDLE_NAME VARCHAR(20)
LAST_NAME VARCHAR(20)
GENDER VARCHAR(10)
AGE INTEGER
ADDRESS VARCHAR(40)
BIRTH_DATE DATE
CONTACT_NO VARCHAR(15)
COURSE VARCHAR(20)
DEPARTMENT VARCHAR(15)
YEAR_LEVEL VARCHAR(15)

5. Create your second table


Right Click your database
Select CREATE NEW TABLE
Type your table name: TBL_EMPLOYEE
1
Page

Type your DATA’s in the COLUMNS & DATATYPES

Prepared by: mlc


COLUMNS DATA TYPES
EMPLOYEE_ID VARCHAR(11)
FIRST_NAME VARCHAR(20)
MIDDLE_NAME VARCHAR(20)
LAST_NAME VARCHAR(20)
GENDER VARCHAR(20)
AGE INTEGER
ADDRESS VARCHAR(40)
BIRTH_DATE DATE
CONTACT_NO VARCHAR(15)
JOB VARCHAR(20)
DEPARTMENT VARCHAR(15)
SALARY INTEGER

6. Create your third table


Right Click your database
Select CREATE NEW TABLE
Type your table name: TBL_BOOK
Type your DATA’s in the COLUMNS & DATATYPES
COLUMNS DATA TYPES
ISBN VARCHAR(11)
TITLE VARCHAR(20)
AUTHOR VARCHAR(20)
PUBLISHER VARCHAR(20)
DESCRIPTION VARCHAR(20)
CATEGORY INTEGER

7. Create your fourth table


Right Click your database
Select CREATE NEW TABLE
Type your table name: TBL_SUBJECT
Type your DATA’s in the COLUMNS & DATATYPES
COLUMNS DATA TYPES
SUBJECT_CODE VARCHAR(15)
TITLE VARCHAR(20)
UNITS INTEGER
DAYS VARCHAR(20)
TIME VARCHAR(20)
ROOM VARCHAR(10)
GRADE INTEGER
PRE_REQUISITE VARCHAR(15)
INSTRUCTOR VARCHAR(20)

8. DONE. 
2
Page

Prepared by: mlc

You might also like