0% found this document useful (0 votes)
41 views5 pages

Database Languages

The document provides an overview of database terminology, including key concepts such as data, information, tables, and keys. It details various database languages, including Data Definition Language (DDL), Data Manipulation Language (DML), Data Control Language (DCL), and Transaction Control Language (TCL), along with their respective commands. Additionally, it discusses the roles of database users and administrators, data independence, system catalog, and characteristics of databases.

Uploaded by

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

Database Languages

The document provides an overview of database terminology, including key concepts such as data, information, tables, and keys. It details various database languages, including Data Definition Language (DDL), Data Manipulation Language (DML), Data Control Language (DCL), and Transaction Control Language (TCL), along with their respective commands. Additionally, it discusses the roles of database users and administrators, data independence, system catalog, and characteristics of databases.

Uploaded by

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

Database Languages

Database Terminology

1. Basic Terms

Terminology Description
Data Values stored in the database. “35” is an example.
Data that is processed to have a meaning. “35” is age of
Information
Employee
Database Database is a collection of tables
Table Collection of record/tuples/rows
Records are horizontal rows in the table.
Records
Rows contains fields which are vertical columns
Fields Fields are the vertical columns of the table.
Key Key is logical way to access a record in the table
An index is a physical mechanism that improves the
Index
performance of the database.
A view is virtual table made up of s subset of the actual
View
table.
Logical rules that are used to ensure the data
Constraint
consistency.
Data Integrity Describes accuracy, validity and consistency of data.
Database Technique that helps us to reduce the occurrence of
normalization data anomalies.

2. Database Languages

 Database system provides a data definition language to specify the database


schema and data manipulation language to express database queries and
updates.

a) DDL COMMANDS

Data Definition Language (DDL) commands allows the users to create, change
and remove a table structure.

1. CREATE  Used to create a new table in database


2. DESC  Used to describe the field of table selected.
3. ALTER
a. ADD  Used to add a new column to the existing table
b. MODIFY  Used to modify/change the type of data or size of
existing data type
4. TRUNCATE  Used to delete the content of selected table
5. DROP  Used to delete the entire table and its structure from the
database.

b) DML COMMANDS

Data Manipulation Language (DML) commands allows the user to manipulate


the data in database. There are various DML commands used in database.

1. INSERT  Used to insert data into a table.


2. DELETE  Used to delete data from a table.
3. UPDATE  Used to update/change the existing data within a table.
4. SELECT  Used to retrieve data from the table.

c) DCL COMMANDS

Data Control Language (DCL) commands are used for controlling the access to
the table and hence securing the database. DCL is used to provide certain privileges to a
particular user. Privileges are rights to be allocated.

1. GRANT  Used to grant certain privileges to other users


2. REVOKE  Used to revoke or get back the granted privileges from the users

d) TCL COMMANDS

Transaction Control Language (TCL) commands is used to manage changes


made by DML commands.

1. COMMIT  Used to permanently save any transaction into database.


2. SAVEPOINT  Used to temporarily save a transaction so that users can rollback
to that point whenever necessary.
3. ROLLBACK  It restores the database to last committed state.

3. Database users and Administrators

 A primary goal of a database system is to retrieve information from and store


new information in the data base.
 People who work in a database can be categorized as database users or database
administrators.
a)Database Users

 There are four different types of database users based on their interaction with
the system.
 Naïve User
o User who interact with system using one of the application program
written previously.
o If user want to transfer amount from Account A to Account B, naïve user
invoke “transfer” program which was defined previously.
o Naïve user communicates with database at regular interval period.
o Naïve user may also simply read reports generated from the database.

 Application User

o Computer professional who write application programs.


o Responsible for the implementation of the required functionality of the
database for end user.
o Application program can choose required tool to develop user interfaces.

 Sophisticated user

o Analyst who submit queries to explore data in the database.


o User interacts with the system without writing programs. Instead, they
form their request in a database query language.

 Specialized user

o Sophisticated user who writes specialized database application like


 Expert system
 Data with complex data type environment modeling system.
 Audio/Video, graphics data etc.,

b) Database Administrator (DBA)

 A person who has central control over the system is called Database
Administrator.
 Directs / Controls all the activities related to maintaining a successful database
environment.
 DBA is an IT professional who is responsible for the,
o Installation
o Configuration
o Upgrading
o Monitoring
o Security of Database in an organization.

 Functions of DBA are,


o Schema definition – DBA creates the original database schema by
executing the set of data definition statements in DDL.
o Storage structure and access method definition
o Schema and physical organization modification – DBA carries out the
changes in schema to improve performance.
Granting of authorization for data access.
o Routine maintenance like,
 periodic backup of the database
 Ensuring enough free disk space is available
 Monitoring the job running on the database.
4. Data Independence

 Ability to modify a schema definition of one level without affecting a schema


definition of the next level is called Data Independence.

 Physical data Independence

o Ability to modify the physical schema without causing application


program, to be rewritten
o Modifications at the physical level are occasionally necessary in order to
improve the performance.

 Logical Data Independence

o Ability to modify logical schema without causing application program to


be rewritten.
o Logical data independence is more difficult because application program
heavily depend on logical structure of the data.

5. System Catalog

 System catalog is also called as Data Directory.


 Data directory is a repository of information which describes the data in the
database. i.e., Meta Data (data about data)
 System catalog is one of the fundamental components of the system
o where authorization control module uses system catalog to check whether
user have rights to carry out requested operation.
 System catalog has to store,
o Names of the authorized user
o Names of the data in the database
o Types of access allowed for the particular user.
o Constraints on each data item.

Database Characteristics

 Self description
 Insulation between programs and data, data abstraction
 Multiple views of data
 Data sharing and multi user transaction processing

You might also like