Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword or section
Like this
6Activity
0 of .
Results for:
No results containing your search query
P. 1
SQL Lab Manual

SQL Lab Manual

Ratings: (0)|Views: 1,020 |Likes:
Published by Sandeep V Gowda
DBMS 5th sem complete lab programs
DBMS 5th sem complete lab programs

More info:

Published by: Sandeep V Gowda on Oct 31, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

06/13/2013

pdf

text

original

 
PROBLEM 1
PROBLEM STATEMENT:
DATA BASE TO MANAGE THE INSURANCE OF A VEHICLE . THERELATIONS WITH THEIR RESPECTIVE ATTRIBUTES ARE SHOWN BELOW.PERSON (DRIVER ID, NAME, ADDRESS)CAR (REGNO, MODEL, YEAR)ACCIDENT (REPORTNO,DATE,LOCATION)OWNS(DRIVERID,REGNO)PARTICIPATED(DRIVERID,REGNO,REPORTNO,DAMAGEAMOUNT)
SCHEMA DESCRIPTION:
PERSON CAR 
DRIVER_ID
 NAME ADDRESSPARTICIPATIONDRIVER_ID REGNO REPORTNO DAMAGEAMTACCIDENT 
REPORTNO
DATE LOCATION OWNS
REGNO
MODELYEADRIVER_ID REGNO1
 
The table PERSON contains the attributes namely driver_id, name & address wherethe primary key is driver_id.
The table CAR contains the attributes such as model, year & register number wherethe primary key is register number.
The table ACCIDENT contains the attributes such as report number, date &locationwhere the primary key is report number.
The table OWNS contains the attributes driver id & regno, both the attributes areforeign key &they together constitute the composite key.
The table PARTICIPATED contains the attributes driver id, regno, report number &damage amount. Here driver id , regno , report number are foreign keys and theyconstitute the composite key2
 
TABLE CREATION:CREATE TABLE PERSON(DRIVER_ID VARCHAR (10) PRIMARY KEY,NAME VARCHAR (10) NOT NULL,ADDRESS VARCHAR (20));CREATE TABLE CAR (REG_NO VARCHAR (10) PRIMARY KEY,MODEL VARCHAR (10) NOT NULL,YEAR NUMBER (4));CREATE TABLE ACCIDENT(REPORT_NO NUMBER (10) PRIMARY KEY,DDATE DATE,LOCATION VARCHAR (10) NOT NULL);CREATE TABLE OWNS(DRIVER_ID VARCHAR (10) REFERENCES PERSON (DRIVER_ID),REG_NO VARCHAR (10) REFERENCES CAR (REG_NO));CREATE TABLE PARTICIPATED(DRIVER_ID VARCHAR (10) REFERENCES PERSON (DRIVER_ID),REG_NO VARCHAR (10) REFERENCES CAR (REG_NO),REPORT_NO NUMBER (10) REFERENCES ACCIDENT (REPORT_NO),DAMAGE_AMOUNT NUMBER (10));
3

Activity (6)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
talk2parimi liked this
udayraje liked this
rajat7169451734 liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->