Professional Documents
Culture Documents
TITLE : Create tables with appropriate constraints for the relational schema. Create views,
indices, and sequence. Alter the schema by adding / removing columns and constraints. Write
DML queries.
Grno:182012 Branch: IT
CREATE TABLE :
stud_id number(10),
f_name varchar2(100),
m_name varchar2(100),
l_name varchar(100),
primary key(stud_id)
);
h_id number(10),
h_name varchar(100),
h_type varchar(50),
no_of_seats number(10),
primary key(h_id)
);
(
room_no varchar(30),
stud_id number(10),
h_id number(10)
);
ALTER TABLE :
);
desc stud_mobile;
stud_id number(10),
parent_no number(10),
);
stud_id number(10),
foreign key (stud_id) references student(stud_id)
);
desc mail_id
h_id number(10),
workers varchar(100),
);
mess_name varchar(100),
menu varchar(500),
);
stud_id number(10),
mess_id number(10),
);
create table visitor
h_id number(10),
reasonforcoming varchar(500),
intime varchar(100),
outtime varchar(100),
);
h_id number(10),
emp_name varchar(200),
);
emp_id number(30),
area_of_working varchar2(200),
intime varchar2(500),
outtime varchar2(500),
);
TRUNCATE TABLE :
DROP TABLE :
CREATE VIEW :
from student
where stud_id=1;
CREATE INDEX :
on hostel(h_name,no_of_seats);
CREATE SEQUENCE :
start with 1
increment by 1
minvalue 1
maxvalue 1000;
SELECT :
INSERT :
UPDATE :
update hostel
where h_id = 1;
DELETE :