Question: write the psuedo code for the following CREATE DATABASE healthy _ habits; USE healthy _ habits; - - Table for storing administrator information CREATE TABLE
write the psuedo code for the following
CREATE DATABASE healthyhabits;
USE healthyhabits;
Table for storing administrator information
CREATE TABLE Administrator
AdminID INT AUTOINCREMENT PRIMARY KEY, Unique identifier for each administrator, automatically incremented
Password VARCHAR NOT NULL Password of the administrator, not nullable
;
Table for Pharmacist
CREATE TABLE Pharmacist
ID INT PRIMARY KEY,
Name VARCHAR
;
Table for Doctor
CREATE TABLE Doctor
ID INT PRIMARY KEY,
Name VARCHAR
;
Table for storing update information
CREATE TABLE UpdateTable
UpdateId INT AUTOINCREMENT PRIMARY KEY, Unique identifier for each update, automatically incremented
UpdateDescription VARCHAR Description of the update
UpdateDate DATE, Date of the update
UpdateStatus BIT Status of the update
;
Table for storing issue information
CREATE TABLE IssueTable
IssueId INT AUTOINCREMENT PRIMARY KEY, Unique identifier for each issue, automatically incremented
IssueDate DATE, Date of the issue
IssueType VARCHAR Type of the issue
IssueMessage TEXT Message or description of the issue
;
Table for storing user information
CREATE TABLE UserTable
UserId INT AUTOINCREMENT PRIMARY KEY, Unique identifier for each user, automatically incremented
UserName VARCHAR Username of the user
UserPassword VARCHAR Password of the user
UserWeight DOUBLE Weight of the user
;
Table for storing activity information
CREATE TABLE Activities
ActId INT AUTOINCREMENT PRIMARY KEY, Unique identifier for each activity, automatically incremented
ActName VARCHAR Name of the activity
ActDescription TEXT, Description of the activity
ActCategory VARCHAR Category of the activity
ActDate DATE, Date of the activity
ActDuration FLOAT, Duration of the activity
ActIntensity FLOAT, Intensity of the activity
ActNotes TEXT Additional notes for the activity
;
Table for storing habit information
CREATE TABLE Habit
HabitId INT AUTOINCREMENT PRIMARY KEY, Unique identifier for each habit, automatically incremented
HabitName VARCHAR Name of the habit
HabitDescription TEXT, Description of the habit
HabitCategory VARCHAR Category of the habit
HabitStartDate DATE, Start date of the habit
HabitEndDate DATE, End date of the habit
HabitFrequency FLOAT, Frequency of the habit
HabitTarget DOUBLE Target or goal for the habit
;
Table for storing goal information
CREATE TABLE Goal
GoalID INT AUTOINCREMENT PRIMARY KEY, Unique identifier for each goal, automatically incremented
GoalName VARCHAR Name of the goal
GoalDescription TEXT, Description of the goal
GoalCategory VARCHAR Category of the goal
GoalStatus VARCHAR Status of the goal
GoalStartDate DATE, Start date of the goal
GoalEndDate DATE End date of the goal
;
Select from Doctor;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
