Header Ads

Structured Query language(SQL)

Structured Query language(SQL) originally developed by IBM at Alamden Research Center for its system - R project. It has become a de facto standard for most commercial DBMS. Majority of commercially available database management system has adopted SQL as relational database query language. The SQL language used for data definition, data manipulation, view maintenance, writing triggers, providing integrity control, security and remote database access. Now, the basis for formation of an SQL query.

    Consider the following schema.

    Student-scheme = (Roll_No, Student_Name, Marks)

    Hostel-scheme = (Hostel_Code, hostel_Name, Warden)

    Allot-scheme = (Roll_No, Hostel_Code)

We further denote that Student, Hostel and Allot are relation based on Student-scheme, Hostel-scheme and Allot-scheme respectively i.e.

    STUDENT(Student-Scheme)

    HOSTEL(Hostel-Scheme)

    ALLOT(Allot-scheme)

These relations are shown in the following tables. Note that STUDENT relation contain the data about Roll number, name and marks obtained by student. Hostel relation contain the data about Hostel name and warden name. The relation ALLOT contains the information about student and hostel allotted.

Student Table:

Roll_No

Student_Name

Marks

1

Ajay

78

2

Rajiv

56

3

Raghu

97

4

Rohil

86

5

Pankaj

55

6

Alok

60

7

Sanjeev

81

8

Arun

74

9

Sudhir

66

10

Sanjay

58



Hostel Table:

Hostel_Code

Hostel_Name

Warden

VA

Vivekanand

B N Mishra

RA

Raman

A. Mittal

KA

KrishnaG. Chandra


Allot Table:

Roll_No

Hostel_Code

1

VA

2

KA

3

RA

4

VA

5

RA

6

VA

7

RA

8

KA

9

KA

10

VA

No comments

Powered by Blogger.