Chapter 5 - Database Management System - Pure Lecture
Chapter 5 - Database Management System - Pure Lecture
Management
System
Database Management System (DBMS)
• Database is a collection of data
• DBMS is a collection of inter-related data and set of programs
to store & access those data in an easy and effective manner.
Relational
Table/Relation Database
Model
Relational Database Model
• Sorts data into tables (also called relations) consisting of
columns and rows
• Each column lists an attribute of the entity in question, such as
price, zip code, or birth date.
• The attributes in a relation are called a domain.
• A particular attribute or combination of attributes is chosen as a
primary key
• Each row, also called a tuple, includes data about a specific
instance of the entity in question, such as a particular employee.
• The model also accounts for the types of relationships between
those tables, including one-to-one, one-to-many, and many-to-
many relationships.
Hierarchical Database Model
• Resembles an upside-down tree
• Files are related in a parent-child manner
• Each parent capable of relating to more than one child
• But each child only being related to one parent.
Object-Oriented Database Mode
• An object database is a system
in which information is
represented in the form of
objects as used in object-
oriented programming
The DB-Engines Ranking ranks database management system according
to their popularity. The ranking is updated monthly.
DBMS Languages
User can access, update, delete, and store data or information in
the database using database languages. The following are
the databases languages in the database management system:
• Data Definition Language
• Data Manipulation Language
• Data Control Language
• Transaction Control Language
Data Definition Language (DDL)
DDL is used for defining the structure or schema of the database. It is
also used for creating tables, indexes, applying constraints, etc. in the
database.
• Create - create a new table or a new database.
• Alter - alter or change the structure of the database table.
• Drop - delete a table, index, or views from the database.
• Truncate - delete the records or data from the table, but its structure
remains as it is.
• Rename - rename an object from the database.
• Comment - used for adding comments to our table.
Data Manipulation Language (DML)
DML is a language used to access or manipulate the data in the
database. In simple words, this language is used to retrieve the data
from the database, insert new data into the database, and delete the
existing data from the database.
• Select - to retrieve or access the data from the database table.
• Insert - insert the records into the table.
• Update - change/update the existing data in a table.
• Delete - to delete one or all the existing records from the table.
Data Control Language (DCL)
DCL is used to access the stored or saved data. It is mainly used for
revoking and granting user access on a database.
• Grant - allows user’s access privileges to the database.
• Revoke - removes the accessibility of users from the database objects.
Transaction Control Languages (TCL)
TCL is a language which manages transactions within the database. It is
used to execute the changes made by the data manipulation language
(DML) statements.
• Commit - save the transactions in the database.
• Rollback - restore the database to that state which was last
committed.
Standard Query Language (SQL)
• SQL is a programming language that is typically used in
relational database or data stream management systems.
• It is both a data definition and a data manipulation language
• Language used in SAP Business One
SQL Query
Generator in
SAP Business
One
Customers with
account balance
greater than or
equal to 1,500
*BP = Business Partner
Coding Types