0% found this document useful (0 votes)
18 views14 pages

Database Concept

The document provides an overview of databases, including their structure, management systems (DBMS), and types of data models. It explains the relational data model, key database terms, and SQL commands used for database operations. Additionally, it highlights MySQL as a popular relational database management system and categorizes SQL commands into DDL, DQL, DML, and DCL.

Uploaded by

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

Database Concept

The document provides an overview of databases, including their structure, management systems (DBMS), and types of data models. It explains the relational data model, key database terms, and SQL commands used for database operations. Additionally, it highlights MySQL as a popular relational database management system and categorizes SQL commands into DDL, DQL, DML, and DCL.

Uploaded by

mananya2301
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

DATABASE

CONCEPT
DATABASE
• A database is a collection of data or
information that is organized so that it
can be easily accessed, managed and
updated.
• In database data is organized in the form
of rows and columns and tables and it is
indexed to make it easier and find
relevant information.
• Database works like a container which
contains the various objects like table,
queries in organized ways.
DBMS (DATA BASE MANGEMENT
SYSTEM)
• DBMS refers to a software that is responsible for
storing, maintaining, controlling, and utilizing
database in an effective way.
• Example of DBMS:
1. My SQL
2. Paradox
3. DB 2
• Advantages of DBMS:
1. Database facilitate sharing of data.
2. Database insecure security of data.
3. Database maintains integrity.
DATA MODEL
• Data models are visual representations of an
enterprise's data elements and the connections
between them.
• By helping to define and structure data in the
context of relevant business processes, models
support the development of effective
information system.
• TYPES OF DATA MODEL:
1. Relational data model
2. Network data model
3. Object oriented data model
RELATIONAL DATA MODEL AND BASE
RELATIONAL DATA
RELATIONAL DATA MODEL BASE
• The relational model means • A relational database is a
that the logical data collection of information
structures the data tables, that organizes data in
views, and indexes are predefined relationships
separate from the physical
where data is stored in
storage structures.
one or more tables (or
• This separation means that
"relations") of columns
database administrators
can manage physical data and rows, making it easy
storage without affecting to see and understand
access to that data as a how different data
logical structure. structures relate to each
other.
RELATIONAL DATABASE TERMS
• It has the following properties:
1. No duplicity: in a table no two rows of
relation will be identical.
2. Same datatype: All items in a column are
homogeneous.
3. Domain: It is a collection values from
which the value is derived for a column.
4. Degrees: Number of columns or
attributes in a table.
TYPES OF KEYS IN DATABASE
• A primary key: also called a primary keyword, is a
column in a relational database table that's
distinctive for each record.
• Candidate Key: A candidate key is a unique
identifier for records within a table.
• An alternate key in a Database Management
System (DBMS) serves as a candidate key that is
not selected as the primary key.
• A foreign key (FK) is a column or combination of
columns that is used to establish and enforce a
link between the data in two tables to control the
data that can be stored in the foreign key table.
SQL
• Structured query language (SQL) is a
programming language for storing and
processing information in a relational database.
• A relational database stores information in
tabular form, with rows and columns
representing different data attributes and the
various relationships between the data values.
• It was developed by IBM Computer Scientists in
the 1970s. By executing queries SQL
can create, update, delete, and retrieve data in
databases like MySQL, Oracle, PostgreSQL, etc.
MY SQL
• MySQL is a relational database management
system (RDBMS) developed by Oracle that is
based on structured query language (SQL).
• MySQL is an open source RDBMS that uses SQL
to create and manage databases. As a relational
database, MySQL stores data in tables of rows
and columns organized into schemas.
• Examples:
1. LINUX
2. PHP
3. MySQL
SQL COMMANDS
• SQL commands are the instructions used to communicate
with a database to perform tasks, functions, and queries
with data.
• SQL commands can be used to search the database and to
do other functions like creating tables, adding data to
tables, modifying data, and dropping tables.
• TYPES OF SQL COMMANDS:
1. DDL (Data Definition Language)
2. DQL (Data Query Language)
3. DML (Data Manipulation Language)
4. DCL (Data Control Language)
5. TCL (Transactions Control Language)
DDL and DQL Commands
DDL COMAND DQL COMMAND
• Data Definition Language. • DQL commands are used for
In SQL DDL commands fetching data from a relational
are used to create and database. They perform read-
only queries of data.
modify the structure of a
• The only command, 'SELECT'
database and database
is equivalent to the projection
objects. operation in relational
• These commands algebra.
are CREATE, DROP, ALTER, • This command selects the
TRUNCATE, and RENAME. attribute based on the
condition described by the
WHERE clause and returns
them.
DML and DCL Commands
DML COMMANDS DCL COMMAND
• The SQL commands that • DCL (Data Control
deal with the manipulation Language) includes
of data present in the commands such
database belong to DML or as GRANT and REVOKE
Data Manipulation Language which mainly deal with
and this includes most of the rights, permissions,
the SQL statements.
and other controls of
• It is the component of the
the database system.
SQL statement that controls
access to data and to
• These commands are used
the database. Basically, DCL to control access to data
statements are grouped with in the database
DML statements. by granting or revoking
permissions.

You might also like