0% found this document useful (0 votes)
253 views3 pages

Ddl. Paiza: EXPERIMENT-1: Develop Relational Database Schema For Boat Club Database Using

The document describes an experiment using the Paiza tool to create a relational database schema for a boat club using SQL DDL commands. It shows the commands used to create tables for sailors, boats, and reservations with various fields, modify fields, rename tables and columns, truncate and drop tables, and view the outputs and structure of the tables. A total of 9 commands were executed to set up and test the database schema.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
253 views3 pages

Ddl. Paiza: EXPERIMENT-1: Develop Relational Database Schema For Boat Club Database Using

The document describes an experiment using the Paiza tool to create a relational database schema for a boat club using SQL DDL commands. It shows the commands used to create tables for sailors, boats, and reservations with various fields, modify fields, rename tables and columns, truncate and drop tables, and view the outputs and structure of the tables. A total of 9 commands were executed to set up and test the database schema.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

EXPERIMENT-1: Develop Relational Database Schema for Boat Club database using

DDL.

TOOL USED: Paiza

LINK TO REVIEW

https://paiza.io/projects/uHwiisL0sNGEcogoLzVyEw?language=mysql

COMMANDS AND RESPECTIVE OUTPUTS:


CREATE database BoatClube;

CREATE table Sailors(SID int,Name char(20),Rating int,Age int);

DESC Sailors;

Field Type Null Key Default Extra


SID int YES NULL
Name char(20) YES NULL
Rating int YES NULL
Age int YES NULL

ALTER table Sailors add(gender char(10));

DESC Sailors;

Field Type Null Key Default Extra


SID int YES NULL
Name char(20) YES NULL
Rating int YES NULL
Age int YES NULL
Field Type Null Key Default Extra
SID int YES NULL
Name char(20) YES NULL
Rating int YES NULL
Age int YES NULL
gender char(10) YES NULL

CREATE table Boat(BID int,Name char(20),Colour char(10));

DESC Boat;

Field Type Null Key Default Extra


BID int YES NULL
Name char(20) YES NULL
Colour char(10) YES NULL
ALTER table Boat modify BID varchar(10);

DESC Boat;

Field Type Null Key Default Extra


BID int YES NULL
Name char(20) YES NULL
Colour char(10) YES NULL
Field Type Null Key Default Extra
BID varchar(10) YES NULL
Name char(20) YES NULL
Colour char(10) YES NULL
Field Type Null Key Default Extra
SID int YES NULL
BID int YES NULL
Date date YES NULL
Duration int YES NULL

CREATE database BoatClub;

CREATE table Reservations(SID int,BID int,Date date,Duration int);

DESC Reservations;

Field Type Null Key Default Extra


SID int YES NULL
BID int YES NULL
Date date YES NULL
Duration int YES NULL

ALTER table Reservations DROP column date;

DESC Reservations;

Field Type Null Key Default Extra


SID int YES NULL
BID int YES NULL
Date date YES NULL
Duration int YES NULL
Field Type Null Key Default Extra
SID int YES NULL
BID int YES NULL
Duration int YES NULL

ALTER table Boat RENAME COLUMN BID to BoatID;

DESC Boat;
Field Type Null Key Default Extra
BoatID int YES NULL
Name char(20) YES NULL
Colour char(10) YES NULL

RENAME table Sailors to SailorsInfo;

DESC SailorsInfo;

Field Type Null Key Default Extra


SID int YES NULL
Name char(20) YES NULL
Rating int YES NULL
Age int YES NULL

TRUNCATE table Reservations;

DESC Reservations;

DROP table Boat;

DESC Boat;

Table 'test.Boat' doesn't exist

NOTE: I should see total 9 commands execution and their respective outputs.

You might also like