Chapter 2 Database Language
Chapter 2 Database Language
Database Concept
Database Language
Agenda
DBMS Architecture
Database Language
1-Tier Architecture:
• In this architecture, the database is directly available to the user. It
means the user can directly connected to the DBMS and uses it.
• Any changes done here will directly be done on the database itself.
• It doesn't provide a handy tool for end users.
• The 1-Tier architecture is used for development of the local application,
where programmers can directly communicate with the database.
DBMS Architecture
2-Tier Architecture
• The 2-Tier architecture is same as basic client-server.
• In the two-tier architecture, applications on the client end can directly
communicate with the database at the server side.
• The user interfaces and application programs are run on the client-side.
• The server side is responsible to provide the functionalities like: query
processing and transaction management.
2-tier Architecture
DBMS Architecture
3-Tier Architecture
• The 3-Tier architecture contains another layer between the client and
server.
• In this architecture, client can't directly communicate with the server.
• The application on the client-end interacts with an application server
which further communicates with the database system.
• The 3-Tier architecture is used in case of large web application.
3-tier architecture
Schema and Instance
Instance
• Database languages can be used to read, store, delete and update the
data in the database.
Types of Database Language
Data Definition Language (DDL)
• Click on the below link provided to download the XAMPP server according
to your window requirement.
https://sourceforge.net/projects/xampp/
• After downloading double click and install XAMPP on your system
Create Database
Syntax:
Create Database database_name;
Example:
create database Rana;
Display Database
• Show databases;
Syntax:
• CREATE TABLE table_name ( column_definition1, column_definition2,
..., table_constraints );
Example:
• CREATE TABLE employee_table (id int, name varchar(45), occupation
varchar(35), age int, PRIMARY KEY (id) );
Displaying Table
• show TABLES;
• DESCRIBE employee_table;
Alter Table
5. SQL Comment:
Example: