Prompt#1 : Create a database called clinicals and use it. Create tables with normalized design to properly capture patient and his clinical data and join them using patient key . Insert sample data for 5 patients with 2 sample data each. show databases; drop database clinicals; SHOW TABLES; -- Create the database CREATE DATABASE clinicals; -- Use the database USE clinicals; -- Create Patients table CREATE TABLE patient ( id INT NOT NULL AUTO_INCREMENT, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, age INT, PRIMARY KEY (id) ); -- Create Clinical Data table (joined to patient) CREATE TABLE clinical_data ( id INT NOT NULL AUTO_INCREMENT, patient_id INT NOT NULL, component_name VARCHAR(255) NOT NULL, component_value VARCHAR(255) NOT NULL, measured_date_time TIMESTAMP, PRIMARY KEY (id), FOREIGN KEY (...
Comments
Post a Comment