0% found this document useful (0 votes)
26 views2 pages

Dbms 1

1) The document contains instructions to create tables from given data by specifying appropriate data types and primary keys. 2) For the first set, tables are created for players, students, and projects with data types like int, varchar, date etc and primary keys set on the underlined fields. 3) For the second set, a table is created for properties specifying data types like int, text, boolean and primary key on the id field. 4) For the third set, a table is created for teachers with data types like int, varchar, text and primary key set on the teacher_no field.

Uploaded by

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

Dbms 1

1) The document contains instructions to create tables from given data by specifying appropriate data types and primary keys. 2) For the first set, tables are created for players, students, and projects with data types like int, varchar, date etc and primary keys set on the underlined fields. 3) For the second set, a table is created for properties specifying data types like int, text, boolean and primary key on the id field. 4) For the third set, a table is created for teachers with data types like int, varchar, text and primary key set on the teacher_no field.

Uploaded by

Ketan Dhumal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

DBMS 1

SetA
Createtablefortheinformationgivenbelowbychoosingappropriatedatatypesand
alsospecifyingproperprimarykeyconstraintonfieldswhichareunderlined(Attempt
anytwo)
◻1.Player(player_id int,name varchar(50),Birth_date date,Birth_place varchar(100))
◻2.Student(roll_noint,class varchar(20),weight numeric(6,2),height numeric(6,2))
◻3.Project(project_idint,project_name varchar(20),project_description text,status
boolean)
◻4.Donor(donor_no,donor_name,blood_group,last_date)

ANS:

1) create table player(


player_id integer primary key,
name varchar(50),
birth_date date,
birth_place varchar(100)
);

2)create table student(


Roll_no integer,
class varchar(20),
Weight numeric(6,2),
Height numeric(6,2),
primary key(Roll_no,class)
);

3)create table project(


project_id integer primary key,
project_name varchar(20),
project_description text,
status boolean
);

SetB
Create table for the information given below by choosing appropriate datatypes and
also specifying proper primarykey constraint on fields which are underlined.
◻1.Property(property_id,property_desc,area,rate,agri_status)

ANS:

create table property(


id integer primary key,
descr text,
area text,
rate integer,
status boolean
);

SetC
Create table fo rthe information given below by choosing appropriate data types and
also specifying proper primary key constrainton fields which are underlined(Attempt
anyone)
◻1.Teacher(Teacher_no,
Tname,qualification,address)Primarykey:
Teacher_no

ANS:
create table Teacher
(teacher_no integer primary key,
Tname varchar(20),
qualification text,
address text);

You might also like