Professional Documents
Culture Documents
1. Create the above tables by properly specifying the primary keys and the foreign keys.
2. Enter at least five tuples for each relation .
3. Demonstrate how you
a) update the damage amount for the car with a specific Regno in the accident with report number 12 to
25000. b) add a new accident to the database.
4. Find the total number of people who owned cars that were involved in accidents in 2002
5. Find the number of accident in which cars belonging to a specific model were involved.
6. Generation of suitable reports.
7.Create suitable front end for querying and displaying the results.
1. Create the above tables by properly specifying the primary keys and the foreign keys.
a) update the damage amount for the car with a specific Regno in the accident with report number 12 to 25000.
update participated
set dmgamt=25000
where regno=‘MA25’ and reportno=200 ;
Rows matched :1 changed: 1 warnings: 0
select * from participated ;
+----------+---------+-----------+------------+
| driverid | regno | reportno | dmgamt |
+----------+---------+-----------+------------+
| 1000 | MA25 | 200 | 25000 |
| 1001 | KA26 | 201 | 4000 | | 1002
| TM20 | 202 | 6000 |
| 1003 | AP25 | 203 | 8000 |
| 1004 | KA25 | 204 | 10000 |
+----------+---------+-----------+------------+
b) add a new accident to the database.
PARTITICIPATED ACCIDENT
Damage amount