Home Assignment 1
Home Assignment 1
Home Assignment 1
PRN-72167840J
Roll No-23151
Home Assignment 1
Analyze and Design database using ER Model for any real-time application
and convert the same into tables.
ER diagram of DigitalBuspass-
+----+---------------------+----------+
| id | email | password |
+----+---------------------+----------+
| 1 | Pneha3545@gmail.com | 1234567 |
| 2 | vijaya@gmail.com | vijaya12 |
| 3 | sanjay@gmail.com | patil876 |
| 4 | jayshree@gmail.com | 0908767 |
| 5 | siddhant@gmail.com | sid5678 |
+----+---------------------+----------+
mysql> create table Passusers(id int primary key,email varchar(100) not null ,category varchar(20));
+----+---------------------+----------------+
| id | email | category |
+----+---------------------+----------------+
| 1 | Pneha3545@gmail.com | Student |
| 3 | sanjay@gmail.com | Citizen |
| 4 | jayshree@gmail.com | Citizen |
| 5 | siddhant@gmail.com | Student |
+----+---------------------+----------------+
mysql> create table Student(id int primary key,Name varchar(100) not null ,Phone_Number
varchar(10) not null,Adharcard_Number varchar(16) not null,Age int not null);
+----+----------------+--------------+------------------+-----+
+----+----------------+--------------+------------------+-----+
+----+----------------+--------------+------------------+-----+
mysql> create table Citizen(id int primary key,Name varchar(100) not null ,Phone_Number
varchar(10) not null,Adharcard_Number varchar(16) not null,Age int not null);
mysql> create table Buspass(id int primary key,fromdate Date not null,till_date Date not
null,Passtype varchar(20));
+----+------------+------------+----------+
+----+------------+------------+----------+
+----+------------+------------+----------+
+----+---------------+--------------+------------------+-----+
+----+---------------+--------------+------------------+-----+
+----+---------------+--------------+------------------+-----+
mysql> create table Senior_Citizen(id int primary key,Name varchar(100) not null ,Phone_Number
varchar(10) not null,Adharcard_Number varchar(16) not null,Age int not null);
+----+--------------+--------------+------------------+-----+
+----+--------------+--------------+------------------+-----+
+----+--------------+--------------+------------------+-----+
Snapshots of tables-