Docsity

Data Base basic instructions, Lecture notes of Database Programming

Partial preview of the text

Download Data Base basic instructions and more Lecture notes Database Programming in PDF only on Docsity!

Database System

CL 203

Lab 01

Introduction and Basics

Who Am I?

Contacting me

Introduction

  • (^) Lets get to know you people one by one…
  • (^) Name
  • (^) Your area of interests?
  • (^) What you want to be in future?
  • (^) Computer Science why?
  • (^) What unique you can do through Computer Science?
• DATABASE
  • (^) “Collection of inter-related data in an organized manner”
  • (^) DBMS
  • (^) “A program that manages Database”

DBMS

Eg. Sql Server,Orac ke,My sql,DB

STORES

RETREIVES MODIFIES

DB

Role of DBMS

Key Points

  • (^) A table is a basic storage structure unit of an RDBMS
  • (^) Easy to use
  • (^) Flexible in structure
  • (^) Security and Authorization methods are well defined
  • (^) Protect Data integrity
  • (^) Can be accessed and modifies by executing structured query language statements
  • (^) Uses a set of relational Operators (Selection,Join) and a set operation Union, Intersection etc
  • (^) Contains a collection of tables with No Physical Pointers as we use Primary Key & Foreign Key to access and relate data
  • (^) Keeps logical representation of data independent of its physical storage characteristics

Sl.# DBMS RDBMS 1 Introduced in 1960s. Introduced in 1970s. 2 During introduction it followed the navigational modes (Navigational DBMS) for data storage and fetching. This model uses relationship between tables using primary keys, foreign keys and indexes. 3 Data fetching is slower for complex and large amount of data. Comparatively faster because of its relational model. 4 Used for applications using small amount of data. Used for complex and large amount of data. 5 Data Redundancy is common in this model Keys and indexes are used in the tables to avoid redundancy. 6 Example systems are dBase, Microsoft Acces, LibreOffice Base, FoxPro. Example systems are SQL Server, Oracle, MySQL, MariaDB, SQLite

What is SQL?

  • (^) Special Purpose Programming Language designed to work upon and manage the data held in RDBMS

SQLSQL RDBM DB S RDBM S User Tells “What to do” in form of Query Language such as SQL SQL interprets command s & queries to make them Underst andable RDBMS retrieves /modify Data as per Requeste d by the user ost RDBMS, SQL is used as a language interpreter

PL/SQL

  • (^) An Oracle Procedural Language which extends SQL by adding application logic

SQL Categories/Classification

  • (^) DQL: Data Query Language
    • (^) Select
  • (^) DML: Data Manipulation Language
    • (^) Insert, Update, Delete…
  • (^) DDL: Data Definition Language
    • (^) Create, Alter, Drop, Truncate, Rename
  • (^) DCL: Data Control Language
    • (^) Grant, Revoke
  • (^) Transaction Control
    • (^) Commit, Roll Back, Check Point

Null Values

  • (^) Null is a value that is unavailable, unassigned, inappropriate, inapplicable, or unknown
  • (^) A null is not the same as zero or blank

Conditions in SQL

  • (^) Between: Between two values
  • (^) AND: Both values should be true
  • (^) In (SET): Among a set of values
  • (^) Like: Like a character pattern
  • (^) Is Null: is a null value