Create Database
Creates a new database for the museum system.
CREATE DATABASE museum_system;
USE museum_system;
Create Exhibition Table
Creates the Exhibition table to store exhibition details.
CREATE TABLE Exhibition (...);
DESC Exhibition;
Create Artifact Table
Stores artifact details and links each artifact to an exhibition.
CREATE TABLE Artifact (...);
DESC Artifact;
Create Sensor Table
Stores sensor details used to monitor artifacts.
CREATE TABLE Sensor (...);
DESC Sensor;
Create Staff Table
Stores museum staff details.
CREATE TABLE Staff (...);
DESC Staff;
Create Preservation Activity Table
Tracks preservation activities performed on artifacts by staff.
CREATE TABLE Preservation_Activity (...);
DESC Preservation_Activity;
ALTER Commands
ALTER commands modify table structure.
ALTER TABLE Exhibition ADD Organizer_Name VARCHAR(50);
ALTER TABLE Artifact MODIFY Condition_Status VARCHAR(50);
ALTER TABLE Sensor CHANGE Status Sensor_Status VARCHAR(30);
DROP Commands
DROP commands delete tables or database permanently.
DROP TABLE Preservation_Activity;
DROP TABLE Sensor;
DROP DATABASE Museum_System;
TRUNCATE Commands
TRUNCATE removes all records but keeps table structure.
TRUNCATE TABLE Exhibition;
TRUNCATE TABLE Preservation_Activity;
RENAME Commands
RENAME changes table names.
RENAME TABLE Artifact TO Museum_Artifact;
RENAME TABLE Staff TO Museum_Staff;