Database management system(DBMS) question with solution

 Note remember page numbers

Student Subjects Sid Name Class Subject. Alex 10 Math Maria 10 English music 11 Sports Equijoin

Student Student. class = subjects. class Subjects

Sid Name class Subject 101 Alex 10 10 Math Alex Maria 10 0 English=music 102 Maria Sports

Ana- Hierarchical

"In this model to Store data

Relational

Network


It organizes records in the form of table and relationship between tables are set using Common fields.

It organizes records to one another through links or pointers.

hierarchy method is used. It is the oldest method and not in use today.

2) To organize records, it uses tree Structure.

It organizes records in the form of directed graphs.

It organizes records in the form of tables.

provides data independence

3) This model lacks. data independence.

There is partial date independence

key A unique, indexed field is used to search for a data element.

is very difficult since One can retrieve a child

4) Searching for a record

only after going

through its parent

Searching for record is easy since there are multiple access faths to adata

element.

record.
Road ID 12 34 Distance Road Name 22 Hamilton 1384 34

Windstam 39 Wind stam 14 16 Select Road ID From Road

Where distance = 22 or distance = 33,

(Query 2 ->

Select distinct Road Name

from Road;

Query 3 →

Select distinct Road Name

From Road Order by Road Name; Query 4 Select From Road.Where Toad ID = 12 34 and Distance = 22,


Name Specialization doctor treatment, addres Patient Name Disease Phone No Disease Examination Work for Test Hospital Ant User External view External View Conceptual Schema Internal Schema Database

External view level-> Several users can view their desired data from this level.

Conceptual level-> relationship among data, schema of data etc. are described in this level. 

(3) Interna devel-> This level describes how the data is. actually stored in the storage devices.

create table r(a int,b int,c int,d int);insert into r values (1,2,3,4);insert into r values (2,2,6,1);insert into r values (3,2,2,6);insert into r values (4,2,4,2);

Another table

create table s(c int,d int,e int,f int);

insert into s values (4,2,4,2);

insert into s values (3,4,6,4);

insert into s values (2,2,6,1);

insert into s values (4,2,5,3);

Comments

Popular Posts