Databse (Up) Xi RPL

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Good Morning/Afternoon everyone,

Let me introduce my self, my name is ….


Today I would like to present about ….

Database
Database is an organized collection of structured information, or data, typically stored electronically
in a computer system. Database designed to save, organize, and access the information efficiently. It
can be consist of a lot of kind informations, such as text, numeric, picture, audio and etc. The primary
purpose of database is to provide an organized ways dan efficient to save and organize the
information, so that the information can be easily accessed, updated or retrieved.
There are important characteristics in database :
1. The structure is well structured: The data in database is organized in a table, row and
coloumn that makes it easy to find, update or organize.
2. Access Control: The database has a security systems that regulates who or what can view or
resources the data.
3. Minimum data redundancy: The database designed to reduce the duplicate data as much as
possible. It helps to maintain data and save the space.
4. Data Integrity: The database has a rule to ascertain that the data stored remain accurate and
consistent.
5. Search Capabilities: The database fitted with searching mechanism which allows the user to
easily and quickly found the data.
6. Backup and recovery: The database system provides separate process, from that of a
network backup, for backing up and recovering data.
Database can be used in various contexts, such as database management system (DBMS) which used
in business and industry. Database in web application, or even it used in digital library, banking
system, academic information system, and etc. It is important to have an efficient data to support
business operation.

Types of data :
1. Numeric Data Type :
- INT: Integer data type in the range such as -2147483648 until 2147483647 in MySQL. INT
can be used to save integer.
- BIGINT: Larger integer with a larger value range, such as -9223372036854775808 until
9223372036854775807 in MySQL.
- DECIMAL(M, D): The decimal data type is an exact numeric data type defined in terms of
its precision and scale, such as : DECIMAL(10, 2). It can be used to save a number with
two decimal digits.
- FLOAT: A floating value is represented either as whole fractional digits (like decimal
values)
2. Character Data Types:
- CHAR(N): It is the data type stores any string of letters, numbers and symbols.
- VARCHAR(N): Data type with the variable length until N character. It is more efficient in
the storage than CHAR.
- TEXT: Data type that can be save a text with the variable length in a big scale.
3. (Date and Time Data Types):
- DATE: It used to save the date, example : "YYYY-MM-DD".
- TIME: It used to save the time, example : "HH:MM:SS".
- DATETIME: It used to save the date and time in a format : "YYYY-MM-DD HH:MM:SS".
- TIMESTAMP: It has similar function with DATETIME, but it is usually used to marking the
time of data change.

Steps in creating database :


1. First, open phpMyAdmin through XAMPP Control Panel or open the web browser and then
insert the address http://localhost/phpmyadmin.
2. Second, in the window phpMyAdmin, click tab "Databases"
3. Below the section "Create database," insert the name of database that you want to create in
the coloumn "Database name" and choose character setting (optional).
4. Last, click the button "Create" to create a new database.

Steps in creating table :


Open XAMPP Control Panel and make sure Apache and MySQL already started.

2. Open your browser and insert the address http://localhost/phpmyadmin to open PHPMyAdmin.
3. Choose the database that will you used to save the new table.

4. Choose the tab “Structure” on the top of the page.


5. Click the button “Add table” below the page.
6. Insert the table name that you want in the coloumn “Table name”.
7. Insert the number of columns that you want in the coloumn “Number of columns”.
8. Click the button “Go” to create a new table.

You might also like