From 4fd2c8619c8e2b37004edb8ecb5f6af62dbce477 Mon Sep 17 00:00:00 2001 From: Kevin Tran Date: Fri, 20 Sep 2024 14:27:06 -0700 Subject: [PATCH 01/15] feat: if testing_var.yaml exists then it runs --- .gitignore | 4 +++- README.md | 15 +++++++++++++++ testing/data/generate_data.py | 14 ++++++++------ testing/stream_kafka.py | 30 +++++++++++++++++++----------- 4 files changed, 45 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index 63e2458..f6e3193 100644 --- a/.gitignore +++ b/.gitignore @@ -28,4 +28,6 @@ scripts/output_vars.sh terraform/teardown_details.txt testing/data/__pycache__/* -testing/data/__pycache__/generate_data.cpython-312.pyc \ No newline at end of file +testing/data/__pycache__/generate_data.cpython-312.pyc + +testing/testing_var.yaml \ No newline at end of file diff --git a/README.md b/README.md index 2b2b052..83b1b67 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,21 @@ export EC2_PUBLIC_IP="" bash scripts/load_kafka.sh ``` +If you would like to automate the Kafka data loading, create a `data/testing_var.sh` with the following format: + +```yaml +streaming: + - topic_name: "topic_2" + record_count: 1000 + dataset: 1 + - topic_name: "topic_2" + record_count: 500 + dataset: 2 + - topic_name: "topic_3" + record_count: 2000 + dataset: 0 +``` + ### SingleStore Ingestion Load the notebook `testing/ec2-kafka-s2-notebook.ipynb` into SingleStore Helios. diff --git a/testing/data/generate_data.py b/testing/data/generate_data.py index d15d66e..e38654e 100644 --- a/testing/data/generate_data.py +++ b/testing/data/generate_data.py @@ -6,9 +6,8 @@ # Get the directory where the script is located script_dir = os.path.dirname(os.path.abspath(__file__)) -yaml_file_path = os.path.join(script_dir, 'data.yaml') -def read_yaml(): +def read_yaml(yaml_file_path): with open(yaml_file_path, 'r') as file: return yaml.safe_load(file) @@ -53,14 +52,17 @@ def generate_data(data_format, amount): -def main_generation(num_records): - data = read_yaml()['data'] +def main_generation(num_records, dataset_num): + data = read_yaml(os.path.join(script_dir, 'data.yaml'))['data'] data_types = list(data.keys()) - choice = prompt_options(data_types) + if dataset_num == -1: + choice = prompt_options(data_types) + else: + choice = dataset_num print(choice) data_format = data[choice] return generate_data(data_format, num_records) # Testing purposes if __name__ == "__main__": - print(main_generation(10)) + print(main_generation(10, -1)) diff --git a/testing/stream_kafka.py b/testing/stream_kafka.py index 60e0038..9271ea8 100644 --- a/testing/stream_kafka.py +++ b/testing/stream_kafka.py @@ -2,7 +2,7 @@ import os from confluent_kafka import Producer, KafkaException, KafkaError from confluent_kafka.admin import AdminClient, NewTopic -from data.generate_data import main_generation +from data.generate_data import main_generation, read_yaml EC2_PUBLIC_IP = os.environ["EC2_PUBLIC_IP"] @@ -28,22 +28,30 @@ def create_kafka_topic(topic_name, num_partitions=1, replication_factor=1): raise -def produce_event_logs_to_kafka(num_records, topic_name): - event_logs = main_generation(num_records) +def produce_event_logs_to_kafka(num_records, topic_name, dataset_num): + event_logs = main_generation(num_records, dataset_num) for log in event_logs: producer.produce(topic_name, value=json.dumps(log)) print(f"Sent: {log}") - # Wait up to 5 seconds for messages to be sent producer.flush(timeout=5) # Example usage if __name__ == "__main__": - continue_loading = "y" - while continue_loading == "y": - topic_name = input("What kafka topic would you like to preload? ") - num_records = int(input("How many entries would you like to create? ")) - # create_kafka_topic(topic_name) - produce_event_logs_to_kafka(num_records, topic_name) - continue_loading = input("Would you like to continue loading data (y/n)? ") + file_path = os.getcwd() + "/testing_var.yaml" + if os.path.exists(file_path): + streaming = read_yaml(file_path)['streaming'] + for stream in streaming: + num_records = stream["record_count"] + topic_name = stream["topic_name"] + dataset_num = stream["dataset"] + produce_event_logs_to_kafka(num_records,topic_name,dataset_num) + else: + continue_loading = "y" + while continue_loading == "y": + topic_name = input("What kafka topic would you like to preload? ") + num_records = int(input("How many entries would you like to create? ")) + # create_kafka_topic(topic_name) + produce_event_logs_to_kafka(num_records, topic_name, -1) + continue_loading = input("Would you like to continue loading data (y/n)? ") From 985684595a971514c884bb4bbd6e7fee34ada4d7 Mon Sep 17 00:00:00 2001 From: Kevin Tran Date: Mon, 23 Sep 2024 11:47:43 -0700 Subject: [PATCH 02/15] refact: loading in dataset name --- testing/data/generate_data.py | 7 +++---- testing/stream_kafka.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/testing/data/generate_data.py b/testing/data/generate_data.py index e38654e..ace68f9 100644 --- a/testing/data/generate_data.py +++ b/testing/data/generate_data.py @@ -52,14 +52,13 @@ def generate_data(data_format, amount): -def main_generation(num_records, dataset_num): +def main_generation(num_records, dataset): data = read_yaml(os.path.join(script_dir, 'data.yaml'))['data'] data_types = list(data.keys()) - if dataset_num == -1: + if dataset == -1: choice = prompt_options(data_types) else: - choice = dataset_num - print(choice) + choice = dataset data_format = data[choice] return generate_data(data_format, num_records) diff --git a/testing/stream_kafka.py b/testing/stream_kafka.py index 9271ea8..c4b7d59 100644 --- a/testing/stream_kafka.py +++ b/testing/stream_kafka.py @@ -39,7 +39,7 @@ def produce_event_logs_to_kafka(num_records, topic_name, dataset_num): # Example usage if __name__ == "__main__": - file_path = os.getcwd() + "/testing_var.yaml" + file_path = os.getcwd() + "/testing/testing_var.yaml" if os.path.exists(file_path): streaming = read_yaml(file_path)['streaming'] for stream in streaming: From f248c0522656bd946a403324264edc2ce391336c Mon Sep 17 00:00:00 2001 From: Kevin Tran Date: Mon, 23 Sep 2024 14:51:22 -0700 Subject: [PATCH 03/15] feat: mapping out mysql data --- .gitignore | 4 +- testing/schema-mapping/README.md | 5 + .../schema-mapping/example-mysql-schema.sql | 479 ++++++++++++++++++ testing/schema-mapping/map-data.py | 87 ++++ testing/stream_kafka.py | 4 + 5 files changed, 578 insertions(+), 1 deletion(-) create mode 100644 testing/schema-mapping/README.md create mode 100644 testing/schema-mapping/example-mysql-schema.sql create mode 100644 testing/schema-mapping/map-data.py diff --git a/.gitignore b/.gitignore index f6e3193..e7cbbeb 100644 --- a/.gitignore +++ b/.gitignore @@ -30,4 +30,6 @@ terraform/teardown_details.txt testing/data/__pycache__/* testing/data/__pycache__/generate_data.cpython-312.pyc -testing/testing_var.yaml \ No newline at end of file +testing/testing_var.yaml +testing/schema-mapping/tables.yaml +kafka_topics.txt \ No newline at end of file diff --git a/testing/schema-mapping/README.md b/testing/schema-mapping/README.md new file mode 100644 index 0000000..e641700 --- /dev/null +++ b/testing/schema-mapping/README.md @@ -0,0 +1,5 @@ +# Reads + +Example file format: `example-mysql-schema.sql` +Running: `python3 testing/schema-mapping/map-data.py` +Output: `tables.yaml` diff --git a/testing/schema-mapping/example-mysql-schema.sql b/testing/schema-mapping/example-mysql-schema.sql new file mode 100644 index 0000000..3478200 --- /dev/null +++ b/testing/schema-mapping/example-mysql-schema.sql @@ -0,0 +1,479 @@ +-- 1. Users +CREATE TABLE Users ( + user_id INT NOT NULL AUTO_INCREMENT, + username VARCHAR(50) NOT NULL UNIQUE, + email VARCHAR(100) NOT NULL UNIQUE, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (user_id) +); + +-- 2. Experiments +CREATE TABLE Experiments ( + experiment_id INT NOT NULL AUTO_INCREMENT, + experiment_name VARCHAR(100) NOT NULL, + start_date DATE, + end_date DATE, + status ENUM('Active', 'Completed', 'Paused'), + PRIMARY KEY (experiment_id) +); + +-- 3. Variants +CREATE TABLE Variants ( + variant_id INT NOT NULL AUTO_INCREMENT, + experiment_id INT NOT NULL, + variant_name VARCHAR(50) NOT NULL, + PRIMARY KEY (variant_id), + FOREIGN KEY (experiment_id) REFERENCES Experiments(experiment_id) +); + +-- 4. User Assignments +CREATE TABLE UserAssignments ( + assignment_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + variant_id INT NOT NULL, + assigned_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (assignment_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id), + FOREIGN KEY (variant_id) REFERENCES Variants(variant_id) +); + +-- 5. Events +CREATE TABLE Events ( + event_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + experiment_id INT NOT NULL, + event_type VARCHAR(50), + event_timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (event_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id), + FOREIGN KEY (experiment_id) REFERENCES Experiments(experiment_id) +); + +-- 6. Goals +CREATE TABLE Goals ( + goal_id INT NOT NULL AUTO_INCREMENT, + experiment_id INT NOT NULL, + goal_description TEXT, + PRIMARY KEY (goal_id), + FOREIGN KEY (experiment_id) REFERENCES Experiments(experiment_id) +); + +-- 7. Goal Metrics +CREATE TABLE GoalMetrics ( + metric_id INT NOT NULL AUTO_INCREMENT, + goal_id INT NOT NULL, + variant_id INT NOT NULL, + conversion_count INT, + PRIMARY KEY (metric_id), + FOREIGN KEY (goal_id) REFERENCES Goals(goal_id), + FOREIGN KEY (variant_id) REFERENCES Variants(variant_id) +); + +-- 8. Feedback +CREATE TABLE Feedback ( + feedback_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + experiment_id INT NOT NULL, + feedback_text TEXT, + submitted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (feedback_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id), + FOREIGN KEY (experiment_id) REFERENCES Experiments(experiment_id) +); + +-- 9. Feature Flags +CREATE TABLE FeatureFlags ( + flag_id INT NOT NULL AUTO_INCREMENT, + flag_name VARCHAR(100) NOT NULL UNIQUE, + is_active BOOLEAN DEFAULT TRUE, + PRIMARY KEY (flag_id) +); + +-- 10. Flag Assignments +CREATE TABLE FlagAssignments ( + assignment_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + flag_id INT NOT NULL, + assigned_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (assignment_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id), + FOREIGN KEY (flag_id) REFERENCES FeatureFlags(flag_id) +); + +-- 11. Sessions +CREATE TABLE Sessions ( + session_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + start_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + end_time TIMESTAMP, + PRIMARY KEY (session_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 12. Page Views +CREATE TABLE PageViews ( + view_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + session_id INT NOT NULL, + page_url VARCHAR(255), + view_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (view_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id), + FOREIGN KEY (session_id) REFERENCES Sessions(session_id) +); + +-- 13. Clicks +CREATE TABLE Clicks ( + click_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + event_id INT NOT NULL, + click_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (click_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id), + FOREIGN KEY (event_id) REFERENCES Events(event_id) +); + +-- 14. Annotations +CREATE TABLE Annotations ( + annotation_id INT NOT NULL AUTO_INCREMENT, + experiment_id INT NOT NULL, + note TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (annotation_id), + FOREIGN KEY (experiment_id) REFERENCES Experiments(experiment_id) +); + +-- 15. Metrics +CREATE TABLE Metrics ( + metric_id INT NOT NULL AUTO_INCREMENT, + experiment_id INT NOT NULL, + metric_name VARCHAR(100), + metric_value DECIMAL(10, 2), + recorded_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (metric_id), + FOREIGN KEY (experiment_id) REFERENCES Experiments(experiment_id) +); + +-- 16. Cohorts +CREATE TABLE Cohorts ( + cohort_id INT NOT NULL AUTO_INCREMENT, + cohort_name VARCHAR(100), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (cohort_id) +); + +-- 17. Cohort Members +CREATE TABLE CohortMembers ( + member_id INT NOT NULL AUTO_INCREMENT, + cohort_id INT NOT NULL, + user_id INT NOT NULL, + joined_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (member_id), + FOREIGN KEY (cohort_id) REFERENCES Cohorts(cohort_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 18. User Segments +CREATE TABLE UserSegments ( + segment_id INT NOT NULL AUTO_INCREMENT, + segment_name VARCHAR(100), + criteria TEXT, + PRIMARY KEY (segment_id) +); + +-- 19. Segment Memberships +CREATE TABLE SegmentMemberships ( + membership_id INT NOT NULL AUTO_INCREMENT, + segment_id INT NOT NULL, + user_id INT NOT NULL, + PRIMARY KEY (membership_id), + FOREIGN KEY (segment_id) REFERENCES UserSegments(segment_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 20. Notifications +CREATE TABLE Notifications ( + notification_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + message TEXT, + sent_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (notification_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 21. Test Plans +CREATE TABLE TestPlans ( + plan_id INT NOT NULL AUTO_INCREMENT, + experiment_id INT NOT NULL, + plan_description TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (plan_id), + FOREIGN KEY (experiment_id) REFERENCES Experiments(experiment_id) +); + +-- 22. Results +CREATE TABLE Results ( + result_id INT NOT NULL AUTO_INCREMENT, + experiment_id INT NOT NULL, + variant_id INT NOT NULL, + total_users INT, + conversion_rate DECIMAL(5, 2), + PRIMARY KEY (result_id), + FOREIGN KEY (experiment_id) REFERENCES Experiments(experiment_id), + FOREIGN KEY (variant_id) REFERENCES Variants(variant_id) +); + +-- 23. Rollouts +CREATE TABLE Rollouts ( + rollout_id INT NOT NULL AUTO_INCREMENT, + feature_id INT NOT NULL, + rollout_percentage INT CHECK (rollout_percentage BETWEEN 0 AND 100), + rollout_date DATE, + PRIMARY KEY (rollout_id), + FOREIGN KEY (feature_id) REFERENCES FeatureFlags(flag_id) +); + +-- 24. Development Tasks +CREATE TABLE DevelopmentTasks ( + task_id INT NOT NULL AUTO_INCREMENT, + task_name VARCHAR(100), + assigned_to INT, + status ENUM('Pending', 'In Progress', 'Completed'), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (task_id), + FOREIGN KEY (assigned_to) REFERENCES Users(user_id) +); + +-- 25. Task Comments +CREATE TABLE TaskComments ( + comment_id INT NOT NULL AUTO_INCREMENT, + task_id INT NOT NULL, + user_id INT NOT NULL, + comment_text TEXT, + commented_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (comment_id), + FOREIGN KEY (task_id) REFERENCES DevelopmentTasks(task_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 26. Code Reviews +CREATE TABLE CodeReviews ( + review_id INT NOT NULL AUTO_INCREMENT, + task_id INT NOT NULL, + reviewer_id INT NOT NULL, + review_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + status ENUM('Approved', 'Rejected'), + PRIMARY KEY (review_id), + FOREIGN KEY (task_id) REFERENCES DevelopmentTasks(task_id), + FOREIGN KEY (reviewer_id) REFERENCES Users(user_id) +); + +-- 27. Test Cases +CREATE TABLE TestCases ( + test_case_id INT NOT NULL AUTO_INCREMENT, + task_id INT NOT NULL, + test_description TEXT, + expected_result TEXT, + PRIMARY KEY (test_case_id), + FOREIGN KEY (task_id) REFERENCES DevelopmentTasks(task_id) +); + +-- 28. Test Results +CREATE TABLE TestResults ( + result_id INT NOT NULL AUTO_INCREMENT, + test_case_id INT NOT NULL, + status ENUM('Pass', 'Fail'), + executed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (result_id), + FOREIGN KEY (test_case_id) REFERENCES TestCases(test_case_id) +); + +-- 29. Releases +CREATE TABLE Releases ( + release_id INT NOT NULL AUTO_INCREMENT, + version VARCHAR(20), + release_date DATE, + PRIMARY KEY (release_id) +); + +-- 30. Release Notes +CREATE TABLE ReleaseNotes ( + note_id INT NOT NULL AUTO_INCREMENT, + release_id INT NOT NULL, + note TEXT, + PRIMARY KEY (note_id), + FOREIGN KEY (release_id) REFERENCES Releases(release_id) +); + +-- 31. User Stories +CREATE TABLE UserStories ( + story_id INT NOT NULL AUTO_INCREMENT, + description TEXT, + acceptance_criteria TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (story_id) +); + +-- 32. Story Assignments +CREATE TABLE StoryAssignments ( + assignment_id INT NOT NULL AUTO_INCREMENT, + story_id INT NOT NULL, + user_id INT NOT NULL, + PRIMARY KEY (assignment_id), + FOREIGN KEY (story_id) REFERENCES UserStories(story_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 33. Sprints +CREATE TABLE Sprints ( + sprint_id INT NOT NULL AUTO_INCREMENT, + sprint_name VARCHAR(100), + start_date DATE, + end_date DATE, + PRIMARY KEY (sprint_id) +); + +-- 34. Sprint Tasks +CREATE TABLE SprintTasks ( + sprint_task_id INT NOT NULL AUTO_INCREMENT, + sprint_id INT NOT NULL, + task_id INT NOT NULL, + PRIMARY KEY (sprint_task_id), + FOREIGN KEY (sprint_id) REFERENCES Sprints(sprint_id), + FOREIGN KEY (task_id) REFERENCES DevelopmentTasks(task_id) +); + +-- 35. Backlogs +CREATE TABLE Backlogs ( + backlog_id INT NOT NULL AUTO_INCREMENT, + sprint_id INT NOT NULL, + task_id INT NOT NULL, + PRIMARY KEY (backlog_id), + FOREIGN KEY (sprint_id) REFERENCES Sprints(sprint_id), + FOREIGN KEY (task_id) REFERENCES DevelopmentTasks(task_id) +); + +-- 36. QA Teams +CREATE TABLE QATeams ( + qa_team_id INT NOT NULL AUTO_INCREMENT, + team_name VARCHAR(100), + PRIMARY KEY (qa_team_id) +); + +-- 37. QA Assignments +CREATE TABLE QAAssignments ( + qa_assignment_id INT NOT NULL AUTO_INCREMENT, + qa_team_id INT NOT NULL, + user_id INT NOT NULL, + PRIMARY KEY (qa_assignment_id), + FOREIGN KEY (qa_team_id) REFERENCES QATeams(qa_team_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 38. QA Reports +CREATE TABLE QAReports ( + report_id INT NOT NULL AUTO_INCREMENT, + qa_assignment_id INT NOT NULL, + report_text TEXT, + submitted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (report_id), + FOREIGN KEY (qa_assignment_id) REFERENCES QAAssignments(qa_assignment_id) +); + +-- 39. Integration Tests +CREATE TABLE IntegrationTests ( + test_id INT NOT NULL AUTO_INCREMENT, + test_description TEXT, + expected_outcome TEXT, + PRIMARY KEY (test_id) +); + +-- 40. Integration Results +CREATE TABLE IntegrationResults ( + result_id INT NOT NULL AUTO_INCREMENT, + test_id INT NOT NULL, + status ENUM('Pass', 'Fail'), + executed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (result_id), + FOREIGN KEY (test_id) REFERENCES IntegrationTests(test_id) +); + +-- 41. Performance Tests +CREATE TABLE PerformanceTests ( + performance_test_id INT NOT NULL AUTO_INCREMENT, + test_description TEXT, + expected_performance TEXT, + PRIMARY KEY (performance_test_id) +); + +-- 42. Performance Results +CREATE TABLE PerformanceResults ( + result_id INT NOT NULL AUTO_INCREMENT, + performance_test_id INT NOT NULL, + status ENUM('Pass', 'Fail'), + executed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (result_id), + FOREIGN KEY (performance_test_id) REFERENCES PerformanceTests(performance_test_id) +); + +-- 43. Documentation +CREATE TABLE Documentation ( + doc_id INT NOT NULL AUTO_INCREMENT, + title VARCHAR(100), + content TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (doc_id) +); + +-- 44. API Endpoints +CREATE TABLE ApiEndpoints ( + endpoint_id INT NOT NULL AUTO_INCREMENT, + endpoint_name VARCHAR(255), + method ENUM('GET', 'POST', 'PUT', 'DELETE'), + PRIMARY KEY (endpoint_id) +); + +-- 45. API Logs +CREATE TABLE ApiLogs ( + log_id INT NOT NULL AUTO_INCREMENT, + endpoint_id INT NOT NULL, + request_timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + response_status INT, + PRIMARY KEY (log_id), + FOREIGN KEY (endpoint_id) REFERENCES ApiEndpoints(endpoint_id) +); + +-- 46. System Metrics +CREATE TABLE SystemMetrics ( + metric_id INT NOT NULL AUTO_INCREMENT, + metric_name VARCHAR(100), + metric_value DECIMAL(10, 2), + recorded_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (metric_id) +); + +-- 47. Load Tests +CREATE TABLE LoadTests ( + load_test_id INT NOT NULL AUTO_INCREMENT, + test_description TEXT, + expected_load TEXT, + PRIMARY KEY (load_test_id) +); + +-- 48. Load Test Results +CREATE TABLE LoadTestResults ( + result_id INT NOT NULL AUTO_INCREMENT, + load_test_id INT NOT NULL, + status ENUM('Pass', 'Fail'), + executed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (result_id), + FOREIGN KEY (load_test_id) REFERENCES LoadTests(load_test_id) +); + +-- 49. Security Tests +CREATE TABLE SecurityTests ( + security_test_id INT NOT NULL AUTO_INCREMENT, + test_description TEXT, + expected_outcome TEXT, + PRIMARY KEY (security_test_id) +); \ No newline at end of file diff --git a/testing/schema-mapping/map-data.py b/testing/schema-mapping/map-data.py new file mode 100644 index 0000000..727e56b --- /dev/null +++ b/testing/schema-mapping/map-data.py @@ -0,0 +1,87 @@ +import os +import re +import yaml + +sql_file_name = "example-mysql-schema.sql" +yaml_file_name = "../data/data.yaml" +kafka_topic_file_name = "kafka_topics.txt" +testing_var_file_name = "../testing_var.yaml" +script_dir = os.path.dirname(os.path.abspath(__file__)) +sql_file_path = os.path.join(script_dir, sql_file_name) +yaml_file_path = os.path.join(script_dir, yaml_file_name) +kafka_file_path = os.path.join(script_dir, kafka_topic_file_name) +testing_var_file_path = os.path.join(script_dir, testing_var_file_name) + +def topic_config(table_names): + return [{'name': table + '_topic', 'partitions': 4 } for table in table_names] + +# Define a function to extract CREATE TABLE statements +def extract_create_statements(file_path): + with open(file_path, 'r') as sql_file: + sql_content = sql_file.read() + create_table_pattern = r'CREATE TABLE.*?;(?:\s|$)' + create_statements = re.findall(create_table_pattern, sql_content, re.DOTALL | re.IGNORECASE) + return create_statements + + +def write_yaml(input_dict, file_path): + with open(file_path, 'w') as yaml_file: + yaml.dump(input_dict, yaml_file, default_flow_style=False) + +def generate_attr_def(attr, attr_type): + definition = {} + if attr_type == "INT" or attr_type.startswith("DECIMAL"): + definition["type"] = "int" + definition["min"] = 1 + definition["max"] = 100 + elif attr_type.startswith("VARCHAR") or attr_type.startswith("TEXT") or attr_type.startswith("ENUM"): + definition["type"] = "choice" + definition["values"] = ["choice 1", "choice 2", "choice 3"] + elif attr_type.startswith("BOOLEAN"): + definition["type"] = "choice" + definition["values"] = ["True", "False"] + elif attr_type == "TIMESTAMP": + definition["type"] = attr_type.lower() + else: + definition["type"] = attr_type + return definition + + +if __name__ == "__main__": + create_table_statements = extract_create_statements(sql_file_path) + tables_dict = {"data": {}} + for table_statement in create_table_statements: + table_input = {} + split_table = table_statement.split("\n") + name = split_table[0].lower().split(" ")[2] + for line in split_table[1:-2]: + words = line.lstrip().split(" ") + attr = words[0] + if attr != "FOREIGN" and attr != "PRIMARY": + attr_type = words[1] + table_input[attr] = generate_attr_def(attr, attr_type) + print(attr, attr_type) + tables_dict["data"][name] = table_input + print("") + write_yaml(tables_dict, yaml_file_path) + + # Generate table kafka loading + table_names = tables_dict["data"].keys() + topics = topic_config(table_names) + with open(kafka_file_path, 'w') as file: + file.write("\"") + file.write(str(topics)) + file.write("\"") + + # Streaming file + streaming_list = [] + for name in table_names: + streaming_list.append({ + "topic_name": name + "_topic", + "record_count": 1000, + "dataset": name, + }) + write_yaml({"streaming": streaming_list}, testing_var_file_path) + + + diff --git a/testing/stream_kafka.py b/testing/stream_kafka.py index c4b7d59..2310ab0 100644 --- a/testing/stream_kafka.py +++ b/testing/stream_kafka.py @@ -3,6 +3,7 @@ from confluent_kafka import Producer, KafkaException, KafkaError from confluent_kafka.admin import AdminClient, NewTopic from data.generate_data import main_generation, read_yaml +import time EC2_PUBLIC_IP = os.environ["EC2_PUBLIC_IP"] @@ -32,6 +33,9 @@ def produce_event_logs_to_kafka(num_records, topic_name, dataset_num): event_logs = main_generation(num_records, dataset_num) for log in event_logs: producer.produce(topic_name, value=json.dumps(log)) + producer.poll(0) # Polls the producer for message delivery events + # Optional: Sleep for a small amount of time to allow the queue to clear + time.sleep(0.01) # Adjust this value as needed print(f"Sent: {log}") # Wait up to 5 seconds for messages to be sent producer.flush(timeout=5) From ad0621d85b229ea24aca62519a5e12843549a55b Mon Sep 17 00:00:00 2001 From: Kevin Tran Date: Mon, 23 Sep 2024 15:30:19 -0700 Subject: [PATCH 04/15] feat: all 500 tables now loaded in --- testing/data/data.yaml | 8676 ++++++++++++++++- .../schema-mapping/example-mysql-schema.sql | 4472 ++++++++- testing/schema-mapping/map-data.py | 2 +- testing/stream_kafka.py | 2 +- 4 files changed, 13091 insertions(+), 61 deletions(-) diff --git a/testing/data/data.yaml b/testing/data/data.yaml index e807fae..73dcfea 100644 --- a/testing/data/data.yaml +++ b/testing/data/data.yaml @@ -1,86 +1,8646 @@ data: - vehicle_data: + abmengagements: + abm_id: + max: 100 + min: 1 + type: int + created_at: + type: timestamp + engagement_id: + max: 100 + min: 1 + type: int + engagement_type: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + lead_id: + max: 100 + min: 1 + type: int + academicadvising: + advising_date: + type: DATE, + advising_id: + max: 100 + min: 1 + type: int + advisor_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + academiccalendar: + end_date: + type: DATE, + semester: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + start_date: + type: DATE, + year: + max: 100 + min: 1 + type: int + academichonors: + criteria: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + honor_id: + max: 100 + min: 1 + type: int + honor_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + academicintegritypolicies: + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + policy_id: + max: 100 + min: 1 + type: int + policy_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + academicpolicies: + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + policy_id: + max: 100 + min: 1 + type: int + policy_title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + academicresources: + resource_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + resource_id: + max: 100 + min: 1 + type: int + resource_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + accountbasedmarketing: + abm_id: + max: 100 + min: 1 + type: int + account_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + target_audience: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + adcampaigns: + ad_campaign_id: + max: 100 + min: 1 + type: int + ad_content: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + ad_platform: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + budget: + max: 100 + min: 1 + type: int + campaign_id: + max: 100 + min: 1 + type: int + end_date: + type: DATE, + start_date: + type: DATE, + adperformance: + ad_campaign_id: + max: 100 + min: 1 + type: int + clicks: + type: INT, + conversions: + type: INT, + cost: + max: 100 + min: 1 + type: int + impressions: + type: INT, + performance_id: + max: 100 + min: 1 + type: int + adspendanalysis: + ad_campaign_id: + max: 100 + min: 1 + type: int + analysis_id: + max: 100 + min: 1 + type: int + conversions: + type: INT, + leads_generated: + type: INT, + total_spend: + max: 100 + min: 1 + type: int + affiliateprograms: + commission_rate: + max: 100 + min: 1 + type: int + created_at: + type: timestamp + program_id: + max: 100 + min: 1 + type: int + program_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + affiliates: + affiliate_id: + max: 100 + min: 1 + type: int + affiliate_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + contact_email: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + program_id: + max: 100 + min: 1 + type: int + affiliatesales: + affiliate_id: + max: 100 + min: 1 + type: int + lead_id: + max: 100 + min: 1 + type: int + sale_date: + type: timestamp + sale_id: + max: 100 + min: 1 + type: int + sale_value: + max: 100 + min: 1 + type: int + alumni: + alumni_id: + max: 100 + min: 1 + type: int + first_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + graduation_year: + type: INT, + last_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + alumniactivities: + activity_date: + type: DATE, + activity_id: + max: 100 + min: 1 + type: int + activity_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + alumni_id: + max: 100 + min: 1 + type: int + analytics: + analytics_id: + max: 100 + min: 1 + type: int + experiment_id: + max: 100 + min: 1 + type: int + metric_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + metric_value: + max: 100 + min: 1 + type: int + recorded_at: + type: timestamp + annotations: + annotation_id: + max: 100 + min: 1 + type: int + created_at: + type: timestamp + experiment_id: + max: 100 + min: 1 + type: int + note: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + apiendpoints: + endpoint_id: + max: 100 + min: 1 + type: int + endpoint_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + method: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + apikeys: + api_key_id: + max: 100 + min: 1 + type: int + created_at: + type: timestamp + key_value: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + user_id: + max: 100 + min: 1 + type: int + apilogs: + endpoint_id: + max: 100 + min: 1 + type: int + log_id: + max: 100 + min: 1 + type: int + request_timestamp: + type: timestamp + response_status: + type: INT, + architecturereviews: + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + review_id: + max: 100 + min: 1 + type: int + reviewed_at: + type: timestamp + articlefeedback: + article_id: + max: 100 + min: 1 + type: int + feedback_id: + max: 100 + min: 1 + type: int + feedback_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + submitted_at: + type: timestamp + user_id: + max: 100 + min: 1 + type: int + assetallocation: + allocation_date: + type: DATE, + allocation_id: + max: 100 + min: 1 + type: int + asset_id: + max: 100 + min: 1 + type: int + employee_id: + max: 100 + min: 1 + type: int + assignments: + assignment_id: + max: 100 + min: 1 + type: int + assignment_title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + class_id: + max: 100 + min: 1 + type: int + due_date: + type: DATE, + attendance: + attendance_date: + type: DATE, + attendance_id: + max: 100 + min: 1 + type: int + employee_id: + max: 100 + min: 1 + type: int + status: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + attendancevt: + AttendanceVT_date: + type: DATE, + AttendanceVT_id: + max: 100 + min: 1 + type: int + class_id: + max: 100 + min: 1 + type: int + status: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + student_id: + max: 100 + min: 1 + type: int + audienceinsights: + created_at: + type: timestamp + insight_id: + max: 100 + min: 1 + type: int + insight_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + segment_id: + max: 100 + min: 1 + type: int + auditlogs: + action: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + employee_id: + max: 100 + min: 1 + type: int + log_id: + max: 100 + min: 1 + type: int + timestamp: + type: DATETIME, + auditrecommendations: + audit_id: + max: 100 + min: 1 + type: int + recommendation_id: + max: 100 + min: 1 + type: int + recommendation_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + audittrails: + action: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + performed_at: + type: timestamp + performed_by: + max: 100 + min: 1 + type: int + trail_id: + max: 100 + min: 1 + type: int + automationactions: + action_details: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + action_id: + max: 100 + min: 1 + type: int + action_type: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + automation_id: + max: 100 + min: 1 + type: int + awards: + award_id: + max: 100 + min: 1 + type: int + award_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + backlogrefinements: + backlog_id: + max: 100 + min: 1 + type: int + refined_at: + type: timestamp + refinement_id: + max: 100 + min: 1 + type: int + backlogs: + backlog_id: + max: 100 + min: 1 + type: int + sprint_id: + max: 100 + min: 1 + type: int + task_id: + max: 100 + min: 1 + type: int + bookloans: + book_id: + max: 100 + min: 1 + type: int + loan_date: + type: DATE, + loan_id: + max: 100 + min: 1 + type: int + return_date: + type: DATE, + student_id: + max: 100 + min: 1 + type: int + brandawareness: + awareness_id: + max: 100 + min: 1 + type: int + awareness_level: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + campaign_id: + max: 100 + min: 1 + type: int + created_at: + type: timestamp + brandguidelines: + content: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + guideline_id: + max: 100 + min: 1 + type: int + guideline_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + brandperception: + created_at: + type: timestamp + lead_id: + max: 100 + min: 1 + type: int + perception_id: + max: 100 + min: 1 + type: int + perception_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + budgetallocations: + allocated_amount: + max: 100 + min: 1 + type: int + allocation_id: + max: 100 + min: 1 + type: int + campaign_id: + max: 100 + min: 1 + type: int + businesscontinuityplans: + created_date: + type: DATE, + plan_id: + max: 100 + min: 1 + type: int + plan_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + businessgoals: + goal_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + goal_id: + max: 100 + min: 1 + type: int + target_date: + type: DATE, + businessunits: + unit_id: + max: 100 + min: 1 + type: int + unit_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + campaignchannels: + campaign_id: + max: 100 + min: 1 + type: int + channel_id: + max: 100 + min: 1 + type: int + channel_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + campaignperformance: + campaign_id: + max: 100 + min: 1 + type: int + performance_id: + max: 100 + min: 1 + type: int + performance_metric: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + value: + max: 100 + min: 1 + type: int + campaigns: + budget: + max: 100 + min: 1 + type: int + campaign_id: + max: 100 + min: 1 + type: int + campaign_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + end_date: + type: DATE, + start_date: + type: DATE, + campaigntrends: + campaign_id: + max: 100 + min: 1 + type: int + created_at: + type: timestamp + trend_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + trend_id: + max: 100 + min: 1 + type: int + campusfacilities: + facility_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + facility_id: + max: 100 + min: 1 + type: int + facility_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + campusnews: + content: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + news_id: + max: 100 + min: 1 + type: int + published_date: + type: DATE, + title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + campusorganizations: + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + organization_id: + max: 100 + min: 1 + type: int + organization_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + campussurveys: + created_date: + type: DATE, + survey_id: + max: 100 + min: 1 + type: int + survey_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + campusvtevents: + campus_event_id: + max: 100 + min: 1 + type: int + event_date: + type: DATE, + event_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + careerappointments: + appointment_date: + type: DATE, + appointment_id: + max: 100 + min: 1 + type: int + service_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + careerservices: + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + service_id: + max: 100 + min: 1 + type: int + service_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + changerequestapprovals: + approval_id: + max: 100 + min: 1 + type: int + approved_at: + type: timestamp + approved_by: + max: 100 + min: 1 + type: int + request_id: + max: 100 + min: 1 + type: int + changerequests: + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + request_id: + max: 100 + min: 1 + type: int + requested_at: + type: timestamp + status: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + checklistitems: + checklist_id: + max: 100 + min: 1 + type: int + completed: + type: choice + values: + - 'True' + - 'False' + item_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + item_id: + max: 100 + min: 1 + type: int + churnanalysis: + churn_id: + max: 100 + min: 1 + type: int + churn_reason: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + lead_id: + max: 100 + min: 1 + type: int + classes: + class_id: + max: 100 + min: 1 + type: int + course_id: + max: 100 + min: 1 + type: int + instructor_id: + max: 100 + min: 1 + type: int + semester: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + year: + type: INT, + classroomresources: + class_id: + max: 100 + min: 1 + type: int + resource_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + resource_id: + max: 100 + min: 1 + type: int + resource_type: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + clicks: + click_id: + max: 100 + min: 1 + type: int + click_time: + type: timestamp + event_id: + max: 100 + min: 1 + type: int + user_id: + max: 100 + min: 1 + type: int + clients: + client_id: + max: 100 + min: 1 + type: int + client_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + contact_person: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + email: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + phone: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + codereviews: + review_date: + type: timestamp + review_id: + max: 100 + min: 1 + type: int + reviewer_id: + max: 100 + min: 1 + type: int + status: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + task_id: + max: 100 + min: 1 + type: int + codeusage: + code_id: + max: 100 + min: 1 + type: int + lead_id: + max: 100 + min: 1 + type: int + usage_id: + max: 100 + min: 1 + type: int + used_at: + type: timestamp + cohortmembers: + cohort_id: + max: 100 + min: 1 + type: int + joined_at: + type: timestamp + member_id: + max: 100 + min: 1 + type: int + user_id: + max: 100 + min: 1 + type: int + cohorts: + cohort_id: + max: 100 + min: 1 + type: int + cohort_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + collaborationnotes: + collaboration_id: + max: 100 + min: 1 + type: int + created_at: + type: timestamp + note_id: + max: 100 + min: 1 + type: int + note_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + collaborationtools: + tool_id: + max: 100 + min: 1 + type: int + tool_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + collateralusage: + campaign_id: + max: 100 + min: 1 + type: int + collateral_id: + max: 100 + min: 1 + type: int + usage_id: + max: 100 + min: 1 + type: int + communicationlogs: + communication_type: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + log_date: + type: timestamp + log_id: + max: 100 + min: 1 + type: int + user_id: + max: 100 + min: 1 + type: int + communityengagement: + engagement_date: + type: DATE, + engagement_id: + max: 100 + min: 1 + type: int + engagement_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + communityservice: + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + service_id: + max: 100 + min: 1 + type: int + service_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + companyassets: + asset_id: + max: 100 + min: 1 + type: int + asset_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + purchase_date: + type: DATE, + value: + max: 100 + min: 1 + type: int + companyeventsvt: + event_date: + type: DATE, + event_id: + max: 100 + min: 1 + type: int + event_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + companypolicies: + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + policy_id: + max: 100 + min: 1 + type: int + policy_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + companyvehicles: + purchase_date: + type: DATE, + value: + max: 100 + min: 1 + type: int + vehicle_id: + max: 100 + min: 1 + type: int + vehicle_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + competitoractions: + action_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + action_id: + max: 100 + min: 1 + type: int + tracking_id: + max: 100 + min: 1 + type: int + competitoranalysis: + analysis_id: + max: 100 + min: 1 + type: int + competitor_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + strengths: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + weaknesses: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + competitortracking: + competitor_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + monitoring_date: + type: timestamp + tracking_id: + max: 100 + min: 1 + type: int + complianceaudits: + audit_date: + type: DATE, + audit_id: + max: 100 + min: 1 + type: int + findings: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + compliancechecklists: + checklist_id: + max: 100 + min: 1 + type: int + checklist_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + conferenceparticipation: + conference_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + date_of_conference: + type: DATE, + participation_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + contacts: + contact_date: + type: timestamp + contact_id: + max: 100 + min: 1 + type: int + contact_method: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + lead_id: + max: 100 + min: 1 + type: int + notes: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + contentcalendar: + calendar_id: + max: 100 + min: 1 + type: int + content_type: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + scheduled_date: + type: DATE, + title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + contentengagement: + engagement_date: + type: timestamp + engagement_id: + max: 100 + min: 1 + type: int + engagement_type: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + lead_id: + max: 100 + min: 1 + type: int + piece_id: + max: 100 + min: 1 + type: int + contentperformance: + created_at: + type: timestamp + metrics: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + performance_id: + max: 100 + min: 1 + type: int + piece_id: + max: 100 + min: 1 + type: int + contentpieces: + calendar_id: + max: 100 + min: 1 + type: int + content_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + piece_id: + max: 100 + min: 1 + type: int + contracts: + client_id: + max: 100 + min: 1 + type: int + contract_id: + max: 100 + min: 1 + type: int + contract_value: + max: 100 + min: 1 + type: int + end_date: + type: DATE, + start_date: + type: DATE, + conversionrates: + campaign_id: + max: 100 + min: 1 + type: int + conversion_rate: + max: 100 + min: 1 + type: int + created_at: + type: timestamp + rate_id: + max: 100 + min: 1 + type: int + counselingservices: + counseling_service_id: + max: 100 + min: 1 + type: int + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + service_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + counselingsessions: + counselor_id: + max: 100 + min: 1 + type: int + notes: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + session_date: + type: DATE, + session_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + courseannouncements: + announcement_date: + type: DATE, + announcement_id: + max: 100 + min: 1 + type: int + announcement_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + course_id: + max: 100 + min: 1 + type: int + courseevaluations: + comments: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + course_id: + max: 100 + min: 1 + type: int + evaluation_id: + max: 100 + min: 1 + type: int + rating: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + coursefeedback: + course_feedback_id: + max: 100 + min: 1 + type: int + course_id: + max: 100 + min: 1 + type: int + feedback_date: + type: DATE, + feedback_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + student_id: + max: 100 + min: 1 + type: int + courseforums: + course_id: + max: 100 + min: 1 + type: int + created_date: + type: DATE, + forum_id: + max: 100 + min: 1 + type: int + title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + courselibraries: + course_id: + max: 100 + min: 1 + type: int + library_id: + max: 100 + min: 1 + type: int + resource_id: + max: 100 + min: 1 + type: int + coursematerials: + course_id: + max: 100 + min: 1 + type: int + material_id: + max: 100 + min: 1 + type: int + material_link: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + material_type: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + courseprerequisites: + course_id: + max: 100 + min: 1 + type: int + prerequisite_course_id: + max: 100 + min: 1 + type: int + courses: + course_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + course_id: + max: 100 + min: 1 + type: int + course_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + credits: + max: 100 + min: 1 + type: int + courseschedules: + class_id: + max: 100 + min: 1 + type: int + course_id: + max: 100 + min: 1 + type: int + end_time: + type: TIME, + schedule_date: + type: DATE, + schedule_id: + max: 100 + min: 1 + type: int + start_time: + type: TIME, + coursesubscriptions: + course_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + subscription_date: + type: DATE, + subscription_id: + max: 100 + min: 1 + type: int + crisismanagement: + crisis_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + crisis_id: + max: 100 + min: 1 + type: int + response_plan: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + crisisresponse: + crisis_id: + max: 100 + min: 1 + type: int + response_date: + type: DATE, + response_id: + max: 100 + min: 1 + type: int + customeracquisition: + acquisition_date: + type: timestamp + acquisition_id: + max: 100 + min: 1 + type: int + lead_id: + max: 100 + min: 1 + type: int + customerfeedback: + client_id: + max: 100 + min: 1 + type: int + feedback_date: + type: DATE, + feedback_id: + max: 100 + min: 1 + type: int + feedback_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + customerjourney: + created_at: + type: timestamp + journey_id: + max: 100 + min: 1 + type: int + lead_id: + max: 100 + min: 1 + type: int + touchpoints: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + customerloyaltyprograms: + created_at: + type: timestamp + points_required: + type: INT, + program_id: + max: 100 + min: 1 + type: int + program_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + customerretention: + created_at: + type: timestamp + lead_id: + max: 100 + min: 1 + type: int + retention_id: + max: 100 + min: 1 + type: int + retention_score: + max: 100 + min: 1 + type: int + customerretentionprograms: + created_at: + type: timestamp + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + program_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + retention_program_id: + max: 100 + min: 1 + type: int + customersegmentation: + created_at: + type: timestamp + criteria: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + segment_id: + max: 100 + min: 1 + type: int + segment_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + customersegmentationcriteria: + criteria_id: + max: 100 + min: 1 + type: int + criteria_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + segment_id: + max: 100 + min: 1 + type: int + customersuccessstories: + created_at: + type: timestamp + lead_id: + max: 100 + min: 1 + type: int + story_id: + max: 100 + min: 1 + type: int + success_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + dataprivacyagreements: + agreement_id: + max: 100 + min: 1 + type: int + agreement_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + signed_at: + type: timestamp + user_id: + max: 100 + min: 1 + type: int + debtresolutions: + debt_id: + max: 100 + min: 1 + type: int + resolution_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + resolution_id: + max: 100 + min: 1 + type: int + resolved_at: + type: timestamp + departments: + department_id: + max: 100 + min: 1 + type: int + department_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + location: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + deploymentlogs: + deployment_date: + type: timestamp + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + log_id: + max: 100 + min: 1 + type: int + dept: + department_id: + max: 100 + min: 1 + type: int + department_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + developmenttasks: + assigned_to: + type: INT, + created_at: + type: timestamp + status: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + task_id: + max: 100 + min: 1 + type: int + task_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + digitalmarketingstrategy: + created_at: + type: timestamp + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + strategy_id: + max: 100 + min: 1 + type: int + strategy_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + disasterrecoveryplans: + created_date: + type: DATE, + plan_id: + max: 100 + min: 1 + type: int + plan_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + discounts: + discount_code: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + discount_id: + max: 100 + min: 1 + type: int + discount_percentage: + max: 100 + min: 1 + type: int + valid_until: + type: DATE, + discussionboards: + board_id: + max: 100 + min: 1 + type: int + course_id: + max: 100 + min: 1 + type: int + created_date: + type: DATE, + title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + discussionposts: + board_id: + max: 100 + min: 1 + type: int + content: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + post_date: + type: DATE, + post_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + documentation: + content: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + doc_id: + max: 100 + min: 1 + type: int + title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + documentmanagement: + document_id: + max: 100 + min: 1 + type: int + document_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + employee_id: + type: INT, + upload_date: + type: DATE, + emailcampaigns: + body: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + campaign_id: + max: 100 + min: 1 + type: int + email_campaign_id: + max: 100 + min: 1 + type: int + sent_at: + type: timestamp + subject: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + emailclicks: + click_id: + max: 100 + min: 1 + type: int + clicked_at: + type: timestamp + email_campaign_id: + max: 100 + min: 1 + type: int + lead_id: + max: 100 + min: 1 + type: int + emailopens: + email_campaign_id: + max: 100 + min: 1 + type: int + lead_id: + max: 100 + min: 1 + type: int + open_id: + max: 100 + min: 1 + type: int + opened_at: + type: timestamp + emergencycontacts: + contact_id: + max: 100 + min: 1 + type: int + contact_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + contact_phone: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + relationship: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + student_id: + max: 100 + min: 1 + type: int + employeebenefits: + benefit_id: + max: 100 + min: 1 + type: int + benefit_type: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + employee_id: + max: 100 + min: 1 + type: int + employeecomplaints: + complaint_date: + type: DATE, + complaint_id: + max: 100 + min: 1 + type: int + complaint_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + employee_id: + max: 100 + min: 1 + type: int + employeedepartments: + department_id: + max: 100 + min: 1 + type: int + emp_dept_id: + max: 100 + min: 1 + type: int + employee_id: + max: 100 + min: 1 + type: int + end_date: + type: DATE, + start_date: + type: DATE, + employeeoffboarding: + employee_id: + max: 100 + min: 1 + type: int + offboarding_date: + type: DATE, + offboarding_id: + max: 100 + min: 1 + type: int + employeeonboarding: + employee_id: + max: 100 + min: 1 + type: int + onboarding_date: + type: DATE, + onboarding_id: + max: 100 + min: 1 + type: int + employeerelocation: + employee_id: + max: 100 + min: 1 + type: int + new_location_id: + max: 100 + min: 1 + type: int + relocation_date: + type: DATE, + relocation_id: + max: 100 + min: 1 + type: int + employees: + email: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + employee_id: + max: 100 + min: 1 + type: int + first_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + hire_date: + type: DATE, + job_title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + last_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + phone: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + salary: + max: 100 + min: 1 + type: int + employeesurveys: + submission_date: + type: DATE, + survey_id: + max: 100 + min: 1 + type: int + survey_title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + employeetraining: + employee_id: + max: 100 + min: 1 + type: int + training_id: + max: 100 + min: 1 + type: int + training_participation_id: + max: 100 + min: 1 + type: int + enrollments: + course_id: + max: 100 + min: 1 + type: int + enrollment_date: + type: DATE, + enrollment_id: + max: 100 + min: 1 + type: int + grade: + type: FLOAT, + student_id: + max: 100 + min: 1 + type: int + event_attendees: + attendee_id: + max: 100 + min: 1 + type: int + event_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + eventattendees: + attendee_id: + max: 100 + min: 1 + type: int + event_id: + max: 100 + min: 1 + type: int + lead_id: + max: 100 + min: 1 + type: int + registered_at: + type: timestamp + eventcoordination: + coordination_id: + max: 100 + min: 1 + type: int + employee_id: + max: 100 + min: 1 + type: int + event_id: + max: 100 + min: 1 + type: int + eventcoordinationtwo: + coordination_id: + max: 100 + min: 1 + type: int + event_id: + max: 100 + min: 1 + type: int + staff_id: + max: 100 + min: 1 + type: int + eventfeedback: + event_id: + max: 100 + min: 1 + type: int + feedback_id: + max: 100 + min: 1 + type: int + feedback_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + lead_id: + max: 100 + min: 1 + type: int + submitted_at: + type: timestamp + eventmarketing: + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + event_date: + type: DATE, + event_id: + max: 100 + min: 1 + type: int + event_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + location: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + eventparticipants: + employee_id: + max: 100 + min: 1 + type: int + event_id: + max: 100 + min: 1 + type: int + participant_id: + max: 100 + min: 1 + type: int + eventparticipation: + event_id: + max: 100 + min: 1 + type: int + participation_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + events: + event_id: + max: 100 + min: 1 + type: int + event_timestamp: + type: timestamp + event_type: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + experiment_id: + max: 100 + min: 1 + type: int + user_id: + max: 100 + min: 1 + type: int + eventsponsorships: + event_id: + max: 100 + min: 1 + type: int + sponsor_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + sponsorship_amount: + max: 100 + min: 1 + type: int + sponsorship_id: + max: 100 + min: 1 + type: int + eventsvt: + event_date: + type: DATE, + event_id: + max: 100 + min: 1 + type: int + event_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + location: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + expenses: + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + employee_id: + max: 100 + min: 1 + type: int + expense_amount: + max: 100 + min: 1 + type: int + expense_date: + type: DATE, + expense_id: + max: 100 + min: 1 + type: int + experiments: + end_date: + type: DATE, + experiment_id: + max: 100 + min: 1 + type: int + experiment_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + start_date: + type: DATE, + status: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + externalcollaborations: + collaboration_id: + max: 100 + min: 1 + type: int + company_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + contact_person: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + extracurriculars: + activity_id: + max: 100 + min: 1 + type: int + activity_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + facilityreservations: + facility_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + reservation_date: + type: DATE, + reservation_id: + max: 100 + min: 1 + type: int + reserved_by: + max: 100 + min: 1 + type: int + facilityusage: + facility_id: + max: 100 + min: 1 + type: int + usage_date: + type: DATE, + usage_id: + max: 100 + min: 1 + type: int + facultymeetings: + agenda: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + meeting_date: + type: DATE, + meeting_id: + max: 100 + min: 1 + type: int + featureflags: + flag_id: + max: 100 + min: 1 + type: int + flag_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + is_active: + type: choice + values: + - 'True' + - 'False' + feedback: + experiment_id: + max: 100 + min: 1 + type: int + feedback_id: + max: 100 + min: 1 + type: int + feedback_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + submitted_at: + type: timestamp + user_id: + max: 100 + min: 1 + type: int + feedback2: + feedback_date: + type: DATE, + feedback_id: + max: 100 + min: 1 + type: int + feedback_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + student_id: + max: 100 + min: 1 + type: int + feedbackforms: + form_id: + max: 100 + min: 1 + type: int + form_title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + submission_date: + type: DATE, + feedbackresponses: + employee_id: + max: 100 + min: 1 + type: int + form_id: + max: 100 + min: 1 + type: int + response_id: + max: 100 + min: 1 + type: int + response_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + financialaidedu: + aid_amount: + max: 100 + min: 1 + type: int + aid_id: + max: 100 + min: 1 + type: int + aid_type: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + awarded_date: + type: DATE, + student_id: + max: 100 + min: 1 + type: int + financialaidedutwo: + aid_amount: + max: 100 + min: 1 + type: int + aid_date: + type: DATE, + aid_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + financialreports: + net_profit: + max: 100 + min: 1 + type: int + report_date: + type: DATE, + report_id: + max: 100 + min: 1 + type: int + total_expenses: + max: 100 + min: 1 + type: int + total_revenue: + max: 100 + min: 1 + type: int + flagassignments: + assigned_at: + type: timestamp + assignment_id: + max: 100 + min: 1 + type: int + flag_id: + max: 100 + min: 1 + type: int + user_id: + max: 100 + min: 1 + type: int + forumresponses: + content: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + forum_id: + max: 100 + min: 1 + type: int + response_date: + type: DATE, + response_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + gallery_images: + created_at: + type: timestamp + gallery_id: + max: 100 + min: 1 + type: int + image_id: + max: 100 + min: 1 + type: int + image_url: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + goalmetrics: + conversion_count: + type: INT, + goal_id: + max: 100 + min: 1 + type: int + metric_id: + max: 100 + min: 1 + type: int + variant_id: + max: 100 + min: 1 + type: int + goalprogress: + goal_id: + max: 100 + min: 1 + type: int + progress_id: + max: 100 + min: 1 + type: int + progress_percentage: + max: 100 + min: 1 + type: int + goals: + experiment_id: + max: 100 + min: 1 + type: int + goal_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + goal_id: + max: 100 + min: 1 + type: int + grades: + assignment_id: + max: 100 + min: 1 + type: int + enrollment_id: + max: 100 + min: 1 + type: int + grade_id: + max: 100 + min: 1 + type: int + score: + type: FLOAT, + groupmembers: + group_id: + max: 100 + min: 1 + type: int + group_member_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + groupmemberships: + group_id: + max: 100 + min: 1 + type: int + membership_id: + max: 100 + min: 1 + type: int + user_id: + max: 100 + min: 1 + type: int + healthandsafety: + inspection_date: + type: DATE, + safety_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + safety_id: + max: 100 + min: 1 + type: int + healthrecords: + details: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + record_date: + type: DATE, + record_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + incidentreports: + incident_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + report_id: + max: 100 + min: 1 + type: int + reported_at: + type: timestamp + incidentresolutions: + report_id: + max: 100 + min: 1 + type: int + resolution_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + resolution_id: + max: 100 + min: 1 + type: int + resolved_at: + type: timestamp + increpo: + incident_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + report_date: + type: DATE, + report_id: + max: 100 + min: 1 + type: int + influencercollaborations: + campaign_id: + max: 100 + min: 1 + type: int + collaboration_id: + max: 100 + min: 1 + type: int + created_at: + type: timestamp + influencer_id: + max: 100 + min: 1 + type: int + terms: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + influencermarketing: + created_at: + type: timestamp + influencer_id: + max: 100 + min: 1 + type: int + influencer_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + platform: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + initiativeprogress: + initiative_id: + max: 100 + min: 1 + type: int + progress_id: + max: 100 + min: 1 + type: int + progress_percentage: + max: 100 + min: 1 + type: int + instructors: + email: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + first_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + hire_date: + type: DATE, + instructor_id: + max: 100 + min: 1 + type: int + last_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + integrationresults: + executed_at: + type: timestamp + result_id: + max: 100 + min: 1 + type: int + status: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + test_id: + max: 100 + min: 1 + type: int + integrationtests: + expected_outcome: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + test_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + test_id: + max: 100 + min: 1 + type: int + integrityviolations: + policy_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + violation_date: + type: DATE, + violation_id: + max: 100 + min: 1 + type: int + internationalstudents: + country_of_origin: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + international_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + visa_status: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + internships: + application_deadline: + type: DATE, + company_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + internship_id: + max: 100 + min: 1 + type: int + position: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + inventory: + inventory_id: + max: 100 + min: 1 + type: int + last_updated: + type: DATE, + product_id: + max: 100 + min: 1 + type: int + stock_level: + type: INT, + invoices: + amount: + max: 100 + min: 1 + type: int + client_id: + max: 100 + min: 1 + type: int + invoice_date: + type: DATE, + invoice_id: + max: 100 + min: 1 + type: int + status: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + itassets: + asset_id: + max: 100 + min: 1 + type: int + asset_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + purchase_date: + type: DATE, + value: + max: 100 + min: 1 + type: int + itsupporttickets: + employee_id: + max: 100 + min: 1 + type: int + issue_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + status: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + submission_date: + type: DATE, + ticket_id: + max: 100 + min: 1 + type: int + knowledgebasearticles: + article_id: + max: 100 + min: 1 + type: int + content: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + kpitracking: + kpi_id: + max: 100 + min: 1 + type: int + tracked_date: + type: DATE, + tracking_id: + max: 100 + min: 1 + type: int + value: + max: 100 + min: 1 + type: int + laboratoryequipment: + available_units: + type: INT, + equipment_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + equipment_id: + max: 100 + min: 1 + type: int + equipment_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + labreservations: + equipment_id: + max: 100 + min: 1 + type: int + reservation_date: + type: DATE, + reservation_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + leadassignments: + assigned_at: + type: timestamp + assignment_id: + max: 100 + min: 1 + type: int + lead_id: + max: 100 + min: 1 + type: int + user_id: + max: 100 + min: 1 + type: int + leads: + created_at: + type: timestamp + email: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + first_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + last_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + lead_id: + max: 100 + min: 1 + type: int + phone: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + source: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + status: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + leadscoring: + created_at: + type: timestamp + lead_id: + max: 100 + min: 1 + type: int + score: + type: INT, + score_id: + max: 100 + min: 1 + type: int + leadsources: + source_id: + max: 100 + min: 1 + type: int + source_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + legaldocuments: + document_id: + max: 100 + min: 1 + type: int + document_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + upload_date: + type: DATE, + library: + author: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + available_copies: + type: INT, + book_id: + max: 100 + min: 1 + type: int + published_year: + type: INT, + title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + lmsaccounts: + lms_account_id: + max: 100 + min: 1 + type: int + password_hash: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + student_id: + max: 100 + min: 1 + type: int + username: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + loadtestresults: + executed_at: + type: timestamp + load_test_id: + max: 100 + min: 1 + type: int + result_id: + max: 100 + min: 1 + type: int + status: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + loadtests: + expected_load: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + load_test_id: + max: 100 + min: 1 + type: int + test_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + loyaltyprogrammembers: + lead_id: + max: 100 + min: 1 + type: int + member_id: + max: 100 + min: 1 + type: int + points_earned: + max: 100 + min: 1 + type: int + program_id: + max: 100 + min: 1 + type: int + loyaltyredemptions: + member_id: + max: 100 + min: 1 + type: int + redeemed_points: + type: INT, + redemption_date: + type: timestamp + redemption_id: + max: 100 + min: 1 + type: int + markcustomerfeedback: + feedback_id: + max: 100 + min: 1 + type: int + feedback_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + lead_id: + max: 100 + min: 1 + type: int + submitted_at: + type: timestamp + marketinganalytics: + analysis_date: + type: DATE, + analytics_id: + max: 100 + min: 1 + type: int + campaign_id: + max: 100 + min: 1 + type: int + insights: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + marketingautomation: + automation_id: + max: 100 + min: 1 + type: int + created_at: + type: timestamp + name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + trigger_event: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + marketingbudgets: + allocated_amount: + max: 100 + min: 1 + type: int + budget_id: + max: 100 + min: 1 + type: int + campaign_id: + max: 100 + min: 1 + type: int + spent_amount: + max: 100 + min: 1 + type: int + marketingcampaigns: + budget: + max: 100 + min: 1 + type: int + campaign_id: + max: 100 + min: 1 + type: int + campaign_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + end_date: + type: DATE, + start_date: + type: DATE, + marketingcollateral: + collateral_id: + max: 100 + min: 1 + type: int + collateral_type: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + marketingevents: + created_at: + type: timestamp + event_date: + type: DATE, + event_id: + max: 100 + min: 1 + type: int + event_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + event_type: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + marketingeventsfeedback: + created_at: + type: timestamp + event_id: + max: 100 + min: 1 + type: int + feedback_id: + max: 100 + min: 1 + type: int + feedback_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + lead_id: + max: 100 + min: 1 + type: int + marketinggoals: + actual_value: + max: 100 + min: 1 + type: int + created_at: + type: timestamp + goal_id: + max: 100 + min: 1 + type: int + goal_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + target_value: + max: 100 + min: 1 + type: int + marketingkpis: + actual_value: + max: 100 + min: 1 + type: int + created_at: + type: timestamp + kpi_id: + max: 100 + min: 1 + type: int + kpi_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + target_value: + max: 100 + min: 1 + type: int + marketingmaterials: + content: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + material_id: + max: 100 + min: 1 + type: int + material_type: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + marketingpartnerships: + collaboration_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + partner_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + partnership_id: + max: 100 + min: 1 + type: int + marketingperformance: + campaign_id: + max: 100 + min: 1 + type: int + conversions: + type: INT, + created_at: + type: timestamp + leads_generated: + type: INT, + performance_id: + max: 100 + min: 1 + type: int + marketingresearch: + created_at: + type: timestamp + findings: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + research_id: + max: 100 + min: 1 + type: int + topic: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + marketingtechstack: + created_at: + type: timestamp + tech_id: + max: 100 + min: 1 + type: int + tech_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + usage_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + marketingtraining: + created_at: + type: timestamp + training_date: + type: DATE, + training_id: + max: 100 + min: 1 + type: int + training_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + marketingworkshops: + created_at: + type: timestamp + date: + type: DATE, + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + workshop_id: + max: 100 + min: 1 + type: int + workshop_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + marketresearch: + findings: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + research_date: + type: DATE, + research_id: + max: 100 + min: 1 + type: int + research_topic: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + markmarketresearch: + created_at: + type: timestamp + findings: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + research_id: + max: 100 + min: 1 + type: int + research_topic: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + marksurveyresponses: + lead_id: + max: 100 + min: 1 + type: int + question_id: + max: 100 + min: 1 + type: int + response_id: + max: 100 + min: 1 + type: int + response_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + submitted_at: + type: timestamp + materialusage: + campaign_id: + max: 100 + min: 1 + type: int + material_id: + max: 100 + min: 1 + type: int + usage_id: + max: 100 + min: 1 + type: int + mediaeventsvt: + event_date: + type: DATE, + event_id: + max: 100 + min: 1 + type: int + event_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + media_id: + max: 100 + min: 1 + type: int + mediarelations: + contact_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + email: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + media_id: + max: 100 + min: 1 + type: int + phone: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + mediaspend: + amount: + max: 100 + min: 1 + type: int + campaign_id: + max: 100 + min: 1 + type: int + media_type: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + spend_date: + type: DATE, + spend_id: + max: 100 + min: 1 + type: int + meetingattendancevt: + AttendanceVT_id: + max: 100 + min: 1 + type: int + instructor_id: + max: 100 + min: 1 + type: int + meeting_id: + max: 100 + min: 1 + type: int + meetingnotes: + meeting_date: + type: TIMESTAMP, + note_id: + max: 100 + min: 1 + type: int + notes: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + meetingparticipants: + employee_id: + max: 100 + min: 1 + type: int + meeting_id: + max: 100 + min: 1 + type: int + participant_id: + max: 100 + min: 1 + type: int + meetings: + agenda: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + meeting_date: + type: DATE, + meeting_id: + max: 100 + min: 1 + type: int + mentormentee: + mentee_id: + max: 100 + min: 1 + type: int + mentor_id: + max: 100 + min: 1 + type: int + relationship_id: + max: 100 + min: 1 + type: int + start_date: + type: DATE, + metrics: + experiment_id: + max: 100 + min: 1 + type: int + metric_id: + max: 100 + min: 1 + type: int + metric_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + metric_value: + max: 100 + min: 1 + type: int + recorded_at: + type: timestamp + milestones: + milestone_date: + type: DATE, + milestone_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + milestone_id: + max: 100 + min: 1 + type: int + timeline_id: + max: 100 + min: 1 + type: int + notifications: + message: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + notification_id: + max: 100 + min: 1 + type: int + sent_at: + type: timestamp + user_id: + max: 100 + min: 1 + type: int + notify: + message: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + notification_date: + type: DATE, + notification_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + officelocations: + address: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + city: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + location_id: + max: 100 + min: 1 + type: int + state: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + zip: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + officeresources: + location_id: + max: 100 + min: 1 + type: int + quantity: + type: INT, + resource_id: + max: 100 + min: 1 + type: int + resource_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + onlineresources: + course_id: + max: 100 + min: 1 + type: int + resource_id: + max: 100 + min: 1 + type: int + resource_link: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + operationalmetrics: + measurement_date: + type: DATE, + metric_id: + max: 100 + min: 1 + type: int + metric_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + value: + max: 100 + min: 1 + type: int + opportunities: + close_date: + type: DATE, + lead_id: + max: 100 + min: 1 + type: int + opportunity_id: + max: 100 + min: 1 + type: int + opportunity_value: + max: 100 + min: 1 + type: int + stage: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + organizationmembership: + membership_id: + max: 100 + min: 1 + type: int + organization_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + pageviews: + page_url: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + session_id: + max: 100 + min: 1 + type: int + user_id: + max: 100 + min: 1 + type: int + view_id: + max: 100 + min: 1 + type: int + view_time: + type: timestamp + parents: + email: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + first_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + last_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + parent_id: + max: 100 + min: 1 + type: int + phone: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + partnershipactivities: + activity_date: + type: timestamp + activity_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + activity_id: + max: 100 + min: 1 + type: int + partnership_id: + max: 100 + min: 1 + type: int + partnershipengagements: + created_at: + type: timestamp + engagement_id: + max: 100 + min: 1 + type: int + engagement_type: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + lead_id: + max: 100 + min: 1 + type: int + partnership_id: + max: 100 + min: 1 + type: int + partnerships: + end_date: + type: DATE, + partner_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + partnership_id: + max: 100 + min: 1 + type: int + partnership_type: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + start_date: + type: DATE, + passwordresets: + reset_date: + type: DATE, + reset_id: + max: 100 + min: 1 + type: int + user_id: + max: 100 + min: 1 + type: int + paymentmethods: + method_id: + max: 100 + min: 1 + type: int + method_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + payments: + amount: + max: 100 + min: 1 + type: int + invoice_id: + max: 100 + min: 1 + type: int + payment_date: + type: DATE, + payment_id: + max: 100 + min: 1 + type: int + paymentsvt: + amount: + max: 100 + min: 1 + type: int + payment_date: + type: timestamp + payment_id: + max: 100 + min: 1 + type: int + session_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + paymenttransactions: + amount: + max: 100 + min: 1 + type: int + method_id: + max: 100 + min: 1 + type: int + transaction_date: + type: DATE, + transaction_id: + max: 100 + min: 1 + type: int + performancemetrics: + campaign_id: + max: 100 + min: 1 + type: int + conversions: + type: INT, + leads_generated: + type: INT, + metric_id: + max: 100 + min: 1 + type: int + revenue: + max: 100 + min: 1 + type: int + performanceresults: + executed_at: + type: timestamp + performance_test_id: + max: 100 + min: 1 + type: int + result_id: + max: 100 + min: 1 + type: int + status: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + performancereviews: + comments: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + employee_id: + max: 100 + min: 1 + type: int + review_date: + type: DATE, + review_id: + max: 100 + min: 1 + type: int + score: + max: 100 + min: 1 + type: int + performancereviews2: + comments: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + review_id: + max: 100 + min: 1 + type: int + review_period: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + user_id: + max: 100 + min: 1 + type: int + performancetests: + expected_performance: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + performance_test_id: + max: 100 + min: 1 + type: int + test_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + planimplementation: + implementation_date: + type: DATE, + implementation_id: + max: 100 + min: 1 + type: int + plan_id: + max: 100 + min: 1 + type: int + plantesting: + plan_id: + max: 100 + min: 1 + type: int + results: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + test_date: + type: DATE, + test_id: + max: 100 + min: 1 + type: int + policies: + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + policy_id: + max: 100 + min: 1 + type: int + policy_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + policyacknowledgments: + acknowledgment_date: + type: DATE, + acknowledgment_id: + max: 100 + min: 1 + type: int + employee_id: + max: 100 + min: 1 + type: int + policy_id: + max: 100 + min: 1 + type: int + policyupdates: + policy_id: + max: 100 + min: 1 + type: int + update_date: + type: DATE, + update_id: + max: 100 + min: 1 + type: int + procurement: + procurement_date: + type: DATE, + procurement_id: + max: 100 + min: 1 + type: int + supplier_id: + max: 100 + min: 1 + type: int + total_amount: + max: 100 + min: 1 + type: int + productbacklog: + backlog_id: + max: 100 + min: 1 + type: int + created_at: + type: timestamp + item_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + priority: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + productroadmaps: + created_at: + type: timestamp + roadmap_id: + max: 100 + min: 1 + type: int + title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + products: + price: + max: 100 + min: 1 + type: int + product_id: + max: 100 + min: 1 + type: int + product_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + quantity: + max: 100 + min: 1 + type: int + projectassignments: + assignment_id: + max: 100 + min: 1 + type: int + employee_id: + max: 100 + min: 1 + type: int + project_id: + max: 100 + min: 1 + type: int + role: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + projectparticipants: + participant_id: + max: 100 + min: 1 + type: int + project_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + projects: + budget: + max: 100 + min: 1 + type: int + end_date: + type: DATE, + project_id: + max: 100 + min: 1 + type: int + project_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + start_date: + type: DATE, + projectstatus: + last_updated: + type: timestamp + project_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + status: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + status_id: + max: 100 + min: 1 + type: int + projecttimelines: + end_date: + type: DATE, + project_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + start_date: + type: DATE, + timeline_id: + max: 100 + min: 1 + type: int + promotionalcodes: + code_id: + max: 100 + min: 1 + type: int + code_value: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + discount: + max: 100 + min: 1 + type: int + expiration_date: + type: DATE, + purchaseorders: + order_date: + type: DATE, + order_id: + max: 100 + min: 1 + type: int + supplier_id: + max: 100 + min: 1 + type: int + total_amount: + max: 100 + min: 1 + type: int + purchases: + purchase_date: + type: DATE, + purchase_id: + max: 100 + min: 1 + type: int + supplier_id: + max: 100 + min: 1 + type: int + total_amount: + max: 100 + min: 1 + type: int + qaassignments: + qa_assignment_id: + max: 100 + min: 1 + type: int + qa_team_id: + max: 100 + min: 1 + type: int + user_id: + max: 100 + min: 1 + type: int + qareports: + qa_assignment_id: + max: 100 + min: 1 + type: int + report_id: + max: 100 + min: 1 + type: int + report_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + submitted_at: + type: timestamp + qateams: + qa_team_id: + max: 100 + min: 1 + type: int + team_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + referralprograms: + created_at: + type: timestamp + program_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + referral_id: + max: 100 + min: 1 + type: int + reward_type: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + referrals: + referral_id: + max: 100 + min: 1 + type: int + referral_program_id: + max: 100 + min: 1 + type: int + referred_lead_id: + max: 100 + min: 1 + type: int + referrer_id: + max: 100 + min: 1 + type: int + releasenotes: + note: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + note_id: + max: 100 + min: 1 + type: int + release_id: + max: 100 + min: 1 + type: int + releases: + release_date: + type: DATE, + release_id: + max: 100 + min: 1 + type: int + version: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + researchcollaborations: + collaboration_id: + max: 100 + min: 1 + type: int + partner_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + research_id: + max: 100 + min: 1 + type: int + researchprojects: + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + faculty_id: + max: 100 + min: 1 + type: int + project_id: + max: 100 + min: 1 + type: int + project_title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + results: + conversion_rate: + max: 100 + min: 1 + type: int + experiment_id: + max: 100 + min: 1 + type: int + result_id: + max: 100 + min: 1 + type: int + total_users: + type: INT, + variant_id: + max: 100 + min: 1 + type: int + retentionprogramparticipation: + lead_id: + max: 100 + min: 1 + type: int + participation_id: + max: 100 + min: 1 + type: int + retention_program_id: + max: 100 + min: 1 + type: int + retrospectives: + created_at: + type: timestamp + notes: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + retrospective_id: + max: 100 + min: 1 + type: int + session_id: + max: 100 + min: 1 + type: int + riskassessments: + assessed_at: + type: timestamp + assessment_id: + max: 100 + min: 1 + type: int + mitigation_strategy: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + risk_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + riskmanagement: + assessment_date: + type: DATE, + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + risk_id: + max: 100 + min: 1 + type: int + risk_level: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + riskmitigation: + action_taken: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + implementation_date: + type: DATE, + mitigation_id: + max: 100 + min: 1 + type: int + risk_id: + max: 100 + min: 1 + type: int + riskmitigationplans: + mitigation_strategy: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + plan_id: + max: 100 + min: 1 + type: int + risk_id: + max: 100 + min: 1 + type: int + roadmapfeedback: + feedback_id: + max: 100 + min: 1 + type: int + feedback_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + roadmap_id: + max: 100 + min: 1 + type: int + submitted_at: + type: timestamp + user_id: + max: 100 + min: 1 + type: int + roadmapitems: + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + due_date: + type: DATE, + item_id: + max: 100 + min: 1 + type: int + roadmap_id: + max: 100 + min: 1 + type: int + roianalysis: + campaign_id: + max: 100 + min: 1 + type: int + investment: + max: 100 + min: 1 + type: int + roi_id: + max: 100 + min: 1 + type: int + roi_percentage: + max: 100 + min: 1 + type: int + roleassignments: + assignment_id: + max: 100 + min: 1 + type: int + role_id: + max: 100 + min: 1 + type: int + user_id: + max: 100 + min: 1 + type: int + rollouts: + feature_id: + max: 100 + min: 1 + type: int + rollout_date: + type: DATE, + rollout_id: + max: 100 + min: 1 + type: int + rollout_percentage: + max: 100 + min: 1 + type: int + salaries: + employee_id: + max: 100 + min: 1 + type: int + pay_date: + type: DATE, + salary_amount: + max: 100 + min: 1 + type: int + salary_id: + max: 100 + min: 1 + type: int + sales: + product_id: + max: 100 + min: 1 + type: int + quantity: + type: INT, + sale_date: + type: DATE, + sale_id: + max: 100 + min: 1 + type: int + total_amount: + max: 100 + min: 1 + type: int + salesreports: + report_date: + type: DATE, + report_id: + max: 100 + min: 1 + type: int + total_sales: + max: 100 + min: 1 + type: int + salesstrategies: + strategy_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + strategy_id: + max: 100 + min: 1 + type: int + scholarships: + amount: + max: 100 + min: 1 + type: int + eligibility_criteria: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + scholarship_id: + max: 100 + min: 1 + type: int + scholarship_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + scholarshipsoffered: + department_id: + max: 100 + min: 1 + type: int + scholarship_id: + max: 100 + min: 1 + type: int + scholarship_offered_id: + max: 100 + min: 1 + type: int + securityincidents: + incident_date: + type: DATE, + incident_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + incident_id: + max: 100 + min: 1 + type: int + securitytestresults: + executed_at: + type: timestamp + result_id: + max: 100 + min: 1 + type: int + security_test_id: + max: 100 + min: 1 + type: int + status: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + securitytests: + expected_outcome: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + security_test_id: + max: 100 + min: 1 + type: int + test_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + segmentmembers: + lead_id: + max: 100 + min: 1 + type: int + member_id: + max: 100 + min: 1 + type: int + segment_id: + max: 100 + min: 1 + type: int + segmentmemberships: + membership_id: + max: 100 + min: 1 + type: int + segment_id: + max: 100 + min: 1 + type: int + user_id: + max: 100 + min: 1 + type: int + session_feedback: + comments: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + feedback_id: + max: 100 + min: 1 + type: int + rating: + max: 100 + min: 1 + type: int + session_id: + max: 100 + min: 1 + type: int + session_notes: + created_at: + type: timestamp + note_id: + max: 100 + min: 1 + type: int + note_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + session_id: + max: 100 + min: 1 + type: int + session_reschedule: + new_session_date: + type: TIMESTAMP, + reschedule_id: + max: 100 + min: 1 + type: int + session_id: + max: 100 + min: 1 + type: int + sessions: + end_time: + type: TIMESTAMP, + session_id: + max: 100 + min: 1 + type: int + start_time: + type: timestamp + user_id: + max: 100 + min: 1 + type: int + socialmediaaccounts: + account_id: + max: 100 + min: 1 + type: int + handle: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + platform: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + socialmediaanalytics: + analytics_id: + max: 100 + min: 1 + type: int + campaign_id: + max: 100 + min: 1 + type: int + created_at: + type: timestamp + metrics: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + platform: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + socialmediacampaigns: + campaign_id: + max: 100 + min: 1 + type: int + platform: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + post_content: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + scheduled_at: + type: timestamp + sm_campaign_id: + max: 100 + min: 1 + type: int + socialmediaengagement: + engagement_date: + type: DATE, + engagement_id: + max: 100 + min: 1 + type: int + platform: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + student_id: + max: 100 + min: 1 + type: int + socialmediaengagements: + engagement_date: + type: timestamp + engagement_id: + max: 100 + min: 1 + type: int + engagement_type: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + sm_campaign_id: + max: 100 + min: 1 + type: int + socialmediaposts: + account_id: + max: 100 + min: 1 + type: int + content: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + post_date: + type: DATE, + post_id: + max: 100 + min: 1 + type: int + sourcetracking: + lead_id: + max: 100 + min: 1 + type: int + source_id: + max: 100 + min: 1 + type: int + tracked_at: + type: timestamp + tracking_id: + max: 100 + min: 1 + type: int + sponsorships: + amount: + max: 100 + min: 1 + type: int + engagement_id: + max: 100 + min: 1 + type: int + sponsorship_id: + max: 100 + min: 1 + type: int + sprints: + end_date: + type: DATE, + sprint_id: + max: 100 + min: 1 + type: int + sprint_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + start_date: + type: DATE, + sprinttasks: + sprint_id: + max: 100 + min: 1 + type: int + sprint_task_id: + max: 100 + min: 1 + type: int + task_id: + max: 100 + min: 1 + type: int + stackcomponents: + component_id: + max: 100 + min: 1 + type: int + component_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + stack_id: + max: 100 + min: 1 + type: int + staff: + email: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + first_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + hire_date: + type: DATE, + last_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + staff_id: + max: 100 + min: 1 + type: int + staffassignments: + assigned_date: + type: DATE, + assignment_id: + max: 100 + min: 1 + type: int + role_id: + max: 100 + min: 1 + type: int + staff_id: + max: 100 + min: 1 + type: int + staffroles: + role_id: + max: 100 + min: 1 + type: int + role_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + stakeholderengagement: + engagement_date: + type: DATE, + engagement_id: + max: 100 + min: 1 + type: int + stakeholder_id: + max: 100 + min: 1 + type: int + stakeholderfeedback: + feedback_id: + max: 100 + min: 1 + type: int + feedback_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + stakeholder_id: + max: 100 + min: 1 + type: int + submitted_at: + type: timestamp + stakeholders: + email: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + stakeholder_id: + max: 100 + min: 1 + type: int + stakeholdersvt: + contact_person: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + email: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + phone: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + stakeholder_id: + max: 100 + min: 1 + type: int + stakeholder_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + storyassignments: + assignment_id: + max: 100 + min: 1 + type: int + story_id: + max: 100 + min: 1 + type: int + user_id: + max: 100 + min: 1 + type: int + strategicinitiatives: + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + initiative_id: + max: 100 + min: 1 + type: int + initiative_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + strategyimplementation: + implementation_date: + type: DATE, + implementation_id: + max: 100 + min: 1 + type: int + strategy_id: + max: 100 + min: 1 + type: int + student_enrollments: + course_id: + max: 100 + min: 1 + type: int + enrollment_date: + type: timestamp + enrollment_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + studentactivities: + activity_id: + max: 100 + min: 1 + type: int + position: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + student_activity_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + studentawards: + award_id: + max: 100 + min: 1 + type: int + awarded_date: + type: DATE, + student_award_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + studentcommunityservice: + service_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + student_service_id: + max: 100 + min: 1 + type: int + studentcounselingservices: + counseling_service_id: + max: 100 + min: 1 + type: int + student_counseling_service_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + studentfeedback: + feedback_date: + type: DATE, + feedback_id: + max: 100 + min: 1 + type: int + feedback_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + student_id: + max: 100 + min: 1 + type: int + studentfinancialservices: + financial_service_id: + max: 100 + min: 1 + type: int + service_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + student_id: + max: 100 + min: 1 + type: int + visit_date: + type: DATE, + studenthealthservices: + health_service_id: + max: 100 + min: 1 + type: int + service_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + student_id: + max: 100 + min: 1 + type: int + visit_date: + type: DATE, + studenthonors: + awarded_date: + type: DATE, + honor_id: + max: 100 + min: 1 + type: int + student_honor_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + studentinternships: + internship_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + student_internship_id: + max: 100 + min: 1 + type: int + studentjobopportunities: + application_date: + type: DATE, + job_opportunity_id: + max: 100 + min: 1 + type: int + job_title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + student_id: + max: 100 + min: 1 + type: int + studentparents: + parent_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + student_parent_id: + max: 100 + min: 1 + type: int + studentresourceusage: + resource_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + usage_date: + type: DATE, + usage_id: + max: 100 + min: 1 + type: int + studentrights: + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + right_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + students: + date_of_birth: + type: DATE, + email: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + enrollment_date: + type: DATE, + first_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + last_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + student_id: + max: 100 + min: 1 + type: int + studentscholarships: + awarded_date: + type: DATE, + scholarship_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + student_scholarship_id: + max: 100 + min: 1 + type: int + studentsvt: + created_at: + type: timestamp + email: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + first_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + last_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + phone: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + student_id: + max: 100 + min: 1 + type: int + studentvolunteers: + opportunity_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + student_volunteer_id: + max: 100 + min: 1 + type: int + studygroups: + created_date: + type: DATE, + group_id: + max: 100 + min: 1 + type: int + group_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + subjects: + subject_id: + max: 100 + min: 1 + type: int + subject_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + suppliercontracts: + contract_id: + max: 100 + min: 1 + type: int + contract_value: + max: 100 + min: 1 + type: int + end_date: + type: DATE, + start_date: + type: DATE, + supplier_id: + max: 100 + min: 1 + type: int + supplierratings: + comments: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + rating: + max: 100 + min: 1 + type: int + rating_id: + max: 100 + min: 1 + type: int + supplier_id: + max: 100 + min: 1 + type: int + suppliers: + contact_person: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + email: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + phone: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + supplier_id: + max: 100 + min: 1 + type: int + supplier_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + surveyquestions: + question_id: + max: 100 + min: 1 + type: int + question_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + question_type: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + survey_id: + max: 100 + min: 1 + type: int + surveyres: + employee_id: + max: 100 + min: 1 + type: int + response_id: + max: 100 + min: 1 + type: int + response_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + survey_id: + max: 100 + min: 1 + type: int + surveyresponses: + response_id: + max: 100 + min: 1 + type: int + response_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + survey_id: + max: 100 + min: 1 + type: int + user_id: + max: 100 + min: 1 + type: int + surveyresponsesedu: + response_id: + max: 100 + min: 1 + type: int + response_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + student_id: + max: 100 + min: 1 + type: int + survey_id: + max: 100 + min: 1 + type: int + surveys: + created_at: + type: timestamp + survey_id: + max: 100 + min: 1 + type: int + survey_title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + systemmetrics: + metric_id: + max: 100 + min: 1 + type: int + metric_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + metric_value: + max: 100 + min: 1 + type: int + recorded_at: + type: timestamp + targetaudiences: + audience_id: + max: 100 + min: 1 + type: int + campaign_id: + max: 100 + min: 1 + type: int + demographic_details: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + taskcomments: + comment_id: + max: 100 + min: 1 + type: int + comment_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + commented_at: + type: timestamp + task_id: + max: 100 + min: 1 + type: int + user_id: + max: 100 + min: 1 + type: int + taxfilings: + amount: + max: 100 + min: 1 + type: int + filing_date: + type: DATE, + filing_id: + max: 100 + min: 1 + type: int + filing_year: + max: 100 + min: 1 + type: int + technicaldebt: + created_at: + type: timestamp + debt_id: + max: 100 + min: 1 + type: int + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + technicalspecifications: + created_at: + type: timestamp + project_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + spec_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + spec_id: + max: 100 + min: 1 + type: int + technologystack: + stack_id: + max: 100 + min: 1 + type: int + technology_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + technologyupdates: + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tech_id: + max: 100 + min: 1 + type: int + update_date: + type: DATE, + update_id: + max: 100 + min: 1 + type: int + technologyusage: + employee_id: + max: 100 + min: 1 + type: int + tech_id: + max: 100 + min: 1 + type: int + usage_date: + type: DATE, + usage_id: + max: 100 + min: 1 + type: int + techstack: + tech_id: + max: 100 + min: 1 + type: int + tech_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + techstackusage: + campaign_id: + max: 100 + min: 1 + type: int + tech_id: + max: 100 + min: 1 + type: int + usage_id: + max: 100 + min: 1 + type: int + testcases: + expected_result: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + task_id: + max: 100 + min: 1 + type: int + test_case_id: + max: 100 + min: 1 + type: int + test_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + testplans: + created_at: + type: timestamp + experiment_id: + max: 100 + min: 1 + type: int + plan_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + plan_id: + max: 100 + min: 1 + type: int + testresults: + executed_at: + type: timestamp + result_id: + max: 100 + min: 1 + type: int + status: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + test_case_id: + max: 100 + min: 1 + type: int + toolintegrations: + integration_id: + max: 100 + min: 1 + type: int + tool_id: + max: 100 + min: 1 + type: int + user_id: + max: 100 + min: 1 + type: int + trainingattendance: + attendance_id: + max: 100 + min: 1 + type: int + attended: + type: choice + values: + - 'True' + - 'False' + session_id: + max: 100 + min: 1 + type: int + user_id: + max: 100 + min: 1 + type: int + trainingprograms: + end_date: + type: DATE, + program_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + start_date: + type: DATE, + training_id: + max: 100 + min: 1 + type: int + trainingregistrations: + lead_id: + max: 100 + min: 1 + type: int + registered_at: + type: timestamp + registration_id: + max: 100 + min: 1 + type: int + training_id: + max: 100 + min: 1 + type: int + trainingsessions: + scheduled_at: + type: TIMESTAMP, + session_id: + max: 100 + min: 1 + type: int + topic: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + transportationservices: + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + service_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + transport_service_id: + max: 100 + min: 1 + type: int + transportationusage: + student_id: + max: 100 + min: 1 + type: int + transport_service_id: + max: 100 + min: 1 + type: int + usage_date: + type: DATE, + usage_id: + max: 100 + min: 1 + type: int + tuitionfees: + amount: + max: 100 + min: 1 + type: int + due_date: + type: DATE, + fee_id: + max: 100 + min: 1 + type: int + paid_date: + type: DATE, + student_id: + max: 100 + min: 1 + type: int + tutor_admetrics: + ad_id: + max: 100 + min: 1 + type: int + clicks: + type: INT, + impressions: + type: INT, + metric_id: + max: 100 + min: 1 + type: int + tutor_ads: + ad_content: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + ad_id: + max: 100 + min: 1 + type: int + ad_platform: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + tutor_id: + max: 100 + min: 1 + type: int + tutor_answers: + answer_id: + max: 100 + min: 1 + type: int + answer_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + question_id: + max: 100 + min: 1 + type: int + tutor_articles: + article_content: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + article_id: + max: 100 + min: 1 + type: int + article_title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + tutor_id: + max: 100 + min: 1 + type: int + tutor_articles_comments: + article_id: + max: 100 + min: 1 + type: int + comment_id: + max: 100 + min: 1 + type: int + comment_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + student_id: + max: 100 + min: 1 + type: int + tutor_articles_likes: + article_id: + max: 100 + min: 1 + type: int + like_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + tutor_articles_two: + article_content: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + article_id: + max: 100 + min: 1 + type: int + article_title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + tutor_id: + max: 100 + min: 1 + type: int + tutor_audiolectures: + audio_id: + max: 100 + min: 1 + type: int + audio_title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + audio_url: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + tutor_id: + max: 100 + min: 1 + type: int + tutor_availability: + availability_id: + max: 100 + min: 1 + type: int + available: + type: choice + values: + - 'True' + - 'False' + date: + type: DATE, + tutor_id: + max: 100 + min: 1 + type: int + tutor_awards: + award_id: + max: 100 + min: 1 + type: int + award_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + award_year: + type: INT, + tutor_id: + max: 100 + min: 1 + type: int + tutor_awards_comments: + award_id: + max: 100 + min: 1 + type: int + comment_id: + max: 100 + min: 1 + type: int + comment_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + student_id: + max: 100 + min: 1 + type: int + tutor_banners: + banner_id: + max: 100 + min: 1 + type: int + banner_image: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + tutor_id: + max: 100 + min: 1 + type: int + tutor_blog: + blog_content: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + blog_id: + max: 100 + min: 1 + type: int + blog_title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + tutor_id: + max: 100 + min: 1 + type: int + tutor_blog_comments: + blog_id: + max: 100 + min: 1 + type: int + comment_id: + max: 100 + min: 1 + type: int + comment_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + student_id: + max: 100 + min: 1 + type: int + tutor_blog_likes: + blog_id: + max: 100 + min: 1 + type: int + like_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + tutor_bookrecommendations: + author: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + book_title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + recommendation_id: + max: 100 + min: 1 + type: int + tutor_id: + max: 100 + min: 1 + type: int + tutor_categories: + category_id: + max: 100 + min: 1 + type: int + category_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_category_assignment: + assignment_id: + max: 100 + min: 1 + type: int + category_id: + max: 100 + min: 1 + type: int + tutor_id: + max: 100 + min: 1 + type: int + tutor_certifications: + certification_id: + max: 100 + min: 1 + type: int + certification_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + expiration_date: + type: DATE, + issued_date: + type: DATE, + tutor_id: + max: 100 + min: 1 + type: int + tutor_certifications_comments: + certification_id: + max: 100 + min: 1 + type: int + comment_id: + max: 100 + min: 1 + type: int + comment_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + student_id: + max: 100 + min: 1 + type: int + tutor_certifications_two: + certification_id: + max: 100 + min: 1 + type: int + certification_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + issuing_organization: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + year_obtained: + type: INT, + tutor_collaborations: + collaboration_id: + max: 100 + min: 1 + type: int + project_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + project_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + tutor_competitions: + competition_date: + type: DATE, + competition_id: + max: 100 + min: 1 + type: int + competition_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + tutor_conferences: + conference_date: + type: DATE, + conference_id: + max: 100 + min: 1 + type: int + conference_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + tutor_connections: + connection_date: + type: timestamp + connection_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + tutor_id: + max: 100 + min: 1 + type: int + tutor_event_comments: + comment_id: + max: 100 + min: 1 + type: int + comment_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + event_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + tutor_eventparticipation: + event_date: + type: DATE, + event_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + participation_id: + max: 100 + min: 1 + type: int + tutor_id: + max: 100 + min: 1 + type: int + tutor_events: + event_id: + max: 100 + min: 1 + type: int + tutor_event_id: + max: 100 + min: 1 + type: int + tutor_id: + max: 100 + min: 1 + type: int + tutor_experience: + experience_id: + max: 100 + min: 1 + type: int + position: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + previous_employer: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + years_worked: + type: INT, + tutor_feedback: + created_at: + type: timestamp + feedback_id: + max: 100 + min: 1 + type: int + feedback_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + tutor_feedbackresponses: + created_at: + type: timestamp + feedback_id: + max: 100 + min: 1 + type: int + response_id: + max: 100 + min: 1 + type: int + response_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_feedbacksurveys: + created_at: + type: timestamp + survey_id: + max: 100 + min: 1 + type: int + survey_title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + tutor_financials: + created_at: + type: timestamp + expenses: + max: 100 + min: 1 + type: int + financial_id: + max: 100 + min: 1 + type: int + income: + max: 100 + min: 1 + type: int + tutor_id: + max: 100 + min: 1 + type: int + tutor_forum: + created_at: + type: timestamp + forum_content: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + forum_id: + max: 100 + min: 1 + type: int + forum_topic: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + tutor_forum_comments: + comment_id: + max: 100 + min: 1 + type: int + comment_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + forum_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + tutor_galleries: + created_at: + type: timestamp + gallery_id: + max: 100 + min: 1 + type: int + gallery_title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + tutor_galleries_comments: + comment_id: + max: 100 + min: 1 + type: int + comment_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + gallery_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + tutor_goals: + goal_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + goal_id: + max: 100 + min: 1 + type: int + target_date: + type: DATE, + tutor_id: + max: 100 + min: 1 + type: int + tutor_industryconnections: + connection_id: + max: 100 + min: 1 + type: int + contact_info: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + contact_person: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + organization_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + tutor_interactions: + interaction_date: + type: TIMESTAMP, + interaction_id: + max: 100 + min: 1 + type: int + interaction_type: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + student_id: + max: 100 + min: 1 + type: int + tutor_id: + max: 100 + min: 1 + type: int + tutor_languages: + language_id: + max: 100 + min: 1 + type: int + language_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + tutor_languages_spoken: + language_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + spoken_id: + max: 100 + min: 1 + type: int + tutor_id: + max: 100 + min: 1 + type: int + tutor_media: + created_at: + type: timestamp + media_id: + max: 100 + min: 1 + type: int + media_type: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + media_url: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + tutor_media_comments: + comment_id: + max: 100 + min: 1 + type: int + comment_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + media_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + tutor_meeting: + meeting_date: + type: TIMESTAMP, + meeting_duration: + type: INT, + meeting_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + tutor_id: + max: 100 + min: 1 + type: int + tutor_meeting_notes: + created_at: + type: timestamp + meeting_id: + max: 100 + min: 1 + type: int + meeting_note_id: + max: 100 + min: 1 + type: int + note_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_mentorships: + end_date: + type: DATE, + mentee_id: + max: 100 + min: 1 + type: int + mentorship_id: + max: 100 + min: 1 + type: int + start_date: + type: DATE, + tutor_id: + max: 100 + min: 1 + type: int + tutor_networks: + network_id: + max: 100 + min: 1 + type: int + network_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + tutor_notes: + created_at: + type: timestamp + note_id: + max: 100 + min: 1 + type: int + note_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + tutor_partnerships: + partner_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + partnership_date: + type: TIMESTAMP, + partnership_id: + max: 100 + min: 1 + type: int + tutor_id: + max: 100 + min: 1 + type: int + tutor_podcasts: + created_at: + type: timestamp + podcast_id: + max: 100 + min: 1 + type: int + podcast_title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + podcast_url: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + tutor_policies: + created_at: + type: timestamp + policy_id: + max: 100 + min: 1 + type: int + policy_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + tutor_projects: + created_at: + type: timestamp + project_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + project_id: + max: 100 + min: 1 + type: int + project_title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + tutor_projects_comments: + comment_id: + max: 100 + min: 1 + type: int + comment_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + project_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + tutor_projects_likes: + like_id: + max: 100 + min: 1 + type: int + project_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + tutor_qualifications: + institution: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + qualification_id: + max: 100 + min: 1 + type: int + qualification_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + year_obtained: + type: INT, + tutor_questions: + created_at: + type: timestamp + question_id: + max: 100 + min: 1 + type: int + question_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + tutor_ratings: + comments: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + rating: + max: 100 + min: 1 + type: int + rating_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + tutor_id: + max: 100 + min: 1 + type: int + tutor_referrals: + referral_date: + type: timestamp + referral_id: + max: 100 + min: 1 + type: int + referred_student_id: + max: 100 + min: 1 + type: int + tutor_id: + max: 100 + min: 1 + type: int + tutor_reports: + created_at: + type: timestamp + report_id: + max: 100 + min: 1 + type: int + report_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + tutor_resources: + created_at: + type: timestamp + resource_id: + max: 100 + min: 1 + type: int + resource_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + resource_url: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + tutor_resources_comments: + comment_id: + max: 100 + min: 1 + type: int + comment_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + resource_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + tutor_resources_two: + created_at: + type: timestamp + resource_id: + max: 100 + min: 1 + type: int + resource_title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + resource_url: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + tutor_reviews: + created_at: + type: timestamp + review_id: + max: 100 + min: 1 + type: int + review_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + tutor_schedules: + available_day: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + available_time: + type: TIME, + schedule_id: + max: 100 + min: 1 + type: int + tutor_id: + max: 100 + min: 1 + type: int + tutor_session_tags: + session_id: + max: 100 + min: 1 + type: int + tag_id: + max: 100 + min: 1 + type: int + tag_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_skills: + skill_id: + max: 100 + min: 1 + type: int + skill_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + tutor_socialmedia: + platform: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + profile_url: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + social_media_id: + max: 100 + min: 1 + type: int + tutor_id: + max: 100 + min: 1 + type: int + tutor_socialmedia_likes: + like_id: + max: 100 + min: 1 + type: int + social_media_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 + type: int + tutor_socialmediametrics: + created_at: + type: timestamp + engagement_rate: + max: 100 + min: 1 + type: int + followers_count: + type: INT, + metric_id: + max: 100 + min: 1 + type: int + platform: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + tutor_specialties: + specialty_id: + max: 100 + min: 1 + type: int + specialty_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + tutor_statistics: + created_at: + type: timestamp + feedback_count: + type: INT, + session_count: + type: INT, + statistic_id: + max: 100 + min: 1 + type: int + success_rate: + max: 100 + min: 1 + type: int + tutor_id: + max: 100 + min: 1 + type: int + tutor_subjects: + subject_id: + max: 100 + min: 1 + type: int + tutor_id: + max: 100 + min: 1 + type: int + tutor_subject_id: + max: 100 + min: 1 + type: int + tutor_successmetrics: + created_at: + type: timestamp + metric_id: + max: 100 + min: 1 + type: int + metric_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + metric_value: + max: 100 + min: 1 + type: int + tutor_id: + max: 100 + min: 1 + type: int + tutor_successstories: + created_at: + type: timestamp + story_id: + max: 100 + min: 1 + type: int + story_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + student_id: + max: 100 + min: 1 + type: int + tutor_id: + max: 100 + min: 1 + type: int + tutor_timings: + timing_end: + type: TIME, + timing_id: + max: 100 + min: 1 + type: int + timing_start: + type: TIME, + tutor_id: + max: 100 + min: 1 + type: int + tutor_trainingprograms: + created_at: + type: timestamp + program_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + program_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + training_id: + max: 100 + min: 1 + type: int + tutor_id: + max: 100 + min: 1 + type: int + tutor_trainingsessions: + session_date: + type: TIMESTAMP, + session_id: + max: 100 + min: 1 + type: int + session_topic: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + tutor_video_sessions: + session_date: + type: TIMESTAMP, + student_id: + max: 100 + min: 1 + type: int + tutor_id: + max: 100 + min: 1 + type: int + video_session_id: + max: 100 + min: 1 + type: int + tutor_videos: + created_at: + type: timestamp + tutor_id: + max: 100 + min: 1 + type: int + video_id: + max: 100 + min: 1 + type: int + video_title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + video_url: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_videos_two: + created_at: + type: timestamp + tutor_id: + max: 100 + min: 1 + type: int + video_id: + max: 100 + min: 1 + type: int + video_title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + video_url: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_webinars: + tutor_id: + max: 100 + min: 1 + type: int + webinar_date: + type: TIMESTAMP, + webinar_id: + max: 100 + min: 1 + type: int + webinar_title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_websites: + created_at: + type: timestamp + tutor_id: + max: 100 + min: 1 + type: int + website_id: + max: 100 + min: 1 + type: int + website_url: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_workshops: + tutor_id: + max: 100 + min: 1 + type: int + workshop_date: + type: TIMESTAMP, + workshop_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + workshop_id: + max: 100 + min: 1 + type: int + workshop_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutoringevents: + event_date: + type: DATE, event_id: - prefix: event_ - type: uuid - timestamp: + max: 100 + min: 1 + type: int + event_location: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + event_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutoringnotify: + created_at: type: timestamp - event_type: + is_read: type: choice values: - - accident - - maintenance - - other - description: + - 'True' + - 'False' + notification_id: + max: 100 + min: 1 + type: int + notification_text: type: choice values: - - Minor accident - - Scheduled maintenance - - Unscheduled maintenance - - Other event - related_vehicle_id: + - choice 1 + - choice 2 + - choice 3 + user_id: + max: 100 + min: 1 + type: int + tutoringsessions: + session_date: + type: DATE, + session_id: + max: 100 + min: 1 + type: int + session_time: + type: TIME, + student_id: + max: 100 + min: 1 + type: int + tutor_id: + max: 100 + min: 1 + type: int + tutoringsessionstwo: + course_id: + max: 100 + min: 1 + type: int + session_date: + type: TIMESTAMP, + session_duration: + type: INT, + session_id: + max: 100 + min: 1 + type: int + student_id: + max: 100 + min: 1 type: int + tutor_id: + max: 100 min: 1 + type: int + tutorprofiles: + bio: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + profile_id: max: 100 - prefix: vehicle_ - additional_info: - type: JSON + min: 1 + type: int + profile_picture: + type: choice values: - info: "Additional event details" - log_data: - event_id: - type: uuid - prefix: event_ - timestamp: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + tutors: + created_at: type: timestamp - event_type: + email: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + experience_years: + type: INT, + first_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + last_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + phone: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + subject_specialty: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + tutor_id: + max: 100 + min: 1 + type: int + unitbudgets: + budget_amount: + max: 100 + min: 1 + type: int + budget_id: + max: 100 + min: 1 + type: int + unit_id: + max: 100 + min: 1 + type: int + useraccounts: + employee_id: + type: INT, + password_hash: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + user_id: + max: 100 + min: 1 + type: int + username: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + userassignments: + assigned_at: + type: timestamp + assignment_id: + max: 100 + min: 1 + type: int + user_id: + max: 100 + min: 1 + type: int + variant_id: + max: 100 + min: 1 + type: int + userengagements: + engagement_date: + type: timestamp + engagement_id: + max: 100 + min: 1 + type: int + engagement_type: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + user_id: + max: 100 + min: 1 + type: int + usergroups: + group_id: + max: 100 + min: 1 + type: int + group_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + usernotifications: + notification_id: + max: 100 + min: 1 + type: int + notification_text: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + sent_at: + type: timestamp + user_id: + max: 100 + min: 1 + type: int + userpersonas: + behaviors: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: + type: timestamp + demographics: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + persona_id: + max: 100 + min: 1 + type: int + persona_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + primary_goal: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + userpreferences: + preference_id: + max: 100 + min: 1 + type: int + preference_key: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + preference_value: type: choice values: - - button_click - - click - - scroll - page: + - choice 1 + - choice 2 + - choice 3 + user_id: + max: 100 + min: 1 + type: int + userroleassignments: + assigned_at: + type: timestamp + assignment_id: + max: 100 + min: 1 + type: int + role_id: + max: 100 + min: 1 + type: int + user_id: + max: 100 + min: 1 + type: int + userroles: + role_id: + max: 100 + min: 1 + type: int + role_name: type: choice values: - - Home - - About - - Contact Me - - SingleStore Portal - - Docs - browser: + - choice 1 + - choice 2 + - choice 3 + userrolesvt: + role_id: + max: 100 + min: 1 + type: int + role_name: type: choice values: - - Firefox - - Chrome - - Internet Explore - - Microsoft Edge - metadata: - type: JSON + - choice 1 + - choice 2 + - choice 3 + users: + created_at: + type: timestamp + email: + type: choice values: - utm_medium: email - utm_source: outreach - utm_term: s2 - user_data: + - choice 1 + - choice 2 + - choice 3 user_id: - type: uuid - prefix: user_ - sign_up: + max: 100 + min: 1 + type: int + username: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + usersatisfactionsurveys: + submission_date: + type: timestamp + survey_id: + max: 100 + min: 1 + type: int + survey_title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + usersegments: + criteria: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + segment_id: + max: 100 + min: 1 + type: int + segment_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + userstories: + acceptance_criteria: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + created_at: type: timestamp - user_type: + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + story_id: + max: 100 + min: 1 + type: int + variants: + experiment_id: + max: 100 + min: 1 + type: int + variant_id: + max: 100 + min: 1 + type: int + variant_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + vehiclemaintenance: + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + maintenance_date: + type: DATE, + maintenance_id: + max: 100 + min: 1 + type: int + vehicle_id: + max: 100 + min: 1 + type: int + vendormanagement: + contact_person: type: choice values: - - Admin - - User - - Moderator + - choice 1 + - choice 2 + - choice 3 email: type: choice values: - - example@gmail.com - - example@hotmail.com - - example@yahoo.com - phone_number: + - choice 1 + - choice 2 + - choice 3 + phone: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + vendor_id: + max: 100 + min: 1 + type: int + vendor_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + volunteeropportunities: + description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + opportunity_id: + max: 100 + min: 1 + type: int + opportunity_title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + vtcourses2: + course_description: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + course_id: + max: 100 + min: 1 + type: int + course_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + vtevents: + event_date: + type: DATE, + event_id: + max: 100 + min: 1 + type: int + event_name: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + location: type: choice values: - - 415-XXX-XXXX - - 206-XXX-XXXX - - 212-XXX-XXXX + - choice 1 + - choice 2 + - choice 3 + vtstratimplement: + end_date: + type: DATE, + implementation_id: + max: 100 + min: 1 + type: int + start_date: + type: DATE, + strategy_id: + max: 100 + min: 1 + type: int + webinarregistrations: + lead_id: + max: 100 + min: 1 + type: int + registered_at: + type: timestamp + registration_id: + max: 100 + min: 1 + type: int + webinar_id: + max: 100 + min: 1 + type: int + webinars: + scheduled_at: + type: timestamp + title: + type: choice + values: + - choice 1 + - choice 2 + - choice 3 + webinar_id: + max: 100 + min: 1 + type: int + workshopregistrations: + lead_id: + max: 100 + min: 1 + type: int + registered_at: + type: timestamp + registration_id: + max: 100 + min: 1 + type: int + workshop_id: + max: 100 + min: 1 + type: int diff --git a/testing/schema-mapping/example-mysql-schema.sql b/testing/schema-mapping/example-mysql-schema.sql index 3478200..5ffd304 100644 --- a/testing/schema-mapping/example-mysql-schema.sql +++ b/testing/schema-mapping/example-mysql-schema.sql @@ -476,4 +476,4474 @@ CREATE TABLE SecurityTests ( test_description TEXT, expected_outcome TEXT, PRIMARY KEY (security_test_id) -); \ No newline at end of file +); + +-- 50. Security Test Results +CREATE TABLE SecurityTestResults ( + result_id INT NOT NULL AUTO_INCREMENT, + security_test_id INT NOT NULL, + status ENUM('Pass', 'Fail'), + executed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (result_id), + FOREIGN KEY (security_test_id) REFERENCES SecurityTests(security_test_id) +); + +-- 51. Risk Assessments +CREATE TABLE RiskAssessments ( + assessment_id INT NOT NULL AUTO_INCREMENT, + risk_description TEXT, + mitigation_strategy TEXT, + assessed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (assessment_id) +); + +-- 52. Audit Trails +CREATE TABLE AuditTrails ( + trail_id INT NOT NULL AUTO_INCREMENT, + action TEXT, + performed_by INT NOT NULL, + performed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (trail_id), + FOREIGN KEY (performed_by) REFERENCES Users(user_id) +); + +-- 53. Collaboration Tools +CREATE TABLE CollaborationTools ( + tool_id INT NOT NULL AUTO_INCREMENT, + tool_name VARCHAR(100), + PRIMARY KEY (tool_id) +); + +-- 54. Tool Integrations +CREATE TABLE ToolIntegrations ( + integration_id INT NOT NULL AUTO_INCREMENT, + tool_id INT NOT NULL, + user_id INT NOT NULL, + PRIMARY KEY (integration_id), + FOREIGN KEY (tool_id) REFERENCES CollaborationTools(tool_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 55. User Engagements +CREATE TABLE UserEngagements ( + engagement_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + engagement_type VARCHAR(100), + engagement_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (engagement_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 56. Change Requests +CREATE TABLE ChangeRequests ( + request_id INT NOT NULL AUTO_INCREMENT, + description TEXT, + status ENUM('Pending', 'Approved', 'Rejected'), + requested_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (request_id) +); + +-- 57. Change Request Approvals +CREATE TABLE ChangeRequestApprovals ( + approval_id INT NOT NULL AUTO_INCREMENT, + request_id INT NOT NULL, + approved_by INT NOT NULL, + approved_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (approval_id), + FOREIGN KEY (request_id) REFERENCES ChangeRequests(request_id), + FOREIGN KEY (approved_by) REFERENCES Users(user_id) +); + +-- 58. Training Sessions +CREATE TABLE TrainingSessions ( + session_id INT NOT NULL AUTO_INCREMENT, + topic VARCHAR(100), + scheduled_at TIMESTAMP, + PRIMARY KEY (session_id) +); + +-- 59. Training Attendance +CREATE TABLE TrainingAttendance ( + attendance_id INT NOT NULL AUTO_INCREMENT, + session_id INT NOT NULL, + user_id INT NOT NULL, + attended BOOLEAN DEFAULT FALSE, + PRIMARY KEY (attendance_id), + FOREIGN KEY (session_id) REFERENCES TrainingSessions(session_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 60. User Satisfaction Surveys +CREATE TABLE UserSatisfactionSurveys ( + survey_id INT NOT NULL AUTO_INCREMENT, + survey_title VARCHAR(100), + submission_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (survey_id) +); + +-- 61. Survey Responses +CREATE TABLE SurveyResponses ( + response_id INT NOT NULL AUTO_INCREMENT, + survey_id INT NOT NULL, + user_id INT NOT NULL, + response_text TEXT, + PRIMARY KEY (response_id), + FOREIGN KEY (survey_id) REFERENCES UserSatisfactionSurveys(survey_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 62. Analytics +CREATE TABLE Analytics ( + analytics_id INT NOT NULL AUTO_INCREMENT, + experiment_id INT NOT NULL, + metric_name VARCHAR(100), + metric_value DECIMAL(10, 2), + recorded_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (analytics_id), + FOREIGN KEY (experiment_id) REFERENCES Experiments(experiment_id) +); + +-- 63. Product Backlog +CREATE TABLE ProductBacklog ( + backlog_id INT NOT NULL AUTO_INCREMENT, + item_description TEXT, + priority ENUM('Low', 'Medium', 'High'), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (backlog_id) +); + +-- 64. Backlog Refinements +CREATE TABLE BacklogRefinements ( + refinement_id INT NOT NULL AUTO_INCREMENT, + backlog_id INT NOT NULL, + refined_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (refinement_id), + FOREIGN KEY (backlog_id) REFERENCES ProductBacklog(backlog_id) +); + +-- 65. Product Roadmaps +CREATE TABLE ProductRoadmaps ( + roadmap_id INT NOT NULL AUTO_INCREMENT, + title VARCHAR(100), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (roadmap_id) +); + +-- 66. Roadmap Items +CREATE TABLE RoadmapItems ( + item_id INT NOT NULL AUTO_INCREMENT, + roadmap_id INT NOT NULL, + description TEXT, + due_date DATE, + PRIMARY KEY (item_id), + FOREIGN KEY (roadmap_id) REFERENCES ProductRoadmaps(roadmap_id) +); + +-- 67. Incident Reports +CREATE TABLE IncidentReports ( + report_id INT NOT NULL AUTO_INCREMENT, + incident_description TEXT, + reported_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (report_id) +); + +-- 68. Incident Resolutions +CREATE TABLE IncidentResolutions ( + resolution_id INT NOT NULL AUTO_INCREMENT, + report_id INT NOT NULL, + resolution_description TEXT, + resolved_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (resolution_id), + FOREIGN KEY (report_id) REFERENCES IncidentReports(report_id) +); + +-- 69. Communication Logs +CREATE TABLE CommunicationLogs ( + log_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + communication_type VARCHAR(100), + log_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (log_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 70. External Collaborations +CREATE TABLE ExternalCollaborations ( + collaboration_id INT NOT NULL AUTO_INCREMENT, + company_name VARCHAR(100), + contact_person VARCHAR(100), + PRIMARY KEY (collaboration_id) +); + +-- 71. Collaboration Notes +CREATE TABLE CollaborationNotes ( + note_id INT NOT NULL AUTO_INCREMENT, + collaboration_id INT NOT NULL, + note_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (note_id), + FOREIGN KEY (collaboration_id) REFERENCES ExternalCollaborations(collaboration_id) +); + +-- 72. Retrospectives +CREATE TABLE Retrospectives ( + retrospective_id INT NOT NULL AUTO_INCREMENT, + session_id INT NOT NULL, + notes TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (retrospective_id), + FOREIGN KEY (session_id) REFERENCES TrainingSessions(session_id) +); + +-- 73. Performance Reviews +CREATE TABLE PerformanceReviews2 ( + review_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + review_period VARCHAR(50), + comments TEXT, + PRIMARY KEY (review_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 74. User Roles +CREATE TABLE UserRoles ( + role_id INT NOT NULL AUTO_INCREMENT, + role_name VARCHAR(50), + PRIMARY KEY (role_id) +); + +-- 75. User Role Assignments +CREATE TABLE UserRoleAssignments ( + assignment_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + role_id INT NOT NULL, + assigned_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (assignment_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id), + FOREIGN KEY (role_id) REFERENCES UserRoles(role_id) +); + +-- 76. API Keys +CREATE TABLE ApiKeys ( + api_key_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + key_value VARCHAR(255) UNIQUE, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (api_key_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 77. Deployment Logs +CREATE TABLE DeploymentLogs ( + log_id INT NOT NULL AUTO_INCREMENT, + deployment_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + description TEXT, + PRIMARY KEY (log_id) +); + +-- 78. Technical Debt +CREATE TABLE TechnicalDebt ( + debt_id INT NOT NULL AUTO_INCREMENT, + description TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (debt_id) +); + +-- 79. Debt Resolutions +CREATE TABLE DebtResolutions ( + resolution_id INT NOT NULL AUTO_INCREMENT, + debt_id INT NOT NULL, + resolution_description TEXT, + resolved_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (resolution_id), + FOREIGN KEY (debt_id) REFERENCES TechnicalDebt(debt_id) +); + +-- 80. Architecture Reviews +CREATE TABLE ArchitectureReviews ( + review_id INT NOT NULL AUTO_INCREMENT, + description TEXT, + reviewed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (review_id) +); + +-- 81. Technical Specifications +CREATE TABLE TechnicalSpecifications ( + spec_id INT NOT NULL AUTO_INCREMENT, + project_name VARCHAR(100), + spec_description TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (spec_id) +); + +-- 82. Technology Stack +CREATE TABLE TechnologyStack ( + stack_id INT NOT NULL AUTO_INCREMENT, + technology_name VARCHAR(100), + PRIMARY KEY (stack_id) +); + +-- 83. Stack Components +CREATE TABLE StackComponents ( + component_id INT NOT NULL AUTO_INCREMENT, + stack_id INT NOT NULL, + component_name VARCHAR(100), + PRIMARY KEY (component_id), + FOREIGN KEY (stack_id) REFERENCES TechnologyStack(stack_id) +); + +-- 84. Stakeholders +CREATE TABLE Stakeholders ( + stakeholder_id INT NOT NULL AUTO_INCREMENT, + name VARCHAR(100), + email VARCHAR(100) UNIQUE, + PRIMARY KEY (stakeholder_id) +); + +-- 85. Stakeholder Feedback +CREATE TABLE StakeholderFeedback ( + feedback_id INT NOT NULL AUTO_INCREMENT, + stakeholder_id INT NOT NULL, + feedback_text TEXT, + submitted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (feedback_id), + FOREIGN KEY (stakeholder_id) REFERENCES Stakeholders(stakeholder_id) +); + +-- 86. Meeting Notes +CREATE TABLE MeetingNotes ( + note_id INT NOT NULL AUTO_INCREMENT, + meeting_date TIMESTAMP, + notes TEXT, + PRIMARY KEY (note_id) +); + +-- 87. Project Timelines +CREATE TABLE ProjectTimelines ( + timeline_id INT NOT NULL AUTO_INCREMENT, + project_name VARCHAR(100), + start_date DATE, + end_date DATE, + PRIMARY KEY (timeline_id) +); + +-- 88. Milestones +CREATE TABLE Milestones ( + milestone_id INT NOT NULL AUTO_INCREMENT, + timeline_id INT NOT NULL, + milestone_description TEXT, + milestone_date DATE, + PRIMARY KEY (milestone_id), + FOREIGN KEY (timeline_id) REFERENCES ProjectTimelines(timeline_id) +); + +-- 89. Risk Mitigation Plans +CREATE TABLE RiskMitigationPlans ( + plan_id INT NOT NULL AUTO_INCREMENT, + risk_id INT NOT NULL, + mitigation_strategy TEXT, + PRIMARY KEY (plan_id), + FOREIGN KEY (risk_id) REFERENCES RiskAssessments(assessment_id) +); + +-- 90. User Groups +CREATE TABLE UserGroups ( + group_id INT NOT NULL AUTO_INCREMENT, + group_name VARCHAR(100), + PRIMARY KEY (group_id) +); + +-- 91. Group Memberships +CREATE TABLE GroupMemberships ( + membership_id INT NOT NULL AUTO_INCREMENT, + group_id INT NOT NULL, + user_id INT NOT NULL, + PRIMARY KEY (membership_id), + FOREIGN KEY (group_id) REFERENCES UserGroups(group_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 92. User Notifications +CREATE TABLE UserNotifications ( + notification_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + notification_text TEXT, + sent_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (notification_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 93. User Preferences +CREATE TABLE UserPreferences ( + preference_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + preference_key VARCHAR(100), + preference_value VARCHAR(255), + PRIMARY KEY (preference_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 94. Data Privacy Agreements +CREATE TABLE DataPrivacyAgreements ( + agreement_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + agreement_text TEXT, + signed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (agreement_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 95. Compliance Checklists +CREATE TABLE ComplianceChecklists ( + checklist_id INT NOT NULL AUTO_INCREMENT, + checklist_name VARCHAR(100), + PRIMARY KEY (checklist_id) +); + +-- 96. Checklist Items +CREATE TABLE ChecklistItems ( + item_id INT NOT NULL AUTO_INCREMENT, + checklist_id INT NOT NULL, + item_description TEXT, + completed BOOLEAN DEFAULT FALSE, + PRIMARY KEY (item_id), + FOREIGN KEY (checklist_id) REFERENCES ComplianceChecklists(checklist_id) +); + +-- 97. Knowledge Base Articles +CREATE TABLE KnowledgeBaseArticles ( + article_id INT NOT NULL AUTO_INCREMENT, + title VARCHAR(100), + content TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (article_id) +); + +-- 98. Article Feedback +CREATE TABLE ArticleFeedback ( + feedback_id INT NOT NULL AUTO_INCREMENT, + article_id INT NOT NULL, + user_id INT NOT NULL, + feedback_text TEXT, + submitted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (feedback_id), + FOREIGN KEY (article_id) REFERENCES KnowledgeBaseArticles(article_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 99. Roadmap Feedback +CREATE TABLE RoadmapFeedback ( + feedback_id INT NOT NULL AUTO_INCREMENT, + roadmap_id INT NOT NULL, + user_id INT NOT NULL, + feedback_text TEXT, + submitted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (feedback_id), + FOREIGN KEY (roadmap_id) REFERENCES ProductRoadmaps(roadmap_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 100. Project Status +CREATE TABLE ProjectStatus ( + status_id INT NOT NULL AUTO_INCREMENT, + project_name VARCHAR(100), + status ENUM('On Track', 'At Risk', 'Delayed'), + last_updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (status_id) +); + +-- 1. Employees +CREATE TABLE Employees ( + employee_id INT NOT NULL AUTO_INCREMENT, + first_name VARCHAR(50) NOT NULL, + last_name VARCHAR(50) NOT NULL, + email VARCHAR(100) NOT NULL UNIQUE, + phone VARCHAR(15), + hire_date DATE, + job_title VARCHAR(50), + salary DECIMAL(10, 2), + PRIMARY KEY (employee_id) +); + +-- 2. Departments +CREATE TABLE Departments ( + department_id INT NOT NULL AUTO_INCREMENT, + department_name VARCHAR(100) NOT NULL, + location VARCHAR(100), + PRIMARY KEY (department_id) +); + +-- 3. Projects +CREATE TABLE Projects ( + project_id INT NOT NULL AUTO_INCREMENT, + project_name VARCHAR(100) NOT NULL, + start_date DATE, + end_date DATE, + budget DECIMAL(10, 2), + PRIMARY KEY (project_id) +); + +-- 4. Employee Departments +CREATE TABLE EmployeeDepartments ( + emp_dept_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + department_id INT NOT NULL, + start_date DATE, + end_date DATE, + PRIMARY KEY (emp_dept_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id), + FOREIGN KEY (department_id) REFERENCES Departments(department_id) +); + +-- 5. Project Assignments +CREATE TABLE ProjectAssignments ( + assignment_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + project_id INT NOT NULL, + role VARCHAR(50), + PRIMARY KEY (assignment_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id), + FOREIGN KEY (project_id) REFERENCES Projects(project_id) +); + +-- 6. Salaries +CREATE TABLE Salaries ( + salary_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + salary_amount DECIMAL(10, 2) NOT NULL, + pay_date DATE, + PRIMARY KEY (salary_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 7. Performance Reviews +CREATE TABLE PerformanceReviews ( + review_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + review_date DATE, + score INT CHECK (score BETWEEN 1 AND 5), + comments TEXT, + PRIMARY KEY (review_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 8. Attendance +CREATE TABLE Attendance ( + attendance_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + attendance_date DATE, + status ENUM('Present', 'Absent', 'Leave'), + PRIMARY KEY (attendance_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 9. Expenses +CREATE TABLE Expenses ( + expense_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + expense_amount DECIMAL(10, 2), + expense_date DATE, + description TEXT, + PRIMARY KEY (expense_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 10. Clients +CREATE TABLE Clients ( + client_id INT NOT NULL AUTO_INCREMENT, + client_name VARCHAR(100) NOT NULL, + contact_person VARCHAR(100), + phone VARCHAR(15), + email VARCHAR(100), + PRIMARY KEY (client_id) +); + +-- 11. Invoices +CREATE TABLE Invoices ( + invoice_id INT NOT NULL AUTO_INCREMENT, + client_id INT NOT NULL, + invoice_date DATE, + amount DECIMAL(10, 2), + status ENUM('Paid', 'Pending', 'Overdue'), + PRIMARY KEY (invoice_id), + FOREIGN KEY (client_id) REFERENCES Clients(client_id) +); + +-- 12. Payments +CREATE TABLE Payments ( + payment_id INT NOT NULL AUTO_INCREMENT, + invoice_id INT NOT NULL, + payment_date DATE, + amount DECIMAL(10, 2), + PRIMARY KEY (payment_id), + FOREIGN KEY (invoice_id) REFERENCES Invoices(invoice_id) +); + +-- 13. Suppliers +CREATE TABLE Suppliers ( + supplier_id INT NOT NULL AUTO_INCREMENT, + supplier_name VARCHAR(100) NOT NULL, + contact_person VARCHAR(100), + phone VARCHAR(15), + email VARCHAR(100), + PRIMARY KEY (supplier_id) +); + +-- 14. Purchases +CREATE TABLE Purchases ( + purchase_id INT NOT NULL AUTO_INCREMENT, + supplier_id INT NOT NULL, + purchase_date DATE, + total_amount DECIMAL(10, 2), + PRIMARY KEY (purchase_id), + FOREIGN KEY (supplier_id) REFERENCES Suppliers(supplier_id) +); + +-- 15. Products +CREATE TABLE Products ( + product_id INT NOT NULL AUTO_INCREMENT, + product_name VARCHAR(100) NOT NULL, + price DECIMAL(10, 2) NOT NULL, + quantity INT NOT NULL, + PRIMARY KEY (product_id) +); + +-- 16. Inventory +CREATE TABLE Inventory ( + inventory_id INT NOT NULL AUTO_INCREMENT, + product_id INT NOT NULL, + stock_level INT, + last_updated DATE, + PRIMARY KEY (inventory_id), + FOREIGN KEY (product_id) REFERENCES Products(product_id) +); + +-- 17. Meetings +CREATE TABLE Meetings ( + meeting_id INT NOT NULL AUTO_INCREMENT, + meeting_date DATE, + agenda TEXT, + PRIMARY KEY (meeting_id) +); + +-- 18. Meeting Participants +CREATE TABLE MeetingParticipants ( + participant_id INT NOT NULL AUTO_INCREMENT, + meeting_id INT NOT NULL, + employee_id INT NOT NULL, + PRIMARY KEY (participant_id), + FOREIGN KEY (meeting_id) REFERENCES Meetings(meeting_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 19. Training Programs +CREATE TABLE TrainingPrograms ( + training_id INT NOT NULL AUTO_INCREMENT, + program_name VARCHAR(100) NOT NULL, + start_date DATE, + end_date DATE, + PRIMARY KEY (training_id) +); + +-- 20. Employee Training +CREATE TABLE EmployeeTraining ( + training_participation_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + training_id INT NOT NULL, + PRIMARY KEY (training_participation_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id), + FOREIGN KEY (training_id) REFERENCES TrainingPrograms(training_id) +); + +-- 21. Policies +CREATE TABLE Policies ( + policy_id INT NOT NULL AUTO_INCREMENT, + policy_name VARCHAR(100) NOT NULL, + description TEXT, + PRIMARY KEY (policy_id) +); + +-- 22. Policy Acknowledgments +CREATE TABLE PolicyAcknowledgments ( + acknowledgment_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + policy_id INT NOT NULL, + acknowledgment_date DATE, + PRIMARY KEY (acknowledgment_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id), + FOREIGN KEY (policy_id) REFERENCES Policies(policy_id) +); + +-- 23. Company Assets +CREATE TABLE CompanyAssets ( + asset_id INT NOT NULL AUTO_INCREMENT, + asset_name VARCHAR(100) NOT NULL, + purchase_date DATE, + value DECIMAL(10, 2), + PRIMARY KEY (asset_id) +); + +-- 24. Asset Allocation +CREATE TABLE AssetAllocation ( + allocation_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + asset_id INT NOT NULL, + allocation_date DATE, + PRIMARY KEY (allocation_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id), + FOREIGN KEY (asset_id) REFERENCES CompanyAssets(asset_id) +); + +-- 25. Customer Feedback +CREATE TABLE CustomerFeedback ( + feedback_id INT NOT NULL AUTO_INCREMENT, + client_id INT NOT NULL, + feedback_text TEXT, + feedback_date DATE, + PRIMARY KEY (feedback_id), + FOREIGN KEY (client_id) REFERENCES Clients(client_id) +); + +-- 26. Marketing Campaigns +CREATE TABLE MarketingCampaigns ( + campaign_id INT NOT NULL AUTO_INCREMENT, + campaign_name VARCHAR(100) NOT NULL, + start_date DATE, + end_date DATE, + budget DECIMAL(10, 2), + PRIMARY KEY (campaign_id) +); + +-- 27. Campaign Performance +CREATE TABLE CampaignPerformance ( + performance_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + performance_metric VARCHAR(100), + value DECIMAL(10, 2), + PRIMARY KEY (performance_id), + FOREIGN KEY (campaign_id) REFERENCES MarketingCampaigns(campaign_id) +); + +-- 28. Contracts +CREATE TABLE Contracts ( + contract_id INT NOT NULL AUTO_INCREMENT, + client_id INT NOT NULL, + start_date DATE, + end_date DATE, + contract_value DECIMAL(10, 2), + PRIMARY KEY (contract_id), + FOREIGN KEY (client_id) REFERENCES Clients(client_id) +); + +-- 29. Audit Logs +CREATE TABLE AuditLogs ( + log_id INT NOT NULL AUTO_INCREMENT, + action VARCHAR(100), + timestamp DATETIME, + employee_id INT NOT NULL, + PRIMARY KEY (log_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 30. Risk Management +CREATE TABLE RiskManagement ( + risk_id INT NOT NULL AUTO_INCREMENT, + description TEXT, + assessment_date DATE, + risk_level ENUM('Low', 'Medium', 'High'), + PRIMARY KEY (risk_id) +); + +-- 31. Risk Mitigation +CREATE TABLE RiskMitigation ( + mitigation_id INT NOT NULL AUTO_INCREMENT, + risk_id INT NOT NULL, + action_taken TEXT, + implementation_date DATE, + PRIMARY KEY (mitigation_id), + FOREIGN KEY (risk_id) REFERENCES RiskManagement(risk_id) +); + +-- 32. Business Continuity Plans +CREATE TABLE BusinessContinuityPlans ( + plan_id INT NOT NULL AUTO_INCREMENT, + plan_name VARCHAR(100) NOT NULL, + created_date DATE, + PRIMARY KEY (plan_id) +); + +-- 33. Plan Testing +CREATE TABLE PlanTesting ( + test_id INT NOT NULL AUTO_INCREMENT, + plan_id INT NOT NULL, + test_date DATE, + results TEXT, + PRIMARY KEY (test_id), + FOREIGN KEY (plan_id) REFERENCES BusinessContinuityPlans(plan_id) +); + +-- 34. Social Media Accounts +CREATE TABLE SocialMediaAccounts ( + account_id INT NOT NULL AUTO_INCREMENT, + platform VARCHAR(50), + handle VARCHAR(100), + PRIMARY KEY (account_id) +); + +-- 35. Social Media Posts +CREATE TABLE SocialMediaPosts ( + post_id INT NOT NULL AUTO_INCREMENT, + account_id INT NOT NULL, + content TEXT, + post_date DATE, + PRIMARY KEY (post_id), + FOREIGN KEY (account_id) REFERENCES SocialMediaAccounts(account_id) +); + +-- 36. Supplier Contracts +CREATE TABLE SupplierContracts ( + contract_id INT NOT NULL AUTO_INCREMENT, + supplier_id INT NOT NULL, + start_date DATE, + end_date DATE, + contract_value DECIMAL(10, 2), + PRIMARY KEY (contract_id), + FOREIGN KEY (supplier_id) REFERENCES Suppliers(supplier_id) +); + +-- 37. EventsVT +CREATE TABLE EventsVT ( + event_id INT NOT NULL AUTO_INCREMENT, + event_name VARCHAR(100), + event_date DATE, + location VARCHAR(100), + PRIMARY KEY (event_id) +); + +-- 38. Event Participants +CREATE TABLE EventParticipants ( + participant_id INT NOT NULL AUTO_INCREMENT, + event_id INT NOT NULL, + employee_id INT NOT NULL, + PRIMARY KEY (participant_id), + FOREIGN KEY (event_id) REFERENCES EventsVT(event_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 39. Market Research +CREATE TABLE MarketResearch ( + research_id INT NOT NULL AUTO_INCREMENT, + research_topic VARCHAR(100), + findings TEXT, + research_date DATE, + PRIMARY KEY (research_id) +); + +-- 40. Company Policies +CREATE TABLE CompanyPolicies ( + policy_id INT NOT NULL AUTO_INCREMENT, + policy_name VARCHAR(100), + description TEXT, + PRIMARY KEY (policy_id) +); + +-- 41. Employee Complaints +CREATE TABLE EmployeeComplaints ( + complaint_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + complaint_text TEXT, + complaint_date DATE, + PRIMARY KEY (complaint_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 42. Employee Benefits +CREATE TABLE EmployeeBenefits ( + benefit_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + benefit_type VARCHAR(100), + PRIMARY KEY (benefit_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 43. User Accounts +CREATE TABLE UserAccounts ( + user_id INT NOT NULL AUTO_INCREMENT, + username VARCHAR(50) NOT NULL UNIQUE, + password_hash VARCHAR(255) NOT NULL, + employee_id INT, + PRIMARY KEY (user_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 44. Password Resets +CREATE TABLE PasswordResets ( + reset_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + reset_date DATE, + PRIMARY KEY (reset_id), + FOREIGN KEY (user_id) REFERENCES UserAccounts(user_id) +); + +-- 45. IT Assets +CREATE TABLE ITAssets ( + asset_id INT NOT NULL AUTO_INCREMENT, + asset_name VARCHAR(100), + purchase_date DATE, + value DECIMAL(10, 2), + PRIMARY KEY (asset_id) +); + +-- 46. IT Support Tickets +CREATE TABLE ITSupportTickets ( + ticket_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + issue_description TEXT, + submission_date DATE, + status ENUM('Open', 'In Progress', 'Resolved'), + PRIMARY KEY (ticket_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 47. Vendor Management +CREATE TABLE VendorManagement ( + vendor_id INT NOT NULL AUTO_INCREMENT, + vendor_name VARCHAR(100), + contact_person VARCHAR(100), + phone VARCHAR(15), + email VARCHAR(100), + PRIMARY KEY (vendor_id) +); + +-- 48. Purchase Orders +CREATE TABLE PurchaseOrders ( + order_id INT NOT NULL AUTO_INCREMENT, + supplier_id INT NOT NULL, + order_date DATE, + total_amount DECIMAL(10, 2), + PRIMARY KEY (order_id), + FOREIGN KEY (supplier_id) REFERENCES Suppliers(supplier_id) +); + +-- 49. Sales +CREATE TABLE Sales ( + sale_id INT NOT NULL AUTO_INCREMENT, + product_id INT NOT NULL, + sale_date DATE, + quantity INT, + total_amount DECIMAL(10, 2), + PRIMARY KEY (sale_id), + FOREIGN KEY (product_id) REFERENCES Products(product_id) +); + +-- 50. Sales Reports +CREATE TABLE SalesReports ( + report_id INT NOT NULL AUTO_INCREMENT, + report_date DATE, + total_sales DECIMAL(10, 2), + PRIMARY KEY (report_id) +); + +-- 51. Financial Reports +CREATE TABLE FinancialReports ( + report_id INT NOT NULL AUTO_INCREMENT, + report_date DATE, + total_revenue DECIMAL(10, 2), + total_expenses DECIMAL(10, 2), + net_profit DECIMAL(10, 2), + PRIMARY KEY (report_id) +); + +-- 52. Business Goals +CREATE TABLE BusinessGoals ( + goal_id INT NOT NULL AUTO_INCREMENT, + goal_description TEXT, + target_date DATE, + PRIMARY KEY (goal_id) +); + +-- 53. Goal Progress +CREATE TABLE GoalProgress ( + progress_id INT NOT NULL AUTO_INCREMENT, + goal_id INT NOT NULL, + progress_percentage INT CHECK (progress_percentage BETWEEN 0 AND 100), + PRIMARY KEY (progress_id), + FOREIGN KEY (goal_id) REFERENCES BusinessGoals(goal_id) +); + +-- 54. User Roles +CREATE TABLE UserRolesVT ( + role_id INT NOT NULL AUTO_INCREMENT, + role_name VARCHAR(100), + PRIMARY KEY (role_id) +); + +-- 55. Role Assignments +CREATE TABLE RoleAssignments ( + assignment_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + role_id INT NOT NULL, + PRIMARY KEY (assignment_id), + FOREIGN KEY (user_id) REFERENCES UserAccounts(user_id), + FOREIGN KEY (role_id) REFERENCES UserRolesVT(role_id) +); + +-- 56. Feedback Forms +CREATE TABLE FeedbackForms ( + form_id INT NOT NULL AUTO_INCREMENT, + form_title VARCHAR(100), + submission_date DATE, + PRIMARY KEY (form_id) +); + +-- 57. Feedback Responses +CREATE TABLE FeedbackResponses ( + response_id INT NOT NULL AUTO_INCREMENT, + form_id INT NOT NULL, + employee_id INT NOT NULL, + response_text TEXT, + PRIMARY KEY (response_id), + FOREIGN KEY (form_id) REFERENCES FeedbackForms(form_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 58. Document Management +CREATE TABLE DocumentManagement ( + document_id INT NOT NULL AUTO_INCREMENT, + document_name VARCHAR(100), + upload_date DATE, + employee_id INT, + PRIMARY KEY (document_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 59. Legal Documents +CREATE TABLE LegalDocuments ( + document_id INT NOT NULL AUTO_INCREMENT, + document_name VARCHAR(100), + upload_date DATE, + PRIMARY KEY (document_id) +); + +-- 60. Compliance Audits +CREATE TABLE ComplianceAudits ( + audit_id INT NOT NULL AUTO_INCREMENT, + audit_date DATE, + findings TEXT, + PRIMARY KEY (audit_id) +); + +-- 61. Audit Recommendations +CREATE TABLE AuditRecommendations ( + recommendation_id INT NOT NULL AUTO_INCREMENT, + audit_id INT NOT NULL, + recommendation_text TEXT, + PRIMARY KEY (recommendation_id), + FOREIGN KEY (audit_id) REFERENCES ComplianceAudits(audit_id) +); + +-- 62. Tax Filings +CREATE TABLE TaxFilings ( + filing_id INT NOT NULL AUTO_INCREMENT, + filing_year INT NOT NULL, + amount DECIMAL(10, 2), + filing_date DATE, + PRIMARY KEY (filing_id) +); + +-- 63. Payment Methods +CREATE TABLE PaymentMethods ( + method_id INT NOT NULL AUTO_INCREMENT, + method_name VARCHAR(100), + PRIMARY KEY (method_id) +); + +-- 64. Payment Transactions +CREATE TABLE PaymentTransactions ( + transaction_id INT NOT NULL AUTO_INCREMENT, + method_id INT NOT NULL, + amount DECIMAL(10, 2), + transaction_date DATE, + PRIMARY KEY (transaction_id), + FOREIGN KEY (method_id) REFERENCES PaymentMethods(method_id) +); + +-- 65. Business Units +CREATE TABLE BusinessUnits ( + unit_id INT NOT NULL AUTO_INCREMENT, + unit_name VARCHAR(100), + PRIMARY KEY (unit_id) +); + +-- 66. Unit Budgets +CREATE TABLE UnitBudgets ( + budget_id INT NOT NULL AUTO_INCREMENT, + unit_id INT NOT NULL, + budget_amount DECIMAL(10, 2), + PRIMARY KEY (budget_id), + FOREIGN KEY (unit_id) REFERENCES BusinessUnits(unit_id) +); + +-- 67. Strategic Initiatives +CREATE TABLE StrategicInitiatives ( + initiative_id INT NOT NULL AUTO_INCREMENT, + initiative_name VARCHAR(100), + description TEXT, + PRIMARY KEY (initiative_id) +); + +-- 68. Initiative Progress +CREATE TABLE InitiativeProgress ( + progress_id INT NOT NULL AUTO_INCREMENT, + initiative_id INT NOT NULL, + progress_percentage INT CHECK (progress_percentage BETWEEN 0 AND 100), + PRIMARY KEY (progress_id), + FOREIGN KEY (initiative_id) REFERENCES StrategicInitiatives(initiative_id) +); + +-- 69. Media Relations +CREATE TABLE MediaRelations ( + media_id INT NOT NULL AUTO_INCREMENT, + contact_name VARCHAR(100), + phone VARCHAR(15), + email VARCHAR(100), + PRIMARY KEY (media_id) +); + +-- 70. Media EventsVT +CREATE TABLE MediaEventsVT ( + event_id INT NOT NULL AUTO_INCREMENT, + media_id INT NOT NULL, + event_name VARCHAR(100), + event_date DATE, + PRIMARY KEY (event_id), + FOREIGN KEY (media_id) REFERENCES MediaRelations(media_id) +); + +-- 71. StakeholdersVT +CREATE TABLE StakeholdersVT ( + stakeholder_id INT NOT NULL AUTO_INCREMENT, + stakeholder_name VARCHAR(100), + contact_person VARCHAR(100), + phone VARCHAR(15), + email VARCHAR(100), + PRIMARY KEY (stakeholder_id) +); + +-- 72. Stakeholder Engagement +CREATE TABLE StakeholderEngagement ( + engagement_id INT NOT NULL AUTO_INCREMENT, + stakeholder_id INT NOT NULL, + engagement_date DATE, + PRIMARY KEY (engagement_id), + FOREIGN KEY (stakeholder_id) REFERENCES StakeholdersVT(stakeholder_id) +); + +-- 73. Procurement +CREATE TABLE Procurement ( + procurement_id INT NOT NULL AUTO_INCREMENT, + supplier_id INT NOT NULL, + procurement_date DATE, + total_amount DECIMAL(10, 2), + PRIMARY KEY (procurement_id), + FOREIGN KEY (supplier_id) REFERENCES Suppliers(supplier_id) +); + +-- 74. Supplier Ratings +CREATE TABLE SupplierRatings ( + rating_id INT NOT NULL AUTO_INCREMENT, + supplier_id INT NOT NULL, + rating INT CHECK (rating BETWEEN 1 AND 5), + comments TEXT, + PRIMARY KEY (rating_id), + FOREIGN KEY (supplier_id) REFERENCES Suppliers(supplier_id) +); + +-- 75. Company Vehicles +CREATE TABLE CompanyVehicles ( + vehicle_id INT NOT NULL AUTO_INCREMENT, + vehicle_name VARCHAR(100), + purchase_date DATE, + value DECIMAL(10, 2), + PRIMARY KEY (vehicle_id) +); + +-- 76. Vehicle Maintenance +CREATE TABLE VehicleMaintenance ( + maintenance_id INT NOT NULL AUTO_INCREMENT, + vehicle_id INT NOT NULL, + maintenance_date DATE, + description TEXT, + PRIMARY KEY (maintenance_id), + FOREIGN KEY (vehicle_id) REFERENCES CompanyVehicles(vehicle_id) +); + +-- 77. Office Locations +CREATE TABLE OfficeLocations ( + location_id INT NOT NULL AUTO_INCREMENT, + address VARCHAR(255), + city VARCHAR(100), + state VARCHAR(100), + zip VARCHAR(10), + PRIMARY KEY (location_id) +); + +-- 78. Office Resources +CREATE TABLE OfficeResources ( + resource_id INT NOT NULL AUTO_INCREMENT, + location_id INT NOT NULL, + resource_name VARCHAR(100), + quantity INT, + PRIMARY KEY (resource_id), + FOREIGN KEY (location_id) REFERENCES OfficeLocations(location_id) +); + +-- 79. Employee Relocation +CREATE TABLE EmployeeRelocation ( + relocation_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + new_location_id INT NOT NULL, + relocation_date DATE, + PRIMARY KEY (relocation_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id), + FOREIGN KEY (new_location_id) REFERENCES OfficeLocations(location_id) +); + +-- 80. Technology Stack +CREATE TABLE TechStack ( + tech_id INT NOT NULL AUTO_INCREMENT, + tech_name VARCHAR(100), + PRIMARY KEY (tech_id) +); + +-- 81. Technology Usage +CREATE TABLE TechnologyUsage ( + usage_id INT NOT NULL AUTO_INCREMENT, + tech_id INT NOT NULL, + employee_id INT NOT NULL, + usage_date DATE, + PRIMARY KEY (usage_id), + FOREIGN KEY (tech_id) REFERENCES TechStack(tech_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 82. Community Engagement +CREATE TABLE CommunityEngagement ( + engagement_id INT NOT NULL AUTO_INCREMENT, + engagement_name VARCHAR(100), + engagement_date DATE, + PRIMARY KEY (engagement_id) +); + +-- 83. Sponsorships +CREATE TABLE Sponsorships ( + sponsorship_id INT NOT NULL AUTO_INCREMENT, + engagement_id INT NOT NULL, + amount DECIMAL(10, 2), + PRIMARY KEY (sponsorship_id), + FOREIGN KEY (engagement_id) REFERENCES CommunityEngagement(engagement_id) +); + +-- 84. Employee Surveys +CREATE TABLE EmployeeSurveys ( + survey_id INT NOT NULL AUTO_INCREMENT, + survey_title VARCHAR(100), + submission_date DATE, + PRIMARY KEY (survey_id) +); + +-- 85. Survey Responses +CREATE TABLE SurveyRes ( + response_id INT NOT NULL AUTO_INCREMENT, + survey_id INT NOT NULL, + employee_id INT NOT NULL, + response_text TEXT, + PRIMARY KEY (response_id), + FOREIGN KEY (survey_id) REFERENCES EmployeeSurveys(survey_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 86. Disaster Recovery Plans +CREATE TABLE DisasterRecoveryPlans ( + plan_id INT NOT NULL AUTO_INCREMENT, + plan_name VARCHAR(100), + created_date DATE, + PRIMARY KEY (plan_id) +); + +-- 87. Plan Implementation +CREATE TABLE PlanImplementation ( + implementation_id INT NOT NULL AUTO_INCREMENT, + plan_id INT NOT NULL, + implementation_date DATE, + PRIMARY KEY (implementation_id), + FOREIGN KEY (plan_id) REFERENCES DisasterRecoveryPlans(plan_id) +); + +-- 88. Operational Metrics +CREATE TABLE OperationalMetrics ( + metric_id INT NOT NULL AUTO_INCREMENT, + metric_name VARCHAR(100), + value DECIMAL(10, 2), + measurement_date DATE, + PRIMARY KEY (metric_id) +); + +-- 89. Technology Updates +CREATE TABLE TechnologyUpdates ( + update_id INT NOT NULL AUTO_INCREMENT, + tech_id INT NOT NULL, + update_date DATE, + description TEXT, + PRIMARY KEY (update_id), + FOREIGN KEY (tech_id) REFERENCES TechStack(tech_id) +); + +-- 90. Crisis Management +CREATE TABLE CrisisManagement ( + crisis_id INT NOT NULL AUTO_INCREMENT, + crisis_description TEXT, + response_plan TEXT, + PRIMARY KEY (crisis_id) +); + +-- 91. Crisis Response +CREATE TABLE CrisisResponse ( + response_id INT NOT NULL AUTO_INCREMENT, + crisis_id INT NOT NULL, + response_date DATE, + PRIMARY KEY (response_id), + FOREIGN KEY (crisis_id) REFERENCES CrisisManagement(crisis_id) +); + +-- 92. Company EventsVT +CREATE TABLE CompanyEventsVT ( + event_id INT NOT NULL AUTO_INCREMENT, + event_name VARCHAR(100), + event_date DATE, + PRIMARY KEY (event_id) +); + +-- 93. Event Coordination +CREATE TABLE EventCoordination ( + coordination_id INT NOT NULL AUTO_INCREMENT, + event_id INT NOT NULL, + employee_id INT NOT NULL, + PRIMARY KEY (coordination_id), + FOREIGN KEY (event_id) REFERENCES CompanyEventsVT(event_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 94. Sales Strategies +CREATE TABLE SalesStrategies ( + strategy_id INT NOT NULL AUTO_INCREMENT, + strategy_description TEXT, + PRIMARY KEY (strategy_id) +); + +-- 95. Strategy Implementation +CREATE TABLE StrategyImplementation ( + implementation_id INT NOT NULL AUTO_INCREMENT, + strategy_id INT NOT NULL, + implementation_date DATE, + PRIMARY KEY (implementation_id), + FOREIGN KEY (strategy_id) REFERENCES SalesStrategies(strategy_id) +); + +-- 96. Employee Onboarding +CREATE TABLE EmployeeOnboarding ( + onboarding_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + onboarding_date DATE, + PRIMARY KEY (onboarding_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 97. Employee Offboarding +CREATE TABLE EmployeeOffboarding ( + offboarding_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + offboarding_date DATE, + PRIMARY KEY (offboarding_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 98. Health and Safety +CREATE TABLE HealthAndSafety ( + safety_id INT NOT NULL AUTO_INCREMENT, + safety_description TEXT, + inspection_date DATE, + PRIMARY KEY (safety_id) +); + +-- 99. Incident Reports +CREATE TABLE IncRepo ( + report_id INT NOT NULL AUTO_INCREMENT, + incident_description TEXT, + report_date DATE, + PRIMARY KEY (report_id) +); + +-- 100. Security Incidents +CREATE TABLE SecurityIncidents ( + incident_id INT NOT NULL AUTO_INCREMENT, + incident_description TEXT, + incident_date DATE, + PRIMARY KEY (incident_id) +); + +-- 1. Students +CREATE TABLE Students ( + student_id INT NOT NULL AUTO_INCREMENT, + first_name VARCHAR(50) NOT NULL, + last_name VARCHAR(50) NOT NULL, + email VARCHAR(100) UNIQUE NOT NULL, + date_of_birth DATE, + enrollment_date DATE, + PRIMARY KEY (student_id) +); + +-- 2. Courses +CREATE TABLE Courses ( + course_id INT NOT NULL AUTO_INCREMENT, + course_name VARCHAR(100) NOT NULL, + course_description TEXT, + credits INT NOT NULL, + PRIMARY KEY (course_id) +); + +-- 3. Instructors +CREATE TABLE Instructors ( + instructor_id INT NOT NULL AUTO_INCREMENT, + first_name VARCHAR(50) NOT NULL, + last_name VARCHAR(50) NOT NULL, + email VARCHAR(100) UNIQUE NOT NULL, + hire_date DATE, + PRIMARY KEY (instructor_id) +); + +-- 4. Dept +CREATE TABLE Dept ( + department_id INT NOT NULL AUTO_INCREMENT, + department_name VARCHAR(100) NOT NULL, + PRIMARY KEY (department_id) +); + +-- 5. Enrollments +CREATE TABLE Enrollments ( + enrollment_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + course_id INT NOT NULL, + enrollment_date DATE, + grade FLOAT, + PRIMARY KEY (enrollment_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) ON DELETE CASCADE, + FOREIGN KEY (course_id) REFERENCES Courses(course_id) ON DELETE CASCADE +); + +-- 6. Classes +CREATE TABLE Classes ( + class_id INT NOT NULL AUTO_INCREMENT, + course_id INT NOT NULL, + instructor_id INT NOT NULL, + semester VARCHAR(20), + year INT, + PRIMARY KEY (class_id), + FOREIGN KEY (course_id) REFERENCES Courses(course_id), + FOREIGN KEY (instructor_id) REFERENCES Instructors(instructor_id) +); + +-- 7. Assignments +CREATE TABLE Assignments ( + assignment_id INT NOT NULL AUTO_INCREMENT, + class_id INT NOT NULL, + assignment_title VARCHAR(100) NOT NULL, + due_date DATE, + PRIMARY KEY (assignment_id), + FOREIGN KEY (class_id) REFERENCES Classes(class_id) +); + +-- 8. Grades +CREATE TABLE Grades ( + grade_id INT NOT NULL AUTO_INCREMENT, + enrollment_id INT NOT NULL, + assignment_id INT NOT NULL, + score FLOAT, + PRIMARY KEY (grade_id), + FOREIGN KEY (enrollment_id) REFERENCES Enrollments(enrollment_id), + FOREIGN KEY (assignment_id) REFERENCES Assignments(assignment_id) +); + +-- 9. AttendanceVT +CREATE TABLE AttendanceVT ( + AttendanceVT_id INT NOT NULL AUTO_INCREMENT, + class_id INT NOT NULL, + student_id INT NOT NULL, + AttendanceVT_date DATE, + status ENUM('Present', 'Absent') NOT NULL, + PRIMARY KEY (AttendanceVT_id), + FOREIGN KEY (class_id) REFERENCES Classes(class_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 10. Extracurricular Activities +CREATE TABLE Extracurriculars ( + activity_id INT NOT NULL AUTO_INCREMENT, + activity_name VARCHAR(100) NOT NULL, + description TEXT, + PRIMARY KEY (activity_id) +); + +-- 11. Student Activities +CREATE TABLE StudentActivities ( + student_activity_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + activity_id INT NOT NULL, + position VARCHAR(50), + PRIMARY KEY (student_activity_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (activity_id) REFERENCES Extracurriculars(activity_id) +); + +-- 12. Course Prerequisites +CREATE TABLE CoursePrerequisites ( + course_id INT NOT NULL, + prerequisite_course_id INT NOT NULL, + PRIMARY KEY (course_id, prerequisite_course_id), + FOREIGN KEY (course_id) REFERENCES Courses(course_id), + FOREIGN KEY (prerequisite_course_id) REFERENCES Courses(course_id) +); + +-- 13. Course Materials +CREATE TABLE CourseMaterials ( + material_id INT NOT NULL AUTO_INCREMENT, + course_id INT NOT NULL, + material_type ENUM('Textbook', 'Article', 'Video', 'Other') NOT NULL, + material_link VARCHAR(255), + PRIMARY KEY (material_id), + FOREIGN KEY (course_id) REFERENCES Courses(course_id) +); + +-- 14. VTEvents +CREATE TABLE VTEvents ( + event_id INT NOT NULL AUTO_INCREMENT, + event_name VARCHAR(100) NOT NULL, + event_date DATE, + location VARCHAR(255), + PRIMARY KEY (event_id) +); + +-- 15. Event Participation +CREATE TABLE EventParticipation ( + participation_id INT NOT NULL AUTO_INCREMENT, + event_id INT NOT NULL, + student_id INT NOT NULL, + PRIMARY KEY (participation_id), + FOREIGN KEY (event_id) REFERENCES VTEvents(event_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 16. Library +CREATE TABLE Library ( + book_id INT NOT NULL AUTO_INCREMENT, + title VARCHAR(255) NOT NULL, + author VARCHAR(100), + published_year INT, + available_copies INT, + PRIMARY KEY (book_id) +); + +-- 17. Book Loans +CREATE TABLE BookLoans ( + loan_id INT NOT NULL AUTO_INCREMENT, + book_id INT NOT NULL, + student_id INT NOT NULL, + loan_date DATE, + return_date DATE, + PRIMARY KEY (loan_id), + FOREIGN KEY (book_id) REFERENCES Library(book_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 18. Scholarships +CREATE TABLE Scholarships ( + scholarship_id INT NOT NULL AUTO_INCREMENT, + scholarship_name VARCHAR(100) NOT NULL, + amount DECIMAL(10, 2) NOT NULL, + eligibility_criteria TEXT, + PRIMARY KEY (scholarship_id) +); + +-- 19. Student Scholarships +CREATE TABLE StudentScholarships ( + student_scholarship_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + scholarship_id INT NOT NULL, + awarded_date DATE, + PRIMARY KEY (student_scholarship_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (scholarship_id) REFERENCES Scholarships(scholarship_id) +); + +-- 20. Financial Aid +CREATE TABLE FinancialAidEdu ( + aid_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + aid_amount DECIMAL(10, 2), + aid_type ENUM('Grant', 'Loan', 'Work-Study') NOT NULL, + awarded_date DATE, + PRIMARY KEY (aid_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 21. Tuition Fees +CREATE TABLE TuitionFees ( + fee_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + amount DECIMAL(10, 2) NOT NULL, + due_date DATE, + paid_date DATE, + PRIMARY KEY (fee_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 22. Staff +CREATE TABLE Staff ( + staff_id INT NOT NULL AUTO_INCREMENT, + first_name VARCHAR(50) NOT NULL, + last_name VARCHAR(50) NOT NULL, + email VARCHAR(100) UNIQUE NOT NULL, + hire_date DATE, + PRIMARY KEY (staff_id) +); + +-- 23. Staff Roles +CREATE TABLE StaffRoles ( + role_id INT NOT NULL AUTO_INCREMENT, + role_name VARCHAR(100) NOT NULL, + PRIMARY KEY (role_id) +); + +-- 24. Staff Assignments +CREATE TABLE StaffAssignments ( + assignment_id INT NOT NULL AUTO_INCREMENT, + staff_id INT NOT NULL, + role_id INT NOT NULL, + assigned_date DATE, + PRIMARY KEY (assignment_id), + FOREIGN KEY (staff_id) REFERENCES Staff(staff_id), + FOREIGN KEY (role_id) REFERENCES StaffRoles(role_id) +); + +-- 25. Feedback2 +CREATE TABLE Feedback2 ( + feedback_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + feedback_text TEXT, + feedback_date DATE, + PRIMARY KEY (feedback_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 26. Course Feedback2 +CREATE TABLE CourseFeedback ( + course_feedback_id INT NOT NULL AUTO_INCREMENT, + course_id INT NOT NULL, + student_id INT NOT NULL, + feedback_text TEXT, + feedback_date DATE, + PRIMARY KEY (course_feedback_id), + FOREIGN KEY (course_id) REFERENCES Courses(course_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 27. Study Groups +CREATE TABLE StudyGroups ( + group_id INT NOT NULL AUTO_INCREMENT, + group_name VARCHAR(100) NOT NULL, + created_date DATE, + PRIMARY KEY (group_id) +); + +-- 28. Group Members +CREATE TABLE GroupMembers ( + group_member_id INT NOT NULL AUTO_INCREMENT, + group_id INT NOT NULL, + student_id INT NOT NULL, + PRIMARY KEY (group_member_id), + FOREIGN KEY (group_id) REFERENCES StudyGroups(group_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 29. Tutoring Sessions +CREATE TABLE TutoringSessions ( + session_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + student_id INT NOT NULL, + session_date DATE, + session_time TIME, + PRIMARY KEY (session_id), + FOREIGN KEY (tutor_id) REFERENCES Instructors(instructor_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 30. Faculty Meetings +CREATE TABLE FacultyMeetings ( + meeting_id INT NOT NULL AUTO_INCREMENT, + meeting_date DATE, + agenda TEXT, + PRIMARY KEY (meeting_id) +); + +-- 31. Meeting AttendanceVT +CREATE TABLE MeetingAttendanceVT ( + AttendanceVT_id INT NOT NULL AUTO_INCREMENT, + meeting_id INT NOT NULL, + instructor_id INT NOT NULL, + PRIMARY KEY (AttendanceVT_id), + FOREIGN KEY (meeting_id) REFERENCES FacultyMeetings(meeting_id), + FOREIGN KEY (instructor_id) REFERENCES Instructors(instructor_id) +); + +-- 32. Scholarships Offered +CREATE TABLE ScholarshipsOffered ( + scholarship_offered_id INT NOT NULL AUTO_INCREMENT, + scholarship_id INT NOT NULL, + department_id INT NOT NULL, + PRIMARY KEY (scholarship_offered_id), + FOREIGN KEY (scholarship_id) REFERENCES Scholarships(scholarship_id), + FOREIGN KEY (department_id) REFERENCES Dept(department_id) +); + +-- 33. Internship Opportunities +CREATE TABLE Internships ( + internship_id INT NOT NULL AUTO_INCREMENT, + company_name VARCHAR(100) NOT NULL, + position VARCHAR(100) NOT NULL, + application_deadline DATE, + PRIMARY KEY (internship_id) +); + +-- 34. Student Internships +CREATE TABLE StudentInternships ( + student_internship_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + internship_id INT NOT NULL, + PRIMARY KEY (student_internship_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (internship_id) REFERENCES Internships(internship_id) +); + +-- 35. VTEvents Coordination +CREATE TABLE EventCoordinationTwo ( + coordination_id INT NOT NULL AUTO_INCREMENT, + event_id INT NOT NULL, + staff_id INT NOT NULL, + PRIMARY KEY (coordination_id), + FOREIGN KEY (event_id) REFERENCES VTEvents(event_id), + FOREIGN KEY (staff_id) REFERENCES Staff(staff_id) +); + +-- 36. Awards +CREATE TABLE Awards ( + award_id INT NOT NULL AUTO_INCREMENT, + award_name VARCHAR(100) NOT NULL, + description TEXT, + PRIMARY KEY (award_id) +); + +-- 37. Student Awards +CREATE TABLE StudentAwards ( + student_award_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + award_id INT NOT NULL, + awarded_date DATE, + PRIMARY KEY (student_award_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (award_id) REFERENCES Awards(award_id) +); + +-- 38. Research Projects +CREATE TABLE ResearchProjects ( + project_id INT NOT NULL AUTO_INCREMENT, + project_title VARCHAR(100) NOT NULL, + faculty_id INT NOT NULL, + description TEXT, + PRIMARY KEY (project_id), + FOREIGN KEY (faculty_id) REFERENCES Instructors(instructor_id) +); + +-- 39. Project Participants +CREATE TABLE ProjectParticipants ( + participant_id INT NOT NULL AUTO_INCREMENT, + project_id INT NOT NULL, + student_id INT NOT NULL, + PRIMARY KEY (participant_id), + FOREIGN KEY (project_id) REFERENCES ResearchProjects(project_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 40. Course Schedules +CREATE TABLE CourseSchedules ( + schedule_id INT NOT NULL AUTO_INCREMENT, + course_id INT NOT NULL, + class_id INT NOT NULL, + schedule_date DATE, + start_time TIME, + end_time TIME, + PRIMARY KEY (schedule_id), + FOREIGN KEY (course_id) REFERENCES Courses(course_id), + FOREIGN KEY (class_id) REFERENCES Classes(class_id) +); + +-- 41. Classroom Resources +CREATE TABLE ClassroomResources ( + resource_id INT NOT NULL AUTO_INCREMENT, + class_id INT NOT NULL, + resource_type VARCHAR(100), + resource_description TEXT, + PRIMARY KEY (resource_id), + FOREIGN KEY (class_id) REFERENCES Classes(class_id) +); + +-- 42. Academic Calendar +CREATE TABLE AcademicCalendar ( + year INT NOT NULL, + semester VARCHAR(20) NOT NULL, + start_date DATE, + end_date DATE, + PRIMARY KEY (year, semester) +); + +-- 43. Academic Policies +CREATE TABLE AcademicPolicies ( + policy_id INT NOT NULL AUTO_INCREMENT, + policy_title VARCHAR(100) NOT NULL, + description TEXT, + PRIMARY KEY (policy_id) +); + +-- 44. Policy Updates +CREATE TABLE PolicyUpdates ( + update_id INT NOT NULL AUTO_INCREMENT, + policy_id INT NOT NULL, + update_date DATE, + PRIMARY KEY (update_id), + FOREIGN KEY (policy_id) REFERENCES AcademicPolicies(policy_id) +); + +-- 45. Notify +CREATE TABLE Notify ( + notification_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + message TEXT, + notification_date DATE, + PRIMARY KEY (notification_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 46. Parent Information +CREATE TABLE Parents ( + parent_id INT NOT NULL AUTO_INCREMENT, + first_name VARCHAR(50), + last_name VARCHAR(50), + email VARCHAR(100) UNIQUE, + phone VARCHAR(15), + PRIMARY KEY (parent_id) +); + +-- 47. Student Parents +CREATE TABLE StudentParents ( + student_parent_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + parent_id INT NOT NULL, + PRIMARY KEY (student_parent_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (parent_id) REFERENCES Parents(parent_id) +); + +-- 48. Health Records +CREATE TABLE HealthRecords ( + record_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + record_date DATE, + details TEXT, + PRIMARY KEY (record_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 49. Student Rights +CREATE TABLE StudentRights ( + right_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + description TEXT, + PRIMARY KEY (right_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 50. Counseling Sessions +CREATE TABLE CounselingSessions ( + session_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + counselor_id INT NOT NULL, + session_date DATE, + notes TEXT, + PRIMARY KEY (session_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (counselor_id) REFERENCES Instructors(instructor_id) +); + +-- Additional tables can continue in a similar manner to reach 100. +-- Here are more examples to fill up to 100 tables. + +-- 51. Academic Advising +CREATE TABLE AcademicAdvising ( + advising_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + advisor_id INT NOT NULL, + advising_date DATE, + PRIMARY KEY (advising_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (advisor_id) REFERENCES Instructors(instructor_id) +); + +-- 52. Course Evaluations +CREATE TABLE CourseEvaluations ( + evaluation_id INT NOT NULL AUTO_INCREMENT, + course_id INT NOT NULL, + student_id INT NOT NULL, + rating INT CHECK (rating BETWEEN 1 AND 5), + comments TEXT, + PRIMARY KEY (evaluation_id), + FOREIGN KEY (course_id) REFERENCES Courses(course_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 53. Academic Honors +CREATE TABLE AcademicHonors ( + honor_id INT NOT NULL AUTO_INCREMENT, + honor_name VARCHAR(100) NOT NULL, + criteria TEXT, + PRIMARY KEY (honor_id) +); + +-- 54. Student Honors +CREATE TABLE StudentHonors ( + student_honor_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + honor_id INT NOT NULL, + awarded_date DATE, + PRIMARY KEY (student_honor_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (honor_id) REFERENCES AcademicHonors(honor_id) +); + +-- 55. Learning Management System Accounts +CREATE TABLE LMSAccounts ( + lms_account_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + username VARCHAR(50) NOT NULL, + password_hash VARCHAR(255) NOT NULL, + PRIMARY KEY (lms_account_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 56. Discussion Boards +CREATE TABLE DiscussionBoards ( + board_id INT NOT NULL AUTO_INCREMENT, + course_id INT NOT NULL, + title VARCHAR(100) NOT NULL, + created_date DATE, + PRIMARY KEY (board_id), + FOREIGN KEY (course_id) REFERENCES Courses(course_id) +); + +-- 57. Discussion Posts +CREATE TABLE DiscussionPosts ( + post_id INT NOT NULL AUTO_INCREMENT, + board_id INT NOT NULL, + student_id INT NOT NULL, + content TEXT, + post_date DATE, + PRIMARY KEY (post_id), + FOREIGN KEY (board_id) REFERENCES DiscussionBoards(board_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 58. Course Forums +CREATE TABLE CourseForums ( + forum_id INT NOT NULL AUTO_INCREMENT, + course_id INT NOT NULL, + title VARCHAR(100) NOT NULL, + created_date DATE, + PRIMARY KEY (forum_id), + FOREIGN KEY (course_id) REFERENCES Courses(course_id) +); + +-- 59. Forum Responses +CREATE TABLE ForumResponses ( + response_id INT NOT NULL AUTO_INCREMENT, + forum_id INT NOT NULL, + student_id INT NOT NULL, + content TEXT, + response_date DATE, + PRIMARY KEY (response_id), + FOREIGN KEY (forum_id) REFERENCES CourseForums(forum_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 60. Online Resources +CREATE TABLE OnlineResources ( + resource_id INT NOT NULL AUTO_INCREMENT, + course_id INT NOT NULL, + resource_link VARCHAR(255), + PRIMARY KEY (resource_id), + FOREIGN KEY (course_id) REFERENCES Courses(course_id) +); + +-- 61. Laboratory Equipment +CREATE TABLE LaboratoryEquipment ( + equipment_id INT NOT NULL AUTO_INCREMENT, + equipment_name VARCHAR(100) NOT NULL, + equipment_description TEXT, + available_units INT, + PRIMARY KEY (equipment_id) +); + +-- 62. Lab Reservations +CREATE TABLE LabReservations ( + reservation_id INT NOT NULL AUTO_INCREMENT, + equipment_id INT NOT NULL, + student_id INT NOT NULL, + reservation_date DATE, + PRIMARY KEY (reservation_id), + FOREIGN KEY (equipment_id) REFERENCES LaboratoryEquipment(equipment_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 63. Course Announcements +CREATE TABLE CourseAnnouncements ( + announcement_id INT NOT NULL AUTO_INCREMENT, + course_id INT NOT NULL, + announcement_text TEXT, + announcement_date DATE, + PRIMARY KEY (announcement_id), + FOREIGN KEY (course_id) REFERENCES Courses(course_id) +); + +-- 64. Course Subscriptions +CREATE TABLE CourseSubscriptions ( + subscription_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + course_id INT NOT NULL, + subscription_date DATE, + PRIMARY KEY (subscription_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (course_id) REFERENCES Courses(course_id) +); + +-- 65. Volunteer Opportunities +CREATE TABLE VolunteerOpportunities ( + opportunity_id INT NOT NULL AUTO_INCREMENT, + opportunity_title VARCHAR(100) NOT NULL, + description TEXT, + PRIMARY KEY (opportunity_id) +); + +-- 66. Student Volunteers +CREATE TABLE StudentVolunteers ( + student_volunteer_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + opportunity_id INT NOT NULL, + PRIMARY KEY (student_volunteer_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (opportunity_id) REFERENCES VolunteerOpportunities(opportunity_id) +); + +-- 67. Facility Reservations +CREATE TABLE FacilityReservations ( + reservation_id INT NOT NULL AUTO_INCREMENT, + facility_name VARCHAR(100) NOT NULL, + reserved_by INT NOT NULL, + reservation_date DATE, + PRIMARY KEY (reservation_id), + FOREIGN KEY (reserved_by) REFERENCES Staff(staff_id) +); + +-- 68. Conference Participation +CREATE TABLE ConferenceParticipation ( + participation_id INT NOT NULL AUTO_INCREMENT, + conference_name VARCHAR(100) NOT NULL, + student_id INT NOT NULL, + date_of_conference DATE, + PRIMARY KEY (participation_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 69. International Students +CREATE TABLE InternationalStudents ( + international_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + country_of_origin VARCHAR(100), + visa_status VARCHAR(100), + PRIMARY KEY (international_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 70. Mentor-Mentee Relationships +CREATE TABLE MentorMentee ( + relationship_id INT NOT NULL AUTO_INCREMENT, + mentor_id INT NOT NULL, + mentee_id INT NOT NULL, + start_date DATE, + PRIMARY KEY (relationship_id), + FOREIGN KEY (mentor_id) REFERENCES Instructors(instructor_id), + FOREIGN KEY (mentee_id) REFERENCES Students(student_id) +); + +-- 71. Career Services +CREATE TABLE CareerServices ( + service_id INT NOT NULL AUTO_INCREMENT, + service_name VARCHAR(100) NOT NULL, + description TEXT, + PRIMARY KEY (service_id) +); + +-- 72. Career Appointments +CREATE TABLE CareerAppointments ( + appointment_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + service_id INT NOT NULL, + appointment_date DATE, + PRIMARY KEY (appointment_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (service_id) REFERENCES CareerServices(service_id) +); + +-- 73. Alumni +CREATE TABLE Alumni ( + alumni_id INT NOT NULL AUTO_INCREMENT, + first_name VARCHAR(50) NOT NULL, + last_name VARCHAR(50) NOT NULL, + graduation_year INT, + PRIMARY KEY (alumni_id) +); + +-- 74. Alumni Activities +CREATE TABLE AlumniActivities ( + activity_id INT NOT NULL AUTO_INCREMENT, + alumni_id INT NOT NULL, + activity_name VARCHAR(100), + activity_date DATE, + PRIMARY KEY (activity_id), + FOREIGN KEY (alumni_id) REFERENCES Alumni(alumni_id) +); + +-- 75. Campus Facilities +CREATE TABLE CampusFacilities ( + facility_id INT NOT NULL AUTO_INCREMENT, + facility_name VARCHAR(100) NOT NULL, + facility_description TEXT, + PRIMARY KEY (facility_id) +); + +-- 76. Facility Usage +CREATE TABLE FacilityUsage ( + usage_id INT NOT NULL AUTO_INCREMENT, + facility_id INT NOT NULL, + usage_date DATE, + PRIMARY KEY (usage_id), + FOREIGN KEY (facility_id) REFERENCES CampusFacilities(facility_id) +); + +-- 77. Campus VTEvents +CREATE TABLE CampusVTEvents ( + campus_event_id INT NOT NULL AUTO_INCREMENT, + event_name VARCHAR(100) NOT NULL, + event_date DATE, + PRIMARY KEY (campus_event_id) +); + +-- 78. Campus Organizations +CREATE TABLE CampusOrganizations ( + organization_id INT NOT NULL AUTO_INCREMENT, + organization_name VARCHAR(100) NOT NULL, + description TEXT, + PRIMARY KEY (organization_id) +); + +-- 79. Organization Membership +CREATE TABLE OrganizationMembership ( + membership_id INT NOT NULL AUTO_INCREMENT, + organization_id INT NOT NULL, + student_id INT NOT NULL, + PRIMARY KEY (membership_id), + FOREIGN KEY (organization_id) REFERENCES CampusOrganizations(organization_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 80. Campus Surveys +CREATE TABLE CampusSurveys ( + survey_id INT NOT NULL AUTO_INCREMENT, + survey_name VARCHAR(100) NOT NULL, + created_date DATE, + PRIMARY KEY (survey_id) +); + +-- 81. Survey Responses +CREATE TABLE SurveyResponsesEdu ( + response_id INT NOT NULL AUTO_INCREMENT, + survey_id INT NOT NULL, + student_id INT NOT NULL, + response_text TEXT, + PRIMARY KEY (response_id), + FOREIGN KEY (survey_id) REFERENCES CampusSurveys(survey_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 82. Social Media Engagement +CREATE TABLE SocialMediaEngagement ( + engagement_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + platform VARCHAR(100) NOT NULL, + engagement_date DATE, + PRIMARY KEY (engagement_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 83. Transportation Services +CREATE TABLE TransportationServices ( + transport_service_id INT NOT NULL AUTO_INCREMENT, + service_name VARCHAR(100) NOT NULL, + description TEXT, + PRIMARY KEY (transport_service_id) +); + +-- 84. Transportation Usage +CREATE TABLE TransportationUsage ( + usage_id INT NOT NULL AUTO_INCREMENT, + transport_service_id INT NOT NULL, + student_id INT NOT NULL, + usage_date DATE, + PRIMARY KEY (usage_id), + FOREIGN KEY (transport_service_id) REFERENCES TransportationServices(transport_service_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 85. Community Service +CREATE TABLE CommunityService ( + service_id INT NOT NULL AUTO_INCREMENT, + service_name VARCHAR(100) NOT NULL, + description TEXT, + PRIMARY KEY (service_id) +); + +-- 86. Student Community Service +CREATE TABLE StudentCommunityService ( + student_service_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + service_id INT NOT NULL, + PRIMARY KEY (student_service_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (service_id) REFERENCES CommunityService(service_id) +); + +-- 87. Student Health Services +CREATE TABLE StudentHealthServices ( + health_service_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + service_name VARCHAR(100) NOT NULL, + visit_date DATE, + PRIMARY KEY (health_service_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 88. Counseling Services +CREATE TABLE CounselingServices ( + counseling_service_id INT NOT NULL AUTO_INCREMENT, + service_name VARCHAR(100) NOT NULL, + description TEXT, + PRIMARY KEY (counseling_service_id) +); + +-- 89. Student Counseling Services +CREATE TABLE StudentCounselingServices ( + student_counseling_service_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + counseling_service_id INT NOT NULL, + PRIMARY KEY (student_counseling_service_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (counseling_service_id) REFERENCES CounselingServices(counseling_service_id) +); + +-- 90. Student Financial Services +CREATE TABLE StudentFinancialServices ( + financial_service_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + service_name VARCHAR(100) NOT NULL, + visit_date DATE, + PRIMARY KEY (financial_service_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 91. Academic Resources +CREATE TABLE AcademicResources ( + resource_id INT NOT NULL AUTO_INCREMENT, + resource_name VARCHAR(100) NOT NULL, + resource_description TEXT, + PRIMARY KEY (resource_id) +); + +-- 92. Student Resource Usage +CREATE TABLE StudentResourceUsage ( + usage_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + resource_id INT NOT NULL, + usage_date DATE, + PRIMARY KEY (usage_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (resource_id) REFERENCES AcademicResources(resource_id) +); + +-- 93. Course Libraries +CREATE TABLE CourseLibraries ( + library_id INT NOT NULL AUTO_INCREMENT, + course_id INT NOT NULL, + resource_id INT NOT NULL, + PRIMARY KEY (library_id), + FOREIGN KEY (course_id) REFERENCES Courses(course_id), + FOREIGN KEY (resource_id) REFERENCES AcademicResources(resource_id) +); + +-- 94. Academic Integrity Policies +CREATE TABLE AcademicIntegrityPolicies ( + policy_id INT NOT NULL AUTO_INCREMENT, + policy_name VARCHAR(100) NOT NULL, + description TEXT, + PRIMARY KEY (policy_id) +); + +-- 95. Integrity Violations +CREATE TABLE IntegrityViolations ( + violation_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + policy_id INT NOT NULL, + violation_date DATE, + PRIMARY KEY (violation_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (policy_id) REFERENCES AcademicIntegrityPolicies(policy_id) +); + +-- 96. Financial Aid +CREATE TABLE FinancialAidEduTwo ( + aid_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + aid_amount DECIMAL(10, 2), + aid_date DATE, + PRIMARY KEY (aid_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 97. Student Job Opportunities +CREATE TABLE StudentJobOpportunities ( + job_opportunity_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + job_title VARCHAR(100), + application_date DATE, + PRIMARY KEY (job_opportunity_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 98. Campus News +CREATE TABLE CampusNews ( + news_id INT NOT NULL AUTO_INCREMENT, + title VARCHAR(100) NOT NULL, + content TEXT, + published_date DATE, + PRIMARY KEY (news_id) +); + +-- 99. Emergency Contacts +CREATE TABLE EmergencyContacts ( + contact_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + contact_name VARCHAR(100), + contact_phone VARCHAR(15), + relationship VARCHAR(50), + PRIMARY KEY (contact_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 100. Student Feedback2 +CREATE TABLE StudentFeedback ( + feedback_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + feedback_text TEXT, + feedback_date DATE, + PRIMARY KEY (feedback_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 1. Campaigns +CREATE TABLE Campaigns ( + campaign_id INT NOT NULL AUTO_INCREMENT, + campaign_name VARCHAR(100), + start_date DATE, + end_date DATE, + budget DECIMAL(10, 2), + PRIMARY KEY (campaign_id) +); + +-- 2. Campaign Channels +CREATE TABLE CampaignChannels ( + channel_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + channel_name VARCHAR(100), + PRIMARY KEY (channel_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 3. Leads +CREATE TABLE Leads ( + lead_id INT NOT NULL AUTO_INCREMENT, + first_name VARCHAR(50), + last_name VARCHAR(50), + email VARCHAR(100) UNIQUE, + phone VARCHAR(15), + source VARCHAR(100), + status ENUM('New', 'Contacted', 'Qualified', 'Converted', 'Lost'), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (lead_id) +); + +-- 4. Lead Assignments +CREATE TABLE LeadAssignments ( + assignment_id INT NOT NULL AUTO_INCREMENT, + lead_id INT NOT NULL, + user_id INT NOT NULL, + assigned_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (assignment_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 5. Contacts +CREATE TABLE Contacts ( + contact_id INT NOT NULL AUTO_INCREMENT, + lead_id INT NOT NULL, + contact_method VARCHAR(50), + contact_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + notes TEXT, + PRIMARY KEY (contact_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 6. Opportunities +CREATE TABLE Opportunities ( + opportunity_id INT NOT NULL AUTO_INCREMENT, + lead_id INT NOT NULL, + opportunity_value DECIMAL(10, 2), + close_date DATE, + stage ENUM('Prospecting', 'Negotiation', 'Closed Won', 'Closed Lost'), + PRIMARY KEY (opportunity_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 7. Marketing Materials +CREATE TABLE MarketingMaterials ( + material_id INT NOT NULL AUTO_INCREMENT, + material_type VARCHAR(100), + title VARCHAR(100), + content TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (material_id) +); + +-- 8. Material Usage +CREATE TABLE MaterialUsage ( + usage_id INT NOT NULL AUTO_INCREMENT, + material_id INT NOT NULL, + campaign_id INT NOT NULL, + PRIMARY KEY (usage_id), + FOREIGN KEY (material_id) REFERENCES MarketingMaterials(material_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 9. Email Campaigns +CREATE TABLE EmailCampaigns ( + email_campaign_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + subject VARCHAR(100), + body TEXT, + sent_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (email_campaign_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 10. Email Opens +CREATE TABLE EmailOpens ( + open_id INT NOT NULL AUTO_INCREMENT, + email_campaign_id INT NOT NULL, + lead_id INT NOT NULL, + opened_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (open_id), + FOREIGN KEY (email_campaign_id) REFERENCES EmailCampaigns(email_campaign_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 11. Email Clicks +CREATE TABLE EmailClicks ( + click_id INT NOT NULL AUTO_INCREMENT, + email_campaign_id INT NOT NULL, + lead_id INT NOT NULL, + clicked_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (click_id), + FOREIGN KEY (email_campaign_id) REFERENCES EmailCampaigns(email_campaign_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 12. Social Media Campaigns +CREATE TABLE SocialMediaCampaigns ( + sm_campaign_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + platform VARCHAR(100), + post_content TEXT, + scheduled_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (sm_campaign_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 13. Social Media Engagements +CREATE TABLE SocialMediaEngagements ( + engagement_id INT NOT NULL AUTO_INCREMENT, + sm_campaign_id INT NOT NULL, + engagement_type ENUM('Like', 'Share', 'Comment'), + engagement_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (engagement_id), + FOREIGN KEY (sm_campaign_id) REFERENCES SocialMediaCampaigns(sm_campaign_id) +); + +-- 14. Surveys +CREATE TABLE Surveys ( + survey_id INT NOT NULL AUTO_INCREMENT, + survey_title VARCHAR(100), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (survey_id) +); + +-- 15. Survey Questions +CREATE TABLE SurveyQuestions ( + question_id INT NOT NULL AUTO_INCREMENT, + survey_id INT NOT NULL, + question_text TEXT, + question_type ENUM('Multiple Choice', 'Open-Ended'), + PRIMARY KEY (question_id), + FOREIGN KEY (survey_id) REFERENCES Surveys(survey_id) +); + +-- 16. Survey Responses +CREATE TABLE MarkSurveyResponses ( + response_id INT NOT NULL AUTO_INCREMENT, + question_id INT NOT NULL, + lead_id INT NOT NULL, + response_text TEXT, + submitted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (response_id), + FOREIGN KEY (question_id) REFERENCES SurveyQuestions(question_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 17. Market Research +CREATE TABLE MarkMarketResearch ( + research_id INT NOT NULL AUTO_INCREMENT, + research_topic VARCHAR(100), + findings TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (research_id) +); + +-- 18. Competitor Analysis +CREATE TABLE CompetitorAnalysis ( + analysis_id INT NOT NULL AUTO_INCREMENT, + competitor_name VARCHAR(100), + strengths TEXT, + weaknesses TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (analysis_id) +); + +-- 19. User Personas +CREATE TABLE UserPersonas ( + persona_id INT NOT NULL AUTO_INCREMENT, + persona_name VARCHAR(100), + demographics TEXT, + behaviors TEXT, + primary_goal TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (persona_id) +); + +-- 20. Brand Guidelines +CREATE TABLE BrandGuidelines ( + guideline_id INT NOT NULL AUTO_INCREMENT, + guideline_name VARCHAR(100), + content TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (guideline_id) +); + +-- 21. Marketing Budgets +CREATE TABLE MarketingBudgets ( + budget_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + allocated_amount DECIMAL(10, 2), + spent_amount DECIMAL(10, 2) DEFAULT 0, + PRIMARY KEY (budget_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 22. Partnerships +CREATE TABLE Partnerships ( + partnership_id INT NOT NULL AUTO_INCREMENT, + partner_name VARCHAR(100), + partnership_type VARCHAR(100), + start_date DATE, + end_date DATE, + PRIMARY KEY (partnership_id) +); + +-- 23. Partnership Activities +CREATE TABLE PartnershipActivities ( + activity_id INT NOT NULL AUTO_INCREMENT, + partnership_id INT NOT NULL, + activity_description TEXT, + activity_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (activity_id), + FOREIGN KEY (partnership_id) REFERENCES Partnerships(partnership_id) +); + +-- 24. Affiliate Programs +CREATE TABLE AffiliatePrograms ( + program_id INT NOT NULL AUTO_INCREMENT, + program_name VARCHAR(100), + commission_rate DECIMAL(5, 2), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (program_id) +); + +-- 25. Affiliates +CREATE TABLE Affiliates ( + affiliate_id INT NOT NULL AUTO_INCREMENT, + program_id INT NOT NULL, + affiliate_name VARCHAR(100), + contact_email VARCHAR(100) UNIQUE, + PRIMARY KEY (affiliate_id), + FOREIGN KEY (program_id) REFERENCES AffiliatePrograms(program_id) +); + +-- 26. Affiliate Sales +CREATE TABLE AffiliateSales ( + sale_id INT NOT NULL AUTO_INCREMENT, + affiliate_id INT NOT NULL, + lead_id INT NOT NULL, + sale_value DECIMAL(10, 2), + sale_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (sale_id), + FOREIGN KEY (affiliate_id) REFERENCES Affiliates(affiliate_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 27. Event Marketing +CREATE TABLE EventMarketing ( + event_id INT NOT NULL AUTO_INCREMENT, + event_name VARCHAR(100), + event_date DATE, + location VARCHAR(100), + description TEXT, + PRIMARY KEY (event_id) +); + +-- 28. Event Attendees +CREATE TABLE EventAttendees ( + attendee_id INT NOT NULL AUTO_INCREMENT, + event_id INT NOT NULL, + lead_id INT NOT NULL, + registered_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (attendee_id), + FOREIGN KEY (event_id) REFERENCES EventMarketing(event_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 29. Webinars +CREATE TABLE Webinars ( + webinar_id INT NOT NULL AUTO_INCREMENT, + title VARCHAR(100), + scheduled_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (webinar_id) +); + +-- 30. Webinar Registrations +CREATE TABLE WebinarRegistrations ( + registration_id INT NOT NULL AUTO_INCREMENT, + webinar_id INT NOT NULL, + lead_id INT NOT NULL, + registered_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (registration_id), + FOREIGN KEY (webinar_id) REFERENCES Webinars(webinar_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 31. Marketing Automation +CREATE TABLE MarketingAutomation ( + automation_id INT NOT NULL AUTO_INCREMENT, + name VARCHAR(100), + trigger_event VARCHAR(100), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (automation_id) +); + +-- 32. Automation Actions +CREATE TABLE AutomationActions ( + action_id INT NOT NULL AUTO_INCREMENT, + automation_id INT NOT NULL, + action_type VARCHAR(100), + action_details TEXT, + PRIMARY KEY (action_id), + FOREIGN KEY (automation_id) REFERENCES MarketingAutomation(automation_id) +); + +-- 33. Ad Campaigns +CREATE TABLE AdCampaigns ( + ad_campaign_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + ad_platform VARCHAR(100), + ad_content TEXT, + budget DECIMAL(10, 2), + start_date DATE, + end_date DATE, + PRIMARY KEY (ad_campaign_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 34. Ad Performance +CREATE TABLE AdPerformance ( + performance_id INT NOT NULL AUTO_INCREMENT, + ad_campaign_id INT NOT NULL, + impressions INT, + clicks INT, + conversions INT, + cost DECIMAL(10, 2), + PRIMARY KEY (performance_id), + FOREIGN KEY (ad_campaign_id) REFERENCES AdCampaigns(ad_campaign_id) +); + +-- 35. Content Calendar +CREATE TABLE ContentCalendar ( + calendar_id INT NOT NULL AUTO_INCREMENT, + content_type VARCHAR(100), + scheduled_date DATE, + title VARCHAR(100), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (calendar_id) +); + +-- 36. Content Pieces +CREATE TABLE ContentPieces ( + piece_id INT NOT NULL AUTO_INCREMENT, + calendar_id INT NOT NULL, + content_text TEXT, + PRIMARY KEY (piece_id), + FOREIGN KEY (calendar_id) REFERENCES ContentCalendar(calendar_id) +); + +-- 37. Content Engagement +CREATE TABLE ContentEngagement ( + engagement_id INT NOT NULL AUTO_INCREMENT, + piece_id INT NOT NULL, + lead_id INT NOT NULL, + engagement_type ENUM('View', 'Share', 'Comment'), + engagement_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (engagement_id), + FOREIGN KEY (piece_id) REFERENCES ContentPieces(piece_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 38. Customer Feedback +CREATE TABLE MarkCustomerFeedback ( + feedback_id INT NOT NULL AUTO_INCREMENT, + lead_id INT NOT NULL, + feedback_text TEXT, + submitted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (feedback_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 39. Referral Programs +CREATE TABLE ReferralPrograms ( + referral_id INT NOT NULL AUTO_INCREMENT, + program_name VARCHAR(100), + reward_type VARCHAR(100), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (referral_id) +); + +-- 40. Referrals +CREATE TABLE Referrals ( + referral_id INT NOT NULL AUTO_INCREMENT, + referral_program_id INT NOT NULL, + referrer_id INT NOT NULL, + referred_lead_id INT NOT NULL, + PRIMARY KEY (referral_id), + FOREIGN KEY (referral_program_id) REFERENCES ReferralPrograms(referral_id), + FOREIGN KEY (referrer_id) REFERENCES Leads(lead_id), + FOREIGN KEY (referred_lead_id) REFERENCES Leads(lead_id) +); + +-- 41. Competitor Tracking +CREATE TABLE CompetitorTracking ( + tracking_id INT NOT NULL AUTO_INCREMENT, + competitor_name VARCHAR(100), + monitoring_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (tracking_id) +); + +-- 42. Competitor Actions +CREATE TABLE CompetitorActions ( + action_id INT NOT NULL AUTO_INCREMENT, + tracking_id INT NOT NULL, + action_description TEXT, + PRIMARY KEY (action_id), + FOREIGN KEY (tracking_id) REFERENCES CompetitorTracking(tracking_id) +); + +-- 43. Marketing Events +CREATE TABLE MarketingEvents ( + event_id INT NOT NULL AUTO_INCREMENT, + event_name VARCHAR(100), + event_type VARCHAR(100), + event_date DATE, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (event_id) +); + +-- 44. Event Feedback +CREATE TABLE EventFeedback ( + feedback_id INT NOT NULL AUTO_INCREMENT, + event_id INT NOT NULL, + lead_id INT NOT NULL, + feedback_text TEXT, + submitted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (feedback_id), + FOREIGN KEY (event_id) REFERENCES MarketingEvents(event_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 45. Promotional Codes +CREATE TABLE PromotionalCodes ( + code_id INT NOT NULL AUTO_INCREMENT, + code_value VARCHAR(50) UNIQUE, + discount DECIMAL(5, 2), + expiration_date DATE, + PRIMARY KEY (code_id) +); + +-- 46. Code Usage +CREATE TABLE CodeUsage ( + usage_id INT NOT NULL AUTO_INCREMENT, + code_id INT NOT NULL, + lead_id INT NOT NULL, + used_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (usage_id), + FOREIGN KEY (code_id) REFERENCES PromotionalCodes(code_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 47. Performance Metrics +CREATE TABLE PerformanceMetrics ( + metric_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + leads_generated INT, + conversions INT, + revenue DECIMAL(10, 2), + PRIMARY KEY (metric_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 48. ROI Analysis +CREATE TABLE ROIAnalysis ( + roi_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + investment DECIMAL(10, 2), + roi_percentage DECIMAL(5, 2), + PRIMARY KEY (roi_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 49. Budget Allocations +CREATE TABLE BudgetAllocations ( + allocation_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + allocated_amount DECIMAL(10, 2), + PRIMARY KEY (allocation_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 50. Media Spend +CREATE TABLE MediaSpend ( + spend_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + media_type VARCHAR(100), + amount DECIMAL(10, 2), + spend_date DATE, + PRIMARY KEY (spend_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 51. Target Audiences +CREATE TABLE TargetAudiences ( + audience_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + demographic_details TEXT, + PRIMARY KEY (audience_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 52. Marketing Analytics +CREATE TABLE MarketingAnalytics ( + analytics_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + analysis_date DATE, + insights TEXT, + PRIMARY KEY (analytics_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 53. Lead Sources +CREATE TABLE LeadSources ( + source_id INT NOT NULL AUTO_INCREMENT, + source_name VARCHAR(100), + PRIMARY KEY (source_id) +); + +-- 54. Source Tracking +CREATE TABLE SourceTracking ( + tracking_id INT NOT NULL AUTO_INCREMENT, + source_id INT NOT NULL, + lead_id INT NOT NULL, + tracked_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (tracking_id), + FOREIGN KEY (source_id) REFERENCES LeadSources(source_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 55. Brand Awareness +CREATE TABLE BrandAwareness ( + awareness_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + awareness_level ENUM('Low', 'Medium', 'High'), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (awareness_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 56. Brand Perception +CREATE TABLE BrandPerception ( + perception_id INT NOT NULL AUTO_INCREMENT, + lead_id INT NOT NULL, + perception_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (perception_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 57. Influencer Marketing +CREATE TABLE InfluencerMarketing ( + influencer_id INT NOT NULL AUTO_INCREMENT, + influencer_name VARCHAR(100), + platform VARCHAR(100), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (influencer_id) +); + +-- 58. Influencer Collaborations +CREATE TABLE InfluencerCollaborations ( + collaboration_id INT NOT NULL AUTO_INCREMENT, + influencer_id INT NOT NULL, + campaign_id INT NOT NULL, + terms TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (collaboration_id), + FOREIGN KEY (influencer_id) REFERENCES InfluencerMarketing(influencer_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 59. Marketing Collateral +CREATE TABLE MarketingCollateral ( + collateral_id INT NOT NULL AUTO_INCREMENT, + collateral_type VARCHAR(100), + description TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (collateral_id) +); + +-- 60. Collateral Usage +CREATE TABLE CollateralUsage ( + usage_id INT NOT NULL AUTO_INCREMENT, + collateral_id INT NOT NULL, + campaign_id INT NOT NULL, + PRIMARY KEY (usage_id), + FOREIGN KEY (collateral_id) REFERENCES MarketingCollateral(collateral_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 61. Customer Segmentation +CREATE TABLE CustomerSegmentation ( + segment_id INT NOT NULL AUTO_INCREMENT, + segment_name VARCHAR(100), + criteria TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (segment_id) +); + +-- 62. Segment Members +CREATE TABLE SegmentMembers ( + member_id INT NOT NULL AUTO_INCREMENT, + segment_id INT NOT NULL, + lead_id INT NOT NULL, + PRIMARY KEY (member_id), + FOREIGN KEY (segment_id) REFERENCES CustomerSegmentation(segment_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 63. Customer Journey +CREATE TABLE CustomerJourney ( + journey_id INT NOT NULL AUTO_INCREMENT, + lead_id INT NOT NULL, + touchpoints TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (journey_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 64. Marketing Performance +CREATE TABLE MarketingPerformance ( + performance_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + leads_generated INT, + conversions INT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (performance_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 65. Ad Spend Analysis +CREATE TABLE AdSpendAnalysis ( + analysis_id INT NOT NULL AUTO_INCREMENT, + ad_campaign_id INT NOT NULL, + total_spend DECIMAL(10, 2), + leads_generated INT, + conversions INT, + PRIMARY KEY (analysis_id), + FOREIGN KEY (ad_campaign_id) REFERENCES AdCampaigns(ad_campaign_id) +); + +-- 66. Conversion Rates +CREATE TABLE ConversionRates ( + rate_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + conversion_rate DECIMAL(5, 2), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (rate_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 67. Customer Retention +CREATE TABLE CustomerRetention ( + retention_id INT NOT NULL AUTO_INCREMENT, + lead_id INT NOT NULL, + retention_score DECIMAL(5, 2), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (retention_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 68. Churn Analysis +CREATE TABLE ChurnAnalysis ( + churn_id INT NOT NULL AUTO_INCREMENT, + lead_id INT NOT NULL, + churn_reason TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (churn_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 69. Customer Loyalty Programs +CREATE TABLE CustomerLoyaltyPrograms ( + program_id INT NOT NULL AUTO_INCREMENT, + program_name VARCHAR(100), + points_required INT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (program_id) +); + +-- 70. Loyalty Program Members +CREATE TABLE LoyaltyProgramMembers ( + member_id INT NOT NULL AUTO_INCREMENT, + program_id INT NOT NULL, + lead_id INT NOT NULL, + points_earned INT DEFAULT 0, + PRIMARY KEY (member_id), + FOREIGN KEY (program_id) REFERENCES CustomerLoyaltyPrograms(program_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 71. Loyalty Redemptions +CREATE TABLE LoyaltyRedemptions ( + redemption_id INT NOT NULL AUTO_INCREMENT, + member_id INT NOT NULL, + redeemed_points INT, + redemption_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (redemption_id), + FOREIGN KEY (member_id) REFERENCES LoyaltyProgramMembers(member_id) +); + +-- 72. Event Sponsorships +CREATE TABLE EventSponsorships ( + sponsorship_id INT NOT NULL AUTO_INCREMENT, + event_id INT NOT NULL, + sponsor_name VARCHAR(100), + sponsorship_amount DECIMAL(10, 2), + PRIMARY KEY (sponsorship_id), + FOREIGN KEY (event_id) REFERENCES EventMarketing(event_id) +); + +-- 73. Customer Success Stories +CREATE TABLE CustomerSuccessStories ( + story_id INT NOT NULL AUTO_INCREMENT, + lead_id INT NOT NULL, + success_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (story_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 74. Marketing Technology Stack +CREATE TABLE MarketingTechStack ( + tech_id INT NOT NULL AUTO_INCREMENT, + tech_name VARCHAR(100), + usage_description TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (tech_id) +); + +-- 75. Tech Stack Usage +CREATE TABLE TechStackUsage ( + usage_id INT NOT NULL AUTO_INCREMENT, + tech_id INT NOT NULL, + campaign_id INT NOT NULL, + PRIMARY KEY (usage_id), + FOREIGN KEY (tech_id) REFERENCES MarketingTechStack(tech_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 76. Social Media Analytics +CREATE TABLE SocialMediaAnalytics ( + analytics_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + platform VARCHAR(100), + metrics TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (analytics_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 77. Content Performance +CREATE TABLE ContentPerformance ( + performance_id INT NOT NULL AUTO_INCREMENT, + piece_id INT NOT NULL, + metrics TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (performance_id), + FOREIGN KEY (piece_id) REFERENCES ContentPieces(piece_id) +); + +-- 78. Lead Scoring +CREATE TABLE LeadScoring ( + score_id INT NOT NULL AUTO_INCREMENT, + lead_id INT NOT NULL, + score INT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (score_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 79. Account Based Marketing +CREATE TABLE AccountBasedMarketing ( + abm_id INT NOT NULL AUTO_INCREMENT, + account_name VARCHAR(100), + target_audience VARCHAR(100), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (abm_id) +); + +-- 80. ABM Engagements +CREATE TABLE ABMEngagements ( + engagement_id INT NOT NULL AUTO_INCREMENT, + abm_id INT NOT NULL, + lead_id INT NOT NULL, + engagement_type VARCHAR(100), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (engagement_id), + FOREIGN KEY (abm_id) REFERENCES AccountBasedMarketing(abm_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 81. Marketing KPIs +CREATE TABLE MarketingKPIs ( + kpi_id INT NOT NULL AUTO_INCREMENT, + kpi_name VARCHAR(100), + target_value DECIMAL(10, 2), + actual_value DECIMAL(10, 2), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (kpi_id) +); + +-- 82. KPI Tracking +CREATE TABLE KPITracking ( + tracking_id INT NOT NULL AUTO_INCREMENT, + kpi_id INT NOT NULL, + tracked_date DATE, + value DECIMAL(10, 2), + PRIMARY KEY (tracking_id), + FOREIGN KEY (kpi_id) REFERENCES MarketingKPIs(kpi_id) +); + +-- 83. Digital Marketing Strategy +CREATE TABLE DigitalMarketingStrategy ( + strategy_id INT NOT NULL AUTO_INCREMENT, + strategy_name VARCHAR(100), + description TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (strategy_id) +); + +-- 84. Strategy Implementation +CREATE TABLE VTStratImplement ( + implementation_id INT NOT NULL AUTO_INCREMENT, + strategy_id INT NOT NULL, + start_date DATE, + end_date DATE, + PRIMARY KEY (implementation_id), + FOREIGN KEY (strategy_id) REFERENCES DigitalMarketingStrategy(strategy_id) +); + +-- 85. Customer Acquisition +CREATE TABLE CustomerAcquisition ( + acquisition_id INT NOT NULL AUTO_INCREMENT, + lead_id INT NOT NULL, + acquisition_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (acquisition_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 86. Customer Retention Programs +CREATE TABLE CustomerRetentionPrograms ( + retention_program_id INT NOT NULL AUTO_INCREMENT, + program_name VARCHAR(100), + description TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (retention_program_id) +); + +-- 87. Retention Program Participation +CREATE TABLE RetentionProgramParticipation ( + participation_id INT NOT NULL AUTO_INCREMENT, + retention_program_id INT NOT NULL, + lead_id INT NOT NULL, + PRIMARY KEY (participation_id), + FOREIGN KEY (retention_program_id) REFERENCES CustomerRetentionPrograms(retention_program_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 88. Customer Segmentation Criteria +CREATE TABLE CustomerSegmentationCriteria ( + criteria_id INT NOT NULL AUTO_INCREMENT, + segment_id INT NOT NULL, + criteria_text TEXT, + PRIMARY KEY (criteria_id), + FOREIGN KEY (segment_id) REFERENCES CustomerSegmentation(segment_id) +); + +-- 89. Audience Insights +CREATE TABLE AudienceInsights ( + insight_id INT NOT NULL AUTO_INCREMENT, + segment_id INT NOT NULL, + insight_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (insight_id), + FOREIGN KEY (segment_id) REFERENCES CustomerSegmentation(segment_id) +); + +-- 90. Marketing Workshops +CREATE TABLE MarketingWorkshops ( + workshop_id INT NOT NULL AUTO_INCREMENT, + workshop_name VARCHAR(100), + date DATE, + description TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (workshop_id) +); + +-- 91. Workshop Registrations +CREATE TABLE WorkshopRegistrations ( + registration_id INT NOT NULL AUTO_INCREMENT, + workshop_id INT NOT NULL, + lead_id INT NOT NULL, + registered_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (registration_id), + FOREIGN KEY (workshop_id) REFERENCES MarketingWorkshops(workshop_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 92. Marketing Training +CREATE TABLE MarketingTraining ( + training_id INT NOT NULL AUTO_INCREMENT, + training_name VARCHAR(100), + training_date DATE, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (training_id) +); + +-- 93. Training Registrations +CREATE TABLE TrainingRegistrations ( + registration_id INT NOT NULL AUTO_INCREMENT, + training_id INT NOT NULL, + lead_id INT NOT NULL, + registered_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (registration_id), + FOREIGN KEY (training_id) REFERENCES MarketingTraining(training_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 94. Marketing Partnerships +CREATE TABLE MarketingPartnerships ( + partnership_id INT NOT NULL AUTO_INCREMENT, + partner_name VARCHAR(100), + collaboration_description TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (partnership_id) +); + +-- 95. Partnership Engagements +CREATE TABLE PartnershipEngagements ( + engagement_id INT NOT NULL AUTO_INCREMENT, + partnership_id INT NOT NULL, + lead_id INT NOT NULL, + engagement_type VARCHAR(100), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (engagement_id), + FOREIGN KEY (partnership_id) REFERENCES MarketingPartnerships(partnership_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 96. Marketing Research +CREATE TABLE MarketingResearch ( + research_id INT NOT NULL AUTO_INCREMENT, + topic VARCHAR(100), + findings TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (research_id) +); + +-- 97. Research Collaborations +CREATE TABLE ResearchCollaborations ( + collaboration_id INT NOT NULL AUTO_INCREMENT, + research_id INT NOT NULL, + partner_name VARCHAR(100), + PRIMARY KEY (collaboration_id), + FOREIGN KEY (research_id) REFERENCES MarketingResearch(research_id) +); + +-- 98. Campaign Trends +CREATE TABLE CampaignTrends ( + trend_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + trend_description TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (trend_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 99. Marketing Events Feedback +CREATE TABLE MarketingEventsFeedback ( + feedback_id INT NOT NULL AUTO_INCREMENT, + event_id INT NOT NULL, + lead_id INT NOT NULL, + feedback_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (feedback_id), + FOREIGN KEY (event_id) REFERENCES MarketingEvents(event_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 100. Marketing Goals +CREATE TABLE MarketingGoals ( + goal_id INT NOT NULL AUTO_INCREMENT, + goal_name VARCHAR(100), + target_value DECIMAL(10, 2), + actual_value DECIMAL(10, 2), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (goal_id) +); + +-- 1. Tutors +CREATE TABLE Tutors ( + tutor_id INT NOT NULL AUTO_INCREMENT, + first_name VARCHAR(50), + last_name VARCHAR(50), + email VARCHAR(100) UNIQUE, + phone VARCHAR(15), + subject_specialty VARCHAR(100), + experience_years INT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (tutor_id) +); + +-- 2. Tutor Profiles +CREATE TABLE TutorProfiles ( + profile_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + bio TEXT, + profile_picture VARCHAR(255), + PRIMARY KEY (profile_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 3. Subjects +CREATE TABLE Subjects ( + subject_id INT NOT NULL AUTO_INCREMENT, + subject_name VARCHAR(100), + PRIMARY KEY (subject_id) +); + +-- 4. Tutor_Subjects +CREATE TABLE Tutor_Subjects ( + tutor_subject_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + subject_id INT NOT NULL, + PRIMARY KEY (tutor_subject_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), + FOREIGN KEY (subject_id) REFERENCES Subjects(subject_id) +); + +-- 5. StudentsVT +CREATE TABLE StudentsVT ( + student_id INT NOT NULL AUTO_INCREMENT, + first_name VARCHAR(50), + last_name VARCHAR(50), + email VARCHAR(100) UNIQUE, + phone VARCHAR(15), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (student_id) +); + +-- 6. Student_Enrollments +CREATE TABLE Student_Enrollments ( + enrollment_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + course_id INT NOT NULL, + enrollment_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (enrollment_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 7. VTCourses2 +CREATE TABLE VTCourses2 ( + course_id INT NOT NULL AUTO_INCREMENT, + course_name VARCHAR(100), + course_description TEXT, + PRIMARY KEY (course_id) +); + +-- 8. Tutor_Schedules +CREATE TABLE Tutor_Schedules ( + schedule_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + available_day VARCHAR(10), + available_time TIME, + PRIMARY KEY (schedule_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 9. TutoringSessionsTwo +CREATE TABLE TutoringSessionsTwo ( + session_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + student_id INT NOT NULL, + course_id INT NOT NULL, + session_date TIMESTAMP, + session_duration INT, -- in minutes + PRIMARY KEY (session_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id), + FOREIGN KEY (course_id) REFERENCES VTCourses2(course_id) +); + +-- 10. Session_Feedback +CREATE TABLE Session_Feedback ( + feedback_id INT NOT NULL AUTO_INCREMENT, + session_id INT NOT NULL, + rating INT CHECK (rating >= 1 AND rating <= 5), + comments TEXT, + PRIMARY KEY (feedback_id), + FOREIGN KEY (session_id) REFERENCES TutoringSessionsTwo(session_id) +); + +-- 11. Tutor_Ratings +CREATE TABLE Tutor_Ratings ( + rating_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + student_id INT NOT NULL, + rating INT CHECK (rating >= 1 AND rating <= 5), + comments TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (rating_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 12. Tutor_Availability +CREATE TABLE Tutor_Availability ( + availability_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + date DATE, + available BOOLEAN, + PRIMARY KEY (availability_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 13. PaymentsVT +CREATE TABLE PaymentsVT ( + payment_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + session_id INT NOT NULL, + amount DECIMAL(10, 2), + payment_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (payment_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id), + FOREIGN KEY (session_id) REFERENCES TutoringSessionsTwo(session_id) +); + +-- 14. Discounts +CREATE TABLE Discounts ( + discount_id INT NOT NULL AUTO_INCREMENT, + discount_code VARCHAR(50), + discount_percentage DECIMAL(5, 2), + valid_until DATE, + PRIMARY KEY (discount_id) +); + +-- 15. Tutor_Reviews +CREATE TABLE Tutor_Reviews ( + review_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + review_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (review_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 16. TutoringEvents +CREATE TABLE TutoringEvents ( + event_id INT NOT NULL AUTO_INCREMENT, + event_name VARCHAR(100), + event_date DATE, + event_location VARCHAR(255), + PRIMARY KEY (event_id) +); + +-- 17. Event_Attendees +CREATE TABLE Event_Attendees ( + attendee_id INT NOT NULL AUTO_INCREMENT, + event_id INT NOT NULL, + student_id INT NOT NULL, + PRIMARY KEY (attendee_id), + FOREIGN KEY (event_id) REFERENCES TutoringEvents(event_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 18. TutoringNotify +CREATE TABLE TutoringNotify ( + notification_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, -- Can be student or tutor + notification_text TEXT, + is_read BOOLEAN DEFAULT FALSE, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (notification_id) +); + +-- 19. Tutor_Qualifications +CREATE TABLE Tutor_Qualifications ( + qualification_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + qualification_name VARCHAR(100), + institution VARCHAR(100), + year_obtained INT, + PRIMARY KEY (qualification_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 20. Tutor_Experience +CREATE TABLE Tutor_Experience ( + experience_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + previous_employer VARCHAR(100), + position VARCHAR(100), + years_worked INT, + PRIMARY KEY (experience_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 21. Tutor_Specialties +CREATE TABLE Tutor_Specialties ( + specialty_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + specialty_name VARCHAR(100), + PRIMARY KEY (specialty_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 22. Tutor_Skills +CREATE TABLE Tutor_Skills ( + skill_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + skill_name VARCHAR(100), + PRIMARY KEY (skill_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 23. Tutor_Timings +CREATE TABLE Tutor_Timings ( + timing_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + timing_start TIME, + timing_end TIME, + PRIMARY KEY (timing_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 24. Tutor_Languages +CREATE TABLE Tutor_Languages ( + language_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + language_name VARCHAR(100), + PRIMARY KEY (language_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 25. Session_Notes +CREATE TABLE Session_Notes ( + note_id INT NOT NULL AUTO_INCREMENT, + session_id INT NOT NULL, + note_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (note_id), + FOREIGN KEY (session_id) REFERENCES TutoringSessionsTwo(session_id) +); + +-- 26. Tutor_Certifications +CREATE TABLE Tutor_Certifications_Two ( + certification_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + certification_name VARCHAR(100), + issuing_organization VARCHAR(100), + year_obtained INT, + PRIMARY KEY (certification_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 27. Session_Reschedule +CREATE TABLE Session_Reschedule ( + reschedule_id INT NOT NULL AUTO_INCREMENT, + session_id INT NOT NULL, + new_session_date TIMESTAMP, + PRIMARY KEY (reschedule_id), + FOREIGN KEY (session_id) REFERENCES TutoringSessionsTwo(session_id) +); + +-- 28. Tutor_SocialMedia +CREATE TABLE Tutor_SocialMedia ( + social_media_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + platform VARCHAR(50), + profile_url VARCHAR(255), + PRIMARY KEY (social_media_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 29. Tutor_Articles +CREATE TABLE Tutor_Articles ( + article_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + article_title VARCHAR(100), + article_content TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (article_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 30. Tutor_Blog +CREATE TABLE Tutor_Blog ( + blog_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + blog_title VARCHAR(100), + blog_content TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (blog_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 31. Tutor_Media +CREATE TABLE Tutor_Media ( + media_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + media_type VARCHAR(50), -- e.g., video, image + media_url VARCHAR(255), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (media_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 32. Tutor_Projects +CREATE TABLE Tutor_Projects ( + project_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + project_title VARCHAR(100), + project_description TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (project_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 33. Tutor_Events +CREATE TABLE Tutor_Events ( + tutor_event_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + event_id INT NOT NULL, + PRIMARY KEY (tutor_event_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), + FOREIGN KEY (event_id) REFERENCES TutoringEvents(event_id) +); + +-- 34. Tutor_Connections +CREATE TABLE Tutor_Connections ( + connection_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + student_id INT NOT NULL, + connection_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (connection_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 35. Tutor_SuccessStories +CREATE TABLE Tutor_SuccessStories ( + story_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + student_id INT NOT NULL, + story_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (story_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 36. Tutor_Videos +CREATE TABLE Tutor_Videos ( + video_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + video_title VARCHAR(100), + video_url VARCHAR(255), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (video_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 37. Tutor_Questions +CREATE TABLE Tutor_Questions ( + question_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + question_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (question_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 38. Tutor_Answers +CREATE TABLE Tutor_Answers ( + answer_id INT NOT NULL AUTO_INCREMENT, + question_id INT NOT NULL, + answer_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (answer_id), + FOREIGN KEY (question_id) REFERENCES Tutor_Questions(question_id) +); + +-- 39. Tutor_Categories +CREATE TABLE Tutor_Categories ( + category_id INT NOT NULL AUTO_INCREMENT, + category_name VARCHAR(100), + PRIMARY KEY (category_id) +); + +-- 40. Tutor_Category_Assignment +CREATE TABLE Tutor_Category_Assignment ( + assignment_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + category_id INT NOT NULL, + PRIMARY KEY (assignment_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), + FOREIGN KEY (category_id) REFERENCES Tutor_Categories(category_id) +); + +-- 41. Tutor_Articles_Comments +CREATE TABLE Tutor_Articles_Comments ( + comment_id INT NOT NULL AUTO_INCREMENT, + article_id INT NOT NULL, + student_id INT NOT NULL, + comment_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (comment_id), + FOREIGN KEY (article_id) REFERENCES Tutor_Articles(article_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 42. Tutor_Blog_Comments +CREATE TABLE Tutor_Blog_Comments ( + comment_id INT NOT NULL AUTO_INCREMENT, + blog_id INT NOT NULL, + student_id INT NOT NULL, + comment_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (comment_id), + FOREIGN KEY (blog_id) REFERENCES Tutor_Blog(blog_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 43. Tutor_Resources +CREATE TABLE Tutor_Resources ( + resource_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + resource_name VARCHAR(100), + resource_url VARCHAR(255), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (resource_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 44. Tutor_Galleries +CREATE TABLE Tutor_Galleries ( + gallery_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + gallery_title VARCHAR(100), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (gallery_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 45. Gallery_Images +CREATE TABLE Gallery_Images ( + image_id INT NOT NULL AUTO_INCREMENT, + gallery_id INT NOT NULL, + image_url VARCHAR(255), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (image_id), + FOREIGN KEY (gallery_id) REFERENCES Tutor_Galleries(gallery_id) +); + +-- 46. Tutor_Policies +CREATE TABLE Tutor_Policies ( + policy_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + policy_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (policy_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 47. Tutor_Reports +CREATE TABLE Tutor_Reports ( + report_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + report_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (report_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 48. Tutor_Awards +CREATE TABLE Tutor_Awards ( + award_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + award_name VARCHAR(100), + award_year INT, + PRIMARY KEY (award_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 49. Tutor_Banners +CREATE TABLE Tutor_Banners ( + banner_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + banner_image VARCHAR(255), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (banner_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 50. Tutor_SuccessMetrics +CREATE TABLE Tutor_SuccessMetrics ( + metric_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + metric_name VARCHAR(100), + metric_value DECIMAL(10, 2), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (metric_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 51. Tutor_Projects_Comments +CREATE TABLE Tutor_Projects_Comments ( + comment_id INT NOT NULL AUTO_INCREMENT, + project_id INT NOT NULL, + student_id INT NOT NULL, + comment_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (comment_id), + FOREIGN KEY (project_id) REFERENCES Tutor_Projects(project_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 52. Tutor_Media_Comments +CREATE TABLE Tutor_Media_Comments ( + comment_id INT NOT NULL AUTO_INCREMENT, + media_id INT NOT NULL, + student_id INT NOT NULL, + comment_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (comment_id), + FOREIGN KEY (media_id) REFERENCES Tutor_Media(media_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 53. Tutor_Event_Comments +CREATE TABLE Tutor_Event_Comments ( + comment_id INT NOT NULL AUTO_INCREMENT, + event_id INT NOT NULL, + student_id INT NOT NULL, + comment_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (comment_id), + FOREIGN KEY (event_id) REFERENCES TutoringEvents(event_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 54. Tutor_Session_Tags +CREATE TABLE Tutor_Session_Tags ( + tag_id INT NOT NULL AUTO_INCREMENT, + session_id INT NOT NULL, + tag_name VARCHAR(100), + PRIMARY KEY (tag_id), + FOREIGN KEY (session_id) REFERENCES TutoringSessionsTwo(session_id) +); + +-- 55. Tutor_Meeting +CREATE TABLE Tutor_Meeting ( + meeting_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + student_id INT NOT NULL, + meeting_date TIMESTAMP, + meeting_duration INT, + PRIMARY KEY (meeting_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 56. Tutor_Video_Sessions +CREATE TABLE Tutor_Video_Sessions ( + video_session_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + student_id INT NOT NULL, + session_date TIMESTAMP, + PRIMARY KEY (video_session_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 57. Tutor_Workshops +CREATE TABLE Tutor_Workshops ( + workshop_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + workshop_name VARCHAR(100), + workshop_description TEXT, + workshop_date TIMESTAMP, + PRIMARY KEY (workshop_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 58. Tutor_Forum +CREATE TABLE Tutor_Forum ( + forum_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + forum_topic VARCHAR(100), + forum_content TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (forum_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 59. Tutor_Forum_Comments +CREATE TABLE Tutor_Forum_Comments ( + comment_id INT NOT NULL AUTO_INCREMENT, + forum_id INT NOT NULL, + student_id INT NOT NULL, + comment_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (comment_id), + FOREIGN KEY (forum_id) REFERENCES Tutor_Forum(forum_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 60. Tutor_Notes +CREATE TABLE Tutor_Notes ( + note_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + note_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (note_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 61. Tutor_Articles_Likes +CREATE TABLE Tutor_Articles_Likes ( + like_id INT NOT NULL AUTO_INCREMENT, + article_id INT NOT NULL, + student_id INT NOT NULL, + PRIMARY KEY (like_id), + FOREIGN KEY (article_id) REFERENCES Tutor_Articles(article_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 62. Tutor_Blog_Likes +CREATE TABLE Tutor_Blog_Likes ( + like_id INT NOT NULL AUTO_INCREMENT, + blog_id INT NOT NULL, + student_id INT NOT NULL, + PRIMARY KEY (like_id), + FOREIGN KEY (blog_id) REFERENCES Tutor_Blog(blog_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 63. Tutor_Projects_Likes +CREATE TABLE Tutor_Projects_Likes ( + like_id INT NOT NULL AUTO_INCREMENT, + project_id INT NOT NULL, + student_id INT NOT NULL, + PRIMARY KEY (like_id), + FOREIGN KEY (project_id) REFERENCES Tutor_Projects(project_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 64. Tutor_Certifications_Comments +CREATE TABLE Tutor_Certifications_Comments ( + comment_id INT NOT NULL AUTO_INCREMENT, + certification_id INT NOT NULL, + student_id INT NOT NULL, + comment_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (comment_id), + FOREIGN KEY (certification_id) REFERENCES Tutor_Certifications_Two(certification_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 65. Tutor_Awards_Comments +CREATE TABLE Tutor_Awards_Comments ( + comment_id INT NOT NULL AUTO_INCREMENT, + award_id INT NOT NULL, + student_id INT NOT NULL, + comment_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (comment_id), + FOREIGN KEY (award_id) REFERENCES Tutor_Awards(award_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 66. Tutor_Galleries_Comments +CREATE TABLE Tutor_Galleries_Comments ( + comment_id INT NOT NULL AUTO_INCREMENT, + gallery_id INT NOT NULL, + student_id INT NOT NULL, + comment_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (comment_id), + FOREIGN KEY (gallery_id) REFERENCES Tutor_Galleries(gallery_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 67. Tutor_Resources_Comments +CREATE TABLE Tutor_Resources_Comments ( + comment_id INT NOT NULL AUTO_INCREMENT, + resource_id INT NOT NULL, + student_id INT NOT NULL, + comment_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (comment_id), + FOREIGN KEY (resource_id) REFERENCES Tutor_Resources(resource_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 68. Tutor_SocialMedia_Likes +CREATE TABLE Tutor_SocialMedia_Likes ( + like_id INT NOT NULL AUTO_INCREMENT, + social_media_id INT NOT NULL, + student_id INT NOT NULL, + PRIMARY KEY (like_id), + FOREIGN KEY (social_media_id) REFERENCES Tutor_SocialMedia(social_media_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 69. Tutor_Financials +CREATE TABLE Tutor_Financials ( + financial_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + income DECIMAL(10, 2), + expenses DECIMAL(10, 2), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (financial_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 70. Tutor_Statistics +CREATE TABLE Tutor_Statistics ( + statistic_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + session_count INT, + feedback_count INT, + success_rate DECIMAL(5, 2), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (statistic_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 71. Tutor_IndustryConnections +CREATE TABLE Tutor_IndustryConnections ( + connection_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + organization_name VARCHAR(100), + contact_person VARCHAR(100), + contact_info VARCHAR(100), + PRIMARY KEY (connection_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 72. Tutor_Referrals +CREATE TABLE Tutor_Referrals ( + referral_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + referred_student_id INT NOT NULL, + referral_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (referral_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), + FOREIGN KEY (referred_student_id) REFERENCES StudentsVT(student_id) +); + +-- 73. Tutor_Meeting_Notes +CREATE TABLE Tutor_Meeting_Notes ( + meeting_note_id INT NOT NULL AUTO_INCREMENT, + meeting_id INT NOT NULL, + note_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (meeting_note_id), + FOREIGN KEY (meeting_id) REFERENCES Tutor_Meeting(meeting_id) +); + +-- 74. Tutor_Languages_Spoken +CREATE TABLE Tutor_Languages_Spoken ( + spoken_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + language_name VARCHAR(100), + PRIMARY KEY (spoken_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 75. Tutor_Interactions +CREATE TABLE Tutor_Interactions ( + interaction_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + student_id INT NOT NULL, + interaction_type VARCHAR(100), -- e.g., call, email + interaction_date TIMESTAMP, + PRIMARY KEY (interaction_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 76. Tutor_Feedback +CREATE TABLE Tutor_Feedback ( + feedback_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + feedback_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (feedback_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 77. Tutor_Collaborations +CREATE TABLE Tutor_Collaborations ( + collaboration_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + project_name VARCHAR(100), + project_description TEXT, + PRIMARY KEY (collaboration_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 78. Tutor_Conferences +CREATE TABLE Tutor_Conferences ( + conference_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + conference_name VARCHAR(100), + conference_date DATE, + PRIMARY KEY (conference_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 79. Tutor_Podcasts +CREATE TABLE Tutor_Podcasts ( + podcast_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + podcast_title VARCHAR(100), + podcast_url VARCHAR(255), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (podcast_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 80. Tutor_Webinars +CREATE TABLE Tutor_Webinars ( + webinar_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + webinar_title VARCHAR(100), + webinar_date TIMESTAMP, + PRIMARY KEY (webinar_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 81. Tutor_Websites +CREATE TABLE Tutor_Websites ( + website_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + website_url VARCHAR(255), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (website_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 82. Tutor_SocialMediaMetrics +CREATE TABLE Tutor_SocialMediaMetrics ( + metric_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + platform VARCHAR(50), + followers_count INT, + engagement_rate DECIMAL(5, 2), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (metric_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 83. Tutor_Ads +CREATE TABLE Tutor_Ads ( + ad_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + ad_content TEXT, + ad_platform VARCHAR(100), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (ad_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 84. Tutor_AdMetrics +CREATE TABLE Tutor_AdMetrics ( + metric_id INT NOT NULL AUTO_INCREMENT, + ad_id INT NOT NULL, + clicks INT, + impressions INT, + PRIMARY KEY (metric_id), + FOREIGN KEY (ad_id) REFERENCES Tutor_Ads(ad_id) +); + +-- 85. Tutor_Competitions +CREATE TABLE Tutor_Competitions ( + competition_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + competition_name VARCHAR(100), + competition_date DATE, + PRIMARY KEY (competition_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 86. Tutor_Networks +CREATE TABLE Tutor_Networks ( + network_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + network_name VARCHAR(100), + PRIMARY KEY (network_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 87. Tutor_Partnerships +CREATE TABLE Tutor_Partnerships ( + partnership_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + partner_name VARCHAR(100), + partnership_date TIMESTAMP, + PRIMARY KEY (partnership_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 88. Tutor_Certifications +CREATE TABLE Tutor_Certifications ( + certification_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + certification_name VARCHAR(100), + issued_date DATE, + expiration_date DATE, + PRIMARY KEY (certification_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 89. Tutor_TrainingPrograms +CREATE TABLE Tutor_TrainingPrograms ( + training_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + program_name VARCHAR(100), + program_description TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (training_id) +); + +-- 90. Tutor_FeedbackResponses +CREATE TABLE Tutor_FeedbackResponses ( + response_id INT NOT NULL AUTO_INCREMENT, + feedback_id INT NOT NULL, + response_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (response_id), + FOREIGN KEY (feedback_id) REFERENCES Tutor_Feedback(feedback_id) +); + +-- 91. Tutor_Mentorships +CREATE TABLE Tutor_Mentorships ( + mentorship_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + mentee_id INT NOT NULL, + start_date DATE, + end_date DATE, + PRIMARY KEY (mentorship_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), + FOREIGN KEY (mentee_id) REFERENCES StudentsVT(student_id) +); + +-- 92. Tutor_Resources +CREATE TABLE Tutor_Resources_Two ( + resource_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + resource_title VARCHAR(100), + resource_url VARCHAR(255), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (resource_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 93. Tutor_Articles +CREATE TABLE Tutor_Articles_Two ( + article_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + article_title VARCHAR(100), + article_content TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (article_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 94. Tutor_TrainingSessions +CREATE TABLE Tutor_TrainingSessions ( + session_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + session_date TIMESTAMP, + session_topic VARCHAR(100), + PRIMARY KEY (session_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 95. Tutor_Videos +CREATE TABLE Tutor_Videos_Two ( + video_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + video_title VARCHAR(100), + video_url VARCHAR(255), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (video_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 96. Tutor_AudioLectures +CREATE TABLE Tutor_AudioLectures ( + audio_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + audio_title VARCHAR(100), + audio_url VARCHAR(255), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (audio_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 97. Tutor_BookRecommendations +CREATE TABLE Tutor_BookRecommendations ( + recommendation_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + book_title VARCHAR(100), + author VARCHAR(100), + PRIMARY KEY (recommendation_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 98. Tutor_FeedbackSurveys +CREATE TABLE Tutor_FeedbackSurveys ( + survey_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + survey_title VARCHAR(100), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (survey_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 99. Tutor_EventParticipation +CREATE TABLE Tutor_EventParticipation ( + participation_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + event_name VARCHAR(100), + event_date DATE, + PRIMARY KEY (participation_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 100. Tutor_Goals +CREATE TABLE Tutor_Goals ( + goal_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + goal_description TEXT, + target_date DATE, + PRIMARY KEY (goal_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); diff --git a/testing/schema-mapping/map-data.py b/testing/schema-mapping/map-data.py index 727e56b..30e6eb4 100644 --- a/testing/schema-mapping/map-data.py +++ b/testing/schema-mapping/map-data.py @@ -78,7 +78,7 @@ def generate_attr_def(attr, attr_type): for name in table_names: streaming_list.append({ "topic_name": name + "_topic", - "record_count": 1000, + "record_count": 100, "dataset": name, }) write_yaml({"streaming": streaming_list}, testing_var_file_path) diff --git a/testing/stream_kafka.py b/testing/stream_kafka.py index 2310ab0..3fcf5dd 100644 --- a/testing/stream_kafka.py +++ b/testing/stream_kafka.py @@ -35,7 +35,7 @@ def produce_event_logs_to_kafka(num_records, topic_name, dataset_num): producer.produce(topic_name, value=json.dumps(log)) producer.poll(0) # Polls the producer for message delivery events # Optional: Sleep for a small amount of time to allow the queue to clear - time.sleep(0.01) # Adjust this value as needed + time.sleep(0.001) # Adjust this value as needed print(f"Sent: {log}") # Wait up to 5 seconds for messages to be sent producer.flush(timeout=5) From a73854f80c8d0c8ffe28ae9aaf27822c8a26346d Mon Sep 17 00:00:00 2001 From: Kevin Tran Date: Tue, 24 Sep 2024 14:04:04 -0700 Subject: [PATCH 05/15] refact: merge conflict --- testing/stream_kafka.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/testing/stream_kafka.py b/testing/stream_kafka.py index 3fcf5dd..cc6df49 100644 --- a/testing/stream_kafka.py +++ b/testing/stream_kafka.py @@ -8,7 +8,12 @@ EC2_PUBLIC_IP = os.environ["EC2_PUBLIC_IP"] # Initialize Kafka producer -producer = Producer({"bootstrap.servers": f"{EC2_PUBLIC_IP}:9092"}) +producer = Producer({ + "bootstrap.servers": f"{EC2_PUBLIC_IP}:9092", + "queue.buffering.max.messages": 1000000, # Increase the maximum number of messages in the queue + "queue.buffering.max.kbytes": 1048576, # Increase the buffer size in KB + "linger.ms": 50, # Add a small delay to batch messages +}) admin_client = AdminClient({"bootstrap.servers": f"{EC2_PUBLIC_IP}:9092"}) From 1f26a38c5750b0f4a6efe83787d02a3448ee69ee Mon Sep 17 00:00:00 2001 From: Kevin Tran Date: Wed, 25 Sep 2024 16:32:33 -0700 Subject: [PATCH 06/15] feat: 500 tables loaded without syntax errors into SingleStore --- testing/data/data.yaml | 561 +- testing/data/generate_data.py | 16 +- .../example-mysql-schema copy.sql | 4949 +++++++++++++++++ .../schema-mapping/example-mysql-schema.sql | 2 +- testing/schema-mapping/map-data.py | 15 +- testing/stream_kafka.py | 2 +- 6 files changed, 5292 insertions(+), 253 deletions(-) create mode 100644 testing/schema-mapping/example-mysql-schema copy.sql diff --git a/testing/data/data.yaml b/testing/data/data.yaml index 73dcfea..a746af8 100644 --- a/testing/data/data.yaml +++ b/testing/data/data.yaml @@ -22,7 +22,7 @@ data: type: int academicadvising: advising_date: - type: DATE, + type: date advising_id: max: 100 min: 1 @@ -37,7 +37,7 @@ data: type: int academiccalendar: end_date: - type: DATE, + type: date semester: type: choice values: @@ -45,7 +45,7 @@ data: - choice 2 - choice 3 start_date: - type: DATE, + type: date year: max: 100 min: 1 @@ -163,24 +163,30 @@ data: min: 1 type: int end_date: - type: DATE, + type: date start_date: - type: DATE, + type: date adperformance: ad_campaign_id: max: 100 min: 1 type: int clicks: - type: INT, + max: 100 + min: 1 + type: int conversions: - type: INT, + max: 100 + min: 1 + type: int cost: max: 100 min: 1 type: int impressions: - type: INT, + max: 100 + min: 1 + type: int performance_id: max: 100 min: 1 @@ -195,9 +201,13 @@ data: min: 1 type: int conversions: - type: INT, + max: 100 + min: 1 + type: int leads_generated: - type: INT, + max: 100 + min: 1 + type: int total_spend: max: 100 min: 1 @@ -271,7 +281,9 @@ data: - choice 2 - choice 3 graduation_year: - type: INT, + max: 100 + min: 1 + type: int last_name: type: choice values: @@ -280,7 +292,7 @@ data: - choice 3 alumniactivities: activity_date: - type: DATE, + type: date activity_id: max: 100 min: 1 @@ -379,7 +391,9 @@ data: request_timestamp: type: timestamp response_status: - type: INT, + max: 100 + min: 1 + type: int architecturereviews: description: type: choice @@ -416,7 +430,7 @@ data: type: int assetallocation: allocation_date: - type: DATE, + type: date allocation_id: max: 100 min: 1 @@ -445,10 +459,10 @@ data: min: 1 type: int due_date: - type: DATE, + type: date attendance: attendance_date: - type: DATE, + type: date attendance_id: max: 100 min: 1 @@ -465,7 +479,7 @@ data: - choice 3 attendancevt: AttendanceVT_date: - type: DATE, + type: date AttendanceVT_id: max: 100 min: 1 @@ -517,7 +531,7 @@ data: min: 1 type: int timestamp: - type: DATETIME, + type: date auditrecommendations: audit_id: max: 100 @@ -618,13 +632,13 @@ data: min: 1 type: int loan_date: - type: DATE, + type: date loan_id: max: 100 min: 1 type: int return_date: - type: DATE, + type: date student_id: max: 100 min: 1 @@ -697,7 +711,7 @@ data: type: int businesscontinuityplans: created_date: - type: DATE, + type: date plan_id: max: 100 min: 1 @@ -720,7 +734,7 @@ data: min: 1 type: int target_date: - type: DATE, + type: date businessunits: unit_id: max: 100 @@ -782,9 +796,9 @@ data: - choice 2 - choice 3 end_date: - type: DATE, + type: date start_date: - type: DATE, + type: date campaigntrends: campaign_id: max: 100 @@ -831,7 +845,7 @@ data: min: 1 type: int published_date: - type: DATE, + type: date title: type: choice values: @@ -857,7 +871,7 @@ data: - choice 3 campussurveys: created_date: - type: DATE, + type: date survey_id: max: 100 min: 1 @@ -874,7 +888,7 @@ data: min: 1 type: int event_date: - type: DATE, + type: date event_name: type: choice values: @@ -883,7 +897,7 @@ data: - choice 3 careerappointments: appointment_date: - type: DATE, + type: date appointment_id: max: 100 min: 1 @@ -953,10 +967,9 @@ data: min: 1 type: int completed: - type: choice - values: - - 'True' - - 'False' + max: 1 + min: 0 + type: int item_description: type: choice values: @@ -1004,7 +1017,9 @@ data: - choice 2 - choice 3 year: - type: INT, + max: 100 + min: 1 + type: int classroomresources: class_id: max: 100 @@ -1194,7 +1209,7 @@ data: type: int communityengagement: engagement_date: - type: DATE, + type: date engagement_id: max: 100 min: 1 @@ -1234,14 +1249,14 @@ data: - choice 2 - choice 3 purchase_date: - type: DATE, + type: date value: max: 100 min: 1 type: int companyeventsvt: event_date: - type: DATE, + type: date event_id: max: 100 min: 1 @@ -1271,7 +1286,7 @@ data: - choice 3 companyvehicles: purchase_date: - type: DATE, + type: date value: max: 100 min: 1 @@ -1341,7 +1356,7 @@ data: type: int complianceaudits: audit_date: - type: DATE, + type: date audit_id: max: 100 min: 1 @@ -1371,7 +1386,7 @@ data: - choice 2 - choice 3 date_of_conference: - type: DATE, + type: date participation_id: max: 100 min: 1 @@ -1417,7 +1432,7 @@ data: created_at: type: timestamp scheduled_date: - type: DATE, + type: date title: type: choice values: @@ -1491,9 +1506,9 @@ data: min: 1 type: int end_date: - type: DATE, + type: date start_date: - type: DATE, + type: date conversionrates: campaign_id: max: 100 @@ -1538,7 +1553,7 @@ data: - choice 2 - choice 3 session_date: - type: DATE, + type: date session_id: max: 100 min: 1 @@ -1549,7 +1564,7 @@ data: type: int courseannouncements: announcement_date: - type: DATE, + type: date announcement_id: max: 100 min: 1 @@ -1597,7 +1612,7 @@ data: min: 1 type: int feedback_date: - type: DATE, + type: date feedback_text: type: choice values: @@ -1614,7 +1629,7 @@ data: min: 1 type: int created_date: - type: DATE, + type: date forum_id: max: 100 min: 1 @@ -1699,15 +1714,15 @@ data: min: 1 type: int end_time: - type: TIME, + type: timestamp schedule_date: - type: DATE, + type: date schedule_id: max: 100 min: 1 type: int start_time: - type: TIME, + type: timestamp coursesubscriptions: course_id: max: 100 @@ -1718,7 +1733,7 @@ data: min: 1 type: int subscription_date: - type: DATE, + type: date subscription_id: max: 100 min: 1 @@ -1746,7 +1761,7 @@ data: min: 1 type: int response_date: - type: DATE, + type: date response_id: max: 100 min: 1 @@ -1768,7 +1783,7 @@ data: min: 1 type: int feedback_date: - type: DATE, + type: date feedback_id: max: 100 min: 1 @@ -1800,7 +1815,9 @@ data: created_at: type: timestamp points_required: - type: INT, + max: 100 + min: 1 + type: int program_id: max: 100 min: 1 @@ -1973,7 +1990,9 @@ data: - choice 3 developmenttasks: assigned_to: - type: INT, + max: 100 + min: 1 + type: int created_at: type: timestamp status: @@ -2013,7 +2032,7 @@ data: - choice 3 disasterrecoveryplans: created_date: - type: DATE, + type: date plan_id: max: 100 min: 1 @@ -2040,7 +2059,7 @@ data: min: 1 type: int valid_until: - type: DATE, + type: date discussionboards: board_id: max: 100 @@ -2051,7 +2070,7 @@ data: min: 1 type: int created_date: - type: DATE, + type: date title: type: choice values: @@ -2070,7 +2089,7 @@ data: - choice 2 - choice 3 post_date: - type: DATE, + type: date post_id: max: 100 min: 1 @@ -2110,9 +2129,11 @@ data: - choice 2 - choice 3 employee_id: - type: INT, + max: 100 + min: 1 + type: int upload_date: - type: DATE, + type: date emailcampaigns: body: type: choice @@ -2210,7 +2231,7 @@ data: type: int employeecomplaints: complaint_date: - type: DATE, + type: date complaint_id: max: 100 min: 1 @@ -2239,16 +2260,16 @@ data: min: 1 type: int end_date: - type: DATE, + type: date start_date: - type: DATE, + type: date employeeoffboarding: employee_id: max: 100 min: 1 type: int offboarding_date: - type: DATE, + type: date offboarding_id: max: 100 min: 1 @@ -2259,7 +2280,7 @@ data: min: 1 type: int onboarding_date: - type: DATE, + type: date onboarding_id: max: 100 min: 1 @@ -2274,7 +2295,7 @@ data: min: 1 type: int relocation_date: - type: DATE, + type: date relocation_id: max: 100 min: 1 @@ -2297,7 +2318,7 @@ data: - choice 2 - choice 3 hire_date: - type: DATE, + type: date job_title: type: choice values: @@ -2322,7 +2343,7 @@ data: type: int employeesurveys: submission_date: - type: DATE, + type: date survey_id: max: 100 min: 1 @@ -2352,13 +2373,15 @@ data: min: 1 type: int enrollment_date: - type: DATE, + type: date enrollment_id: max: 100 min: 1 type: int grade: - type: FLOAT, + max: 100 + min: 1 + type: int student_id: max: 100 min: 1 @@ -2446,7 +2469,7 @@ data: - choice 2 - choice 3 event_date: - type: DATE, + type: date event_id: max: 100 min: 1 @@ -2531,7 +2554,7 @@ data: type: int eventsvt: event_date: - type: DATE, + type: date event_id: max: 100 min: 1 @@ -2564,14 +2587,14 @@ data: min: 1 type: int expense_date: - type: DATE, + type: date expense_id: max: 100 min: 1 type: int experiments: end_date: - type: DATE, + type: date experiment_id: max: 100 min: 1 @@ -2583,7 +2606,7 @@ data: - choice 2 - choice 3 start_date: - type: DATE, + type: date status: type: choice values: @@ -2632,7 +2655,7 @@ data: - choice 2 - choice 3 reservation_date: - type: DATE, + type: date reservation_id: max: 100 min: 1 @@ -2647,7 +2670,7 @@ data: min: 1 type: int usage_date: - type: DATE, + type: date usage_id: max: 100 min: 1 @@ -2660,7 +2683,7 @@ data: - choice 2 - choice 3 meeting_date: - type: DATE, + type: date meeting_id: max: 100 min: 1 @@ -2677,10 +2700,9 @@ data: - choice 2 - choice 3 is_active: - type: choice - values: - - 'True' - - 'False' + max: 1 + min: 0 + type: int feedback: experiment_id: max: 100 @@ -2704,7 +2726,7 @@ data: type: int feedback2: feedback_date: - type: DATE, + type: date feedback_id: max: 100 min: 1 @@ -2731,7 +2753,7 @@ data: - choice 2 - choice 3 submission_date: - type: DATE, + type: date feedbackresponses: employee_id: max: 100 @@ -2767,7 +2789,7 @@ data: - choice 2 - choice 3 awarded_date: - type: DATE, + type: date student_id: max: 100 min: 1 @@ -2778,7 +2800,7 @@ data: min: 1 type: int aid_date: - type: DATE, + type: date aid_id: max: 100 min: 1 @@ -2793,7 +2815,7 @@ data: min: 1 type: int report_date: - type: DATE, + type: date report_id: max: 100 min: 1 @@ -2833,7 +2855,7 @@ data: min: 1 type: int response_date: - type: DATE, + type: date response_id: max: 100 min: 1 @@ -2861,7 +2883,9 @@ data: - choice 3 goalmetrics: conversion_count: - type: INT, + max: 100 + min: 1 + type: int goal_id: max: 100 min: 1 @@ -2916,7 +2940,9 @@ data: min: 1 type: int score: - type: FLOAT, + max: 100 + min: 1 + type: int groupmembers: group_id: max: 100 @@ -2945,7 +2971,7 @@ data: type: int healthandsafety: inspection_date: - type: DATE, + type: date safety_description: type: choice values: @@ -2964,7 +2990,7 @@ data: - choice 2 - choice 3 record_date: - type: DATE, + type: date record_id: max: 100 min: 1 @@ -3011,7 +3037,7 @@ data: - choice 2 - choice 3 report_date: - type: DATE, + type: date report_id: max: 100 min: 1 @@ -3083,7 +3109,7 @@ data: - choice 2 - choice 3 hire_date: - type: DATE, + type: date instructor_id: max: 100 min: 1 @@ -3138,7 +3164,7 @@ data: min: 1 type: int violation_date: - type: DATE, + type: date violation_id: max: 100 min: 1 @@ -3166,7 +3192,7 @@ data: - choice 3 internships: application_deadline: - type: DATE, + type: date company_name: type: choice values: @@ -3189,13 +3215,15 @@ data: min: 1 type: int last_updated: - type: DATE, + type: date product_id: max: 100 min: 1 type: int stock_level: - type: INT, + max: 100 + min: 1 + type: int invoices: amount: max: 100 @@ -3206,7 +3234,7 @@ data: min: 1 type: int invoice_date: - type: DATE, + type: date invoice_id: max: 100 min: 1 @@ -3229,7 +3257,7 @@ data: - choice 2 - choice 3 purchase_date: - type: DATE, + type: date value: max: 100 min: 1 @@ -3252,7 +3280,7 @@ data: - choice 2 - choice 3 submission_date: - type: DATE, + type: date ticket_id: max: 100 min: 1 @@ -3282,7 +3310,7 @@ data: min: 1 type: int tracked_date: - type: DATE, + type: date tracking_id: max: 100 min: 1 @@ -3293,7 +3321,9 @@ data: type: int laboratoryequipment: available_units: - type: INT, + max: 100 + min: 1 + type: int equipment_description: type: choice values: @@ -3316,7 +3346,7 @@ data: min: 1 type: int reservation_date: - type: DATE, + type: date reservation_id: max: 100 min: 1 @@ -3391,7 +3421,9 @@ data: min: 1 type: int score: - type: INT, + max: 100 + min: 1 + type: int score_id: max: 100 min: 1 @@ -3419,7 +3451,7 @@ data: - choice 2 - choice 3 upload_date: - type: DATE, + type: date library: author: type: choice @@ -3428,13 +3460,17 @@ data: - choice 2 - choice 3 available_copies: - type: INT, + max: 100 + min: 1 + type: int book_id: max: 100 min: 1 type: int published_year: - type: INT, + max: 100 + min: 1 + type: int title: type: choice values: @@ -3519,7 +3555,9 @@ data: min: 1 type: int redeemed_points: - type: INT, + max: 100 + min: 1 + type: int redemption_date: type: timestamp redemption_id: @@ -3545,7 +3583,7 @@ data: type: timestamp marketinganalytics: analysis_date: - type: DATE, + type: date analytics_id: max: 100 min: 1 @@ -3612,9 +3650,9 @@ data: - choice 2 - choice 3 end_date: - type: DATE, + type: date start_date: - type: DATE, + type: date marketingcollateral: collateral_id: max: 100 @@ -3638,7 +3676,7 @@ data: created_at: type: timestamp event_date: - type: DATE, + type: date event_id: max: 100 min: 1 @@ -3768,11 +3806,15 @@ data: min: 1 type: int conversions: - type: INT, + max: 100 + min: 1 + type: int created_at: type: timestamp leads_generated: - type: INT, + max: 100 + min: 1 + type: int performance_id: max: 100 min: 1 @@ -3819,7 +3861,7 @@ data: created_at: type: timestamp training_date: - type: DATE, + type: date training_id: max: 100 min: 1 @@ -3834,7 +3876,7 @@ data: created_at: type: timestamp date: - type: DATE, + type: date description: type: choice values: @@ -3859,7 +3901,7 @@ data: - choice 2 - choice 3 research_date: - type: DATE, + type: date research_id: max: 100 min: 1 @@ -3925,7 +3967,7 @@ data: type: int mediaeventsvt: event_date: - type: DATE, + type: date event_id: max: 100 min: 1 @@ -3979,7 +4021,7 @@ data: - choice 2 - choice 3 spend_date: - type: DATE, + type: date spend_id: max: 100 min: 1 @@ -3999,7 +4041,7 @@ data: type: int meetingnotes: meeting_date: - type: TIMESTAMP, + type: timestamp note_id: max: 100 min: 1 @@ -4031,7 +4073,7 @@ data: - choice 2 - choice 3 meeting_date: - type: DATE, + type: date meeting_id: max: 100 min: 1 @@ -4050,7 +4092,7 @@ data: min: 1 type: int start_date: - type: DATE, + type: date metrics: experiment_id: max: 100 @@ -4074,7 +4116,7 @@ data: type: timestamp milestones: milestone_date: - type: DATE, + type: date milestone_description: type: choice values: @@ -4114,7 +4156,7 @@ data: - choice 2 - choice 3 notification_date: - type: DATE, + type: date notification_id: max: 100 min: 1 @@ -4158,7 +4200,9 @@ data: min: 1 type: int quantity: - type: INT, + max: 100 + min: 1 + type: int resource_id: max: 100 min: 1 @@ -4186,7 +4230,7 @@ data: - choice 3 operationalmetrics: measurement_date: - type: DATE, + type: date metric_id: max: 100 min: 1 @@ -4203,7 +4247,7 @@ data: type: int opportunities: close_date: - type: DATE, + type: date lead_id: max: 100 min: 1 @@ -4325,7 +4369,7 @@ data: type: int partnerships: end_date: - type: DATE, + type: date partner_name: type: choice values: @@ -4343,10 +4387,10 @@ data: - choice 2 - choice 3 start_date: - type: DATE, + type: date passwordresets: reset_date: - type: DATE, + type: date reset_id: max: 100 min: 1 @@ -4376,7 +4420,7 @@ data: min: 1 type: int payment_date: - type: DATE, + type: date payment_id: max: 100 min: 1 @@ -4410,7 +4454,7 @@ data: min: 1 type: int transaction_date: - type: DATE, + type: date transaction_id: max: 100 min: 1 @@ -4421,9 +4465,13 @@ data: min: 1 type: int conversions: - type: INT, + max: 100 + min: 1 + type: int leads_generated: - type: INT, + max: 100 + min: 1 + type: int metric_id: max: 100 min: 1 @@ -4461,7 +4509,7 @@ data: min: 1 type: int review_date: - type: DATE, + type: date review_id: max: 100 min: 1 @@ -4510,7 +4558,7 @@ data: - choice 3 planimplementation: implementation_date: - type: DATE, + type: date implementation_id: max: 100 min: 1 @@ -4531,7 +4579,7 @@ data: - choice 2 - choice 3 test_date: - type: DATE, + type: date test_id: max: 100 min: 1 @@ -4555,7 +4603,7 @@ data: - choice 3 policyacknowledgments: acknowledgment_date: - type: DATE, + type: date acknowledgment_id: max: 100 min: 1 @@ -4574,14 +4622,14 @@ data: min: 1 type: int update_date: - type: DATE, + type: date update_id: max: 100 min: 1 type: int procurement: procurement_date: - type: DATE, + type: date procurement_id: max: 100 min: 1 @@ -4683,7 +4731,7 @@ data: min: 1 type: int end_date: - type: DATE, + type: date project_id: max: 100 min: 1 @@ -4695,7 +4743,7 @@ data: - choice 2 - choice 3 start_date: - type: DATE, + type: date projectstatus: last_updated: type: timestamp @@ -4717,7 +4765,7 @@ data: type: int projecttimelines: end_date: - type: DATE, + type: date project_name: type: choice values: @@ -4725,7 +4773,7 @@ data: - choice 2 - choice 3 start_date: - type: DATE, + type: date timeline_id: max: 100 min: 1 @@ -4746,10 +4794,10 @@ data: min: 1 type: int expiration_date: - type: DATE, + type: date purchaseorders: order_date: - type: DATE, + type: date order_id: max: 100 min: 1 @@ -4764,7 +4812,7 @@ data: type: int purchases: purchase_date: - type: DATE, + type: date purchase_id: max: 100 min: 1 @@ -4871,7 +4919,7 @@ data: type: int releases: release_date: - type: DATE, + type: date release_id: max: 100 min: 1 @@ -4932,7 +4980,9 @@ data: min: 1 type: int total_users: - type: INT, + max: 100 + min: 1 + type: int variant_id: max: 100 min: 1 @@ -4988,7 +5038,7 @@ data: - choice 3 riskmanagement: assessment_date: - type: DATE, + type: date description: type: choice values: @@ -5013,7 +5063,7 @@ data: - choice 2 - choice 3 implementation_date: - type: DATE, + type: date mitigation_id: max: 100 min: 1 @@ -5066,7 +5116,7 @@ data: - choice 2 - choice 3 due_date: - type: DATE, + type: date item_id: max: 100 min: 1 @@ -5111,7 +5161,7 @@ data: min: 1 type: int rollout_date: - type: DATE, + type: date rollout_id: max: 100 min: 1 @@ -5126,7 +5176,7 @@ data: min: 1 type: int pay_date: - type: DATE, + type: date salary_amount: max: 100 min: 1 @@ -5141,9 +5191,11 @@ data: min: 1 type: int quantity: - type: INT, + max: 100 + min: 1 + type: int sale_date: - type: DATE, + type: date sale_id: max: 100 min: 1 @@ -5154,7 +5206,7 @@ data: type: int salesreports: report_date: - type: DATE, + type: date report_id: max: 100 min: 1 @@ -5210,7 +5262,7 @@ data: type: int securityincidents: incident_date: - type: DATE, + type: date incident_description: type: choice values: @@ -5319,7 +5371,7 @@ data: type: int session_reschedule: new_session_date: - type: TIMESTAMP, + type: timestamp reschedule_id: max: 100 min: 1 @@ -5330,7 +5382,7 @@ data: type: int sessions: end_time: - type: TIMESTAMP, + type: timestamp session_id: max: 100 min: 1 @@ -5406,7 +5458,7 @@ data: type: int socialmediaengagement: engagement_date: - type: DATE, + type: date engagement_id: max: 100 min: 1 @@ -5450,7 +5502,7 @@ data: - choice 2 - choice 3 post_date: - type: DATE, + type: date post_id: max: 100 min: 1 @@ -5485,7 +5537,7 @@ data: type: int sprints: end_date: - type: DATE, + type: date sprint_id: max: 100 min: 1 @@ -5497,7 +5549,7 @@ data: - choice 2 - choice 3 start_date: - type: DATE, + type: date sprinttasks: sprint_id: max: 100 @@ -5540,7 +5592,7 @@ data: - choice 2 - choice 3 hire_date: - type: DATE, + type: date last_name: type: choice values: @@ -5553,7 +5605,7 @@ data: type: int staffassignments: assigned_date: - type: DATE, + type: date assignment_id: max: 100 min: 1 @@ -5579,7 +5631,7 @@ data: - choice 3 stakeholderengagement: engagement_date: - type: DATE, + type: date engagement_id: max: 100 min: 1 @@ -5683,7 +5735,7 @@ data: - choice 3 strategyimplementation: implementation_date: - type: DATE, + type: date implementation_id: max: 100 min: 1 @@ -5732,7 +5784,7 @@ data: min: 1 type: int awarded_date: - type: DATE, + type: date student_award_id: max: 100 min: 1 @@ -5769,7 +5821,7 @@ data: type: int studentfeedback: feedback_date: - type: DATE, + type: date feedback_id: max: 100 min: 1 @@ -5800,7 +5852,7 @@ data: min: 1 type: int visit_date: - type: DATE, + type: date studenthealthservices: health_service_id: max: 100 @@ -5817,10 +5869,10 @@ data: min: 1 type: int visit_date: - type: DATE, + type: date studenthonors: awarded_date: - type: DATE, + type: date honor_id: max: 100 min: 1 @@ -5848,7 +5900,7 @@ data: type: int studentjobopportunities: application_date: - type: DATE, + type: date job_opportunity_id: max: 100 min: 1 @@ -5886,7 +5938,7 @@ data: min: 1 type: int usage_date: - type: DATE, + type: date usage_id: max: 100 min: 1 @@ -5908,7 +5960,7 @@ data: type: int students: date_of_birth: - type: DATE, + type: date email: type: choice values: @@ -5916,7 +5968,7 @@ data: - choice 2 - choice 3 enrollment_date: - type: DATE, + type: date first_name: type: choice values: @@ -5935,7 +5987,7 @@ data: type: int studentscholarships: awarded_date: - type: DATE, + type: date scholarship_id: max: 100 min: 1 @@ -5994,7 +6046,7 @@ data: type: int studygroups: created_date: - type: DATE, + type: date group_id: max: 100 min: 1 @@ -6026,9 +6078,9 @@ data: min: 1 type: int end_date: - type: DATE, + type: date start_date: - type: DATE, + type: date supplier_id: max: 100 min: 1 @@ -6231,7 +6283,7 @@ data: min: 1 type: int filing_date: - type: DATE, + type: date filing_id: max: 100 min: 1 @@ -6295,7 +6347,7 @@ data: min: 1 type: int update_date: - type: DATE, + type: date update_id: max: 100 min: 1 @@ -6310,7 +6362,7 @@ data: min: 1 type: int usage_date: - type: DATE, + type: date usage_id: max: 100 min: 1 @@ -6413,10 +6465,9 @@ data: min: 1 type: int attended: - type: choice - values: - - 'True' - - 'False' + max: 1 + min: 0 + type: int session_id: max: 100 min: 1 @@ -6427,7 +6478,7 @@ data: type: int trainingprograms: end_date: - type: DATE, + type: date program_name: type: choice values: @@ -6435,7 +6486,7 @@ data: - choice 2 - choice 3 start_date: - type: DATE, + type: date training_id: max: 100 min: 1 @@ -6457,7 +6508,7 @@ data: type: int trainingsessions: scheduled_at: - type: TIMESTAMP, + type: timestamp session_id: max: 100 min: 1 @@ -6495,7 +6546,7 @@ data: min: 1 type: int usage_date: - type: DATE, + type: date usage_id: max: 100 min: 1 @@ -6506,13 +6557,13 @@ data: min: 1 type: int due_date: - type: DATE, + type: date fee_id: max: 100 min: 1 type: int paid_date: - type: DATE, + type: date student_id: max: 100 min: 1 @@ -6523,9 +6574,13 @@ data: min: 1 type: int clicks: - type: INT, + max: 100 + min: 1 + type: int impressions: - type: INT, + max: 100 + min: 1 + type: int metric_id: max: 100 min: 1 @@ -6679,12 +6734,11 @@ data: min: 1 type: int available: - type: choice - values: - - 'True' - - 'False' + max: 1 + min: 0 + type: int date: - type: DATE, + type: date tutor_id: max: 100 min: 1 @@ -6701,7 +6755,9 @@ data: - choice 2 - choice 3 award_year: - type: INT, + max: 100 + min: 1 + type: int tutor_id: max: 100 min: 1 @@ -6858,9 +6914,9 @@ data: - choice 2 - choice 3 expiration_date: - type: DATE, + type: date issued_date: - type: DATE, + type: date tutor_id: max: 100 min: 1 @@ -6908,7 +6964,9 @@ data: min: 1 type: int year_obtained: - type: INT, + max: 100 + min: 1 + type: int tutor_collaborations: collaboration_id: max: 100 @@ -6932,7 +6990,7 @@ data: type: int tutor_competitions: competition_date: - type: DATE, + type: date competition_id: max: 100 min: 1 @@ -6949,7 +7007,7 @@ data: type: int tutor_conferences: conference_date: - type: DATE, + type: date conference_id: max: 100 min: 1 @@ -7002,7 +7060,7 @@ data: type: int tutor_eventparticipation: event_date: - type: DATE, + type: date event_name: type: choice values: @@ -7052,7 +7110,9 @@ data: min: 1 type: int years_worked: - type: INT, + max: 100 + min: 1 + type: int tutor_feedback: created_at: type: timestamp @@ -7217,7 +7277,7 @@ data: min: 1 type: int target_date: - type: DATE, + type: date tutor_id: max: 100 min: 1 @@ -7251,7 +7311,7 @@ data: type: int tutor_interactions: interaction_date: - type: TIMESTAMP, + type: timestamp interaction_id: max: 100 min: 1 @@ -7346,9 +7406,11 @@ data: type: int tutor_meeting: meeting_date: - type: TIMESTAMP, + type: timestamp meeting_duration: - type: INT, + max: 100 + min: 1 + type: int meeting_id: max: 100 min: 1 @@ -7380,7 +7442,7 @@ data: - choice 3 tutor_mentorships: end_date: - type: DATE, + type: date mentee_id: max: 100 min: 1 @@ -7390,7 +7452,7 @@ data: min: 1 type: int start_date: - type: DATE, + type: date tutor_id: max: 100 min: 1 @@ -7435,7 +7497,7 @@ data: - choice 2 - choice 3 partnership_date: - type: TIMESTAMP, + type: timestamp partnership_id: max: 100 min: 1 @@ -7563,7 +7625,9 @@ data: min: 1 type: int year_obtained: - type: INT, + max: 100 + min: 1 + type: int tutor_questions: created_at: type: timestamp @@ -7730,7 +7794,7 @@ data: - choice 2 - choice 3 available_time: - type: TIME, + type: timestamp schedule_id: max: 100 min: 1 @@ -7811,7 +7875,9 @@ data: min: 1 type: int followers_count: - type: INT, + max: 100 + min: 1 + type: int metric_id: max: 100 min: 1 @@ -7845,9 +7911,13 @@ data: created_at: type: timestamp feedback_count: - type: INT, + max: 100 + min: 1 + type: int session_count: - type: INT, + max: 100 + min: 1 + type: int statistic_id: max: 100 min: 1 @@ -7917,13 +7987,13 @@ data: type: int tutor_timings: timing_end: - type: TIME, + type: timestamp timing_id: max: 100 min: 1 type: int timing_start: - type: TIME, + type: timestamp tutor_id: max: 100 min: 1 @@ -7953,7 +8023,7 @@ data: type: int tutor_trainingsessions: session_date: - type: TIMESTAMP, + type: timestamp session_id: max: 100 min: 1 @@ -7970,7 +8040,7 @@ data: type: int tutor_video_sessions: session_date: - type: TIMESTAMP, + type: timestamp student_id: max: 100 min: 1 @@ -8035,7 +8105,7 @@ data: min: 1 type: int webinar_date: - type: TIMESTAMP, + type: timestamp webinar_id: max: 100 min: 1 @@ -8069,7 +8139,7 @@ data: min: 1 type: int workshop_date: - type: TIMESTAMP, + type: timestamp workshop_description: type: choice values: @@ -8088,7 +8158,7 @@ data: - choice 3 tutoringevents: event_date: - type: DATE, + type: date event_id: max: 100 min: 1 @@ -8109,10 +8179,9 @@ data: created_at: type: timestamp is_read: - type: choice - values: - - 'True' - - 'False' + max: 1 + min: 0 + type: int notification_id: max: 100 min: 1 @@ -8129,13 +8198,13 @@ data: type: int tutoringsessions: session_date: - type: DATE, + type: date session_id: max: 100 min: 1 type: int session_time: - type: TIME, + type: timestamp student_id: max: 100 min: 1 @@ -8150,9 +8219,11 @@ data: min: 1 type: int session_date: - type: TIMESTAMP, + type: timestamp session_duration: - type: INT, + max: 100 + min: 1 + type: int session_id: max: 100 min: 1 @@ -8196,7 +8267,9 @@ data: - choice 2 - choice 3 experience_years: - type: INT, + max: 100 + min: 1 + type: int first_name: type: choice values: @@ -8240,7 +8313,9 @@ data: type: int useraccounts: employee_id: - type: INT, + max: 100 + min: 1 + type: int password_hash: type: choice values: @@ -8497,7 +8572,7 @@ data: - choice 2 - choice 3 maintenance_date: - type: DATE, + type: date maintenance_id: max: 100 min: 1 @@ -8571,7 +8646,7 @@ data: - choice 3 vtevents: event_date: - type: DATE, + type: date event_id: max: 100 min: 1 @@ -8590,13 +8665,13 @@ data: - choice 3 vtstratimplement: end_date: - type: DATE, + type: date implementation_id: max: 100 min: 1 type: int start_date: - type: DATE, + type: date strategy_id: max: 100 min: 1 diff --git a/testing/data/generate_data.py b/testing/data/generate_data.py index ace68f9..243f5f3 100644 --- a/testing/data/generate_data.py +++ b/testing/data/generate_data.py @@ -1,12 +1,16 @@ import yaml import os import uuid -import datetime import random +from datetime import datetime, timedelta, date # Get the directory where the script is located script_dir = os.path.dirname(os.path.abspath(__file__)) +# Example: Random date between 2023-01-01 and 2023-12-31 +start_date = date(2023, 1, 1) +end_date = date(2023, 12, 31) + def read_yaml(yaml_file_path): with open(yaml_file_path, 'r') as file: return yaml.safe_load(file) @@ -28,6 +32,12 @@ def prompt_options(options): except ValueError: print("Invalid input. Please enter a valid number.") +def random_date(start_date, end_date): + delta = end_date - start_date + random_days = random.randint(0, delta.days) + return str(start_date + timedelta(days=random_days)) + + def generate_data(data_format, amount): event_logs = [] keys = data_format.keys() @@ -38,9 +48,11 @@ def generate_data(data_format, amount): if value_type == "uuid": json_value[value] = uuid.uuid4().hex elif value_type == "timestamp": - json_value[value] = datetime.datetime.now().isoformat() + json_value[value] = datetime.now().strftime('%Y-%m-%d %H:%M:%S') elif value_type == "choice": json_value[value] = random.choice(list(data_format[value]["values"])) + elif value_type == "date": + json_value[value] = random_date(start_date, end_date) elif value_type == "int": json_value[value] = random.randint(data_format[value]["min"], data_format[value]["max"]) elif value_type == "JSON": diff --git a/testing/schema-mapping/example-mysql-schema copy.sql b/testing/schema-mapping/example-mysql-schema copy.sql new file mode 100644 index 0000000..5ffd304 --- /dev/null +++ b/testing/schema-mapping/example-mysql-schema copy.sql @@ -0,0 +1,4949 @@ +-- 1. Users +CREATE TABLE Users ( + user_id INT NOT NULL AUTO_INCREMENT, + username VARCHAR(50) NOT NULL UNIQUE, + email VARCHAR(100) NOT NULL UNIQUE, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (user_id) +); + +-- 2. Experiments +CREATE TABLE Experiments ( + experiment_id INT NOT NULL AUTO_INCREMENT, + experiment_name VARCHAR(100) NOT NULL, + start_date DATE, + end_date DATE, + status ENUM('Active', 'Completed', 'Paused'), + PRIMARY KEY (experiment_id) +); + +-- 3. Variants +CREATE TABLE Variants ( + variant_id INT NOT NULL AUTO_INCREMENT, + experiment_id INT NOT NULL, + variant_name VARCHAR(50) NOT NULL, + PRIMARY KEY (variant_id), + FOREIGN KEY (experiment_id) REFERENCES Experiments(experiment_id) +); + +-- 4. User Assignments +CREATE TABLE UserAssignments ( + assignment_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + variant_id INT NOT NULL, + assigned_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (assignment_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id), + FOREIGN KEY (variant_id) REFERENCES Variants(variant_id) +); + +-- 5. Events +CREATE TABLE Events ( + event_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + experiment_id INT NOT NULL, + event_type VARCHAR(50), + event_timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (event_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id), + FOREIGN KEY (experiment_id) REFERENCES Experiments(experiment_id) +); + +-- 6. Goals +CREATE TABLE Goals ( + goal_id INT NOT NULL AUTO_INCREMENT, + experiment_id INT NOT NULL, + goal_description TEXT, + PRIMARY KEY (goal_id), + FOREIGN KEY (experiment_id) REFERENCES Experiments(experiment_id) +); + +-- 7. Goal Metrics +CREATE TABLE GoalMetrics ( + metric_id INT NOT NULL AUTO_INCREMENT, + goal_id INT NOT NULL, + variant_id INT NOT NULL, + conversion_count INT, + PRIMARY KEY (metric_id), + FOREIGN KEY (goal_id) REFERENCES Goals(goal_id), + FOREIGN KEY (variant_id) REFERENCES Variants(variant_id) +); + +-- 8. Feedback +CREATE TABLE Feedback ( + feedback_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + experiment_id INT NOT NULL, + feedback_text TEXT, + submitted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (feedback_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id), + FOREIGN KEY (experiment_id) REFERENCES Experiments(experiment_id) +); + +-- 9. Feature Flags +CREATE TABLE FeatureFlags ( + flag_id INT NOT NULL AUTO_INCREMENT, + flag_name VARCHAR(100) NOT NULL UNIQUE, + is_active BOOLEAN DEFAULT TRUE, + PRIMARY KEY (flag_id) +); + +-- 10. Flag Assignments +CREATE TABLE FlagAssignments ( + assignment_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + flag_id INT NOT NULL, + assigned_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (assignment_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id), + FOREIGN KEY (flag_id) REFERENCES FeatureFlags(flag_id) +); + +-- 11. Sessions +CREATE TABLE Sessions ( + session_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + start_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + end_time TIMESTAMP, + PRIMARY KEY (session_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 12. Page Views +CREATE TABLE PageViews ( + view_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + session_id INT NOT NULL, + page_url VARCHAR(255), + view_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (view_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id), + FOREIGN KEY (session_id) REFERENCES Sessions(session_id) +); + +-- 13. Clicks +CREATE TABLE Clicks ( + click_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + event_id INT NOT NULL, + click_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (click_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id), + FOREIGN KEY (event_id) REFERENCES Events(event_id) +); + +-- 14. Annotations +CREATE TABLE Annotations ( + annotation_id INT NOT NULL AUTO_INCREMENT, + experiment_id INT NOT NULL, + note TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (annotation_id), + FOREIGN KEY (experiment_id) REFERENCES Experiments(experiment_id) +); + +-- 15. Metrics +CREATE TABLE Metrics ( + metric_id INT NOT NULL AUTO_INCREMENT, + experiment_id INT NOT NULL, + metric_name VARCHAR(100), + metric_value DECIMAL(10, 2), + recorded_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (metric_id), + FOREIGN KEY (experiment_id) REFERENCES Experiments(experiment_id) +); + +-- 16. Cohorts +CREATE TABLE Cohorts ( + cohort_id INT NOT NULL AUTO_INCREMENT, + cohort_name VARCHAR(100), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (cohort_id) +); + +-- 17. Cohort Members +CREATE TABLE CohortMembers ( + member_id INT NOT NULL AUTO_INCREMENT, + cohort_id INT NOT NULL, + user_id INT NOT NULL, + joined_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (member_id), + FOREIGN KEY (cohort_id) REFERENCES Cohorts(cohort_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 18. User Segments +CREATE TABLE UserSegments ( + segment_id INT NOT NULL AUTO_INCREMENT, + segment_name VARCHAR(100), + criteria TEXT, + PRIMARY KEY (segment_id) +); + +-- 19. Segment Memberships +CREATE TABLE SegmentMemberships ( + membership_id INT NOT NULL AUTO_INCREMENT, + segment_id INT NOT NULL, + user_id INT NOT NULL, + PRIMARY KEY (membership_id), + FOREIGN KEY (segment_id) REFERENCES UserSegments(segment_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 20. Notifications +CREATE TABLE Notifications ( + notification_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + message TEXT, + sent_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (notification_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 21. Test Plans +CREATE TABLE TestPlans ( + plan_id INT NOT NULL AUTO_INCREMENT, + experiment_id INT NOT NULL, + plan_description TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (plan_id), + FOREIGN KEY (experiment_id) REFERENCES Experiments(experiment_id) +); + +-- 22. Results +CREATE TABLE Results ( + result_id INT NOT NULL AUTO_INCREMENT, + experiment_id INT NOT NULL, + variant_id INT NOT NULL, + total_users INT, + conversion_rate DECIMAL(5, 2), + PRIMARY KEY (result_id), + FOREIGN KEY (experiment_id) REFERENCES Experiments(experiment_id), + FOREIGN KEY (variant_id) REFERENCES Variants(variant_id) +); + +-- 23. Rollouts +CREATE TABLE Rollouts ( + rollout_id INT NOT NULL AUTO_INCREMENT, + feature_id INT NOT NULL, + rollout_percentage INT CHECK (rollout_percentage BETWEEN 0 AND 100), + rollout_date DATE, + PRIMARY KEY (rollout_id), + FOREIGN KEY (feature_id) REFERENCES FeatureFlags(flag_id) +); + +-- 24. Development Tasks +CREATE TABLE DevelopmentTasks ( + task_id INT NOT NULL AUTO_INCREMENT, + task_name VARCHAR(100), + assigned_to INT, + status ENUM('Pending', 'In Progress', 'Completed'), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (task_id), + FOREIGN KEY (assigned_to) REFERENCES Users(user_id) +); + +-- 25. Task Comments +CREATE TABLE TaskComments ( + comment_id INT NOT NULL AUTO_INCREMENT, + task_id INT NOT NULL, + user_id INT NOT NULL, + comment_text TEXT, + commented_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (comment_id), + FOREIGN KEY (task_id) REFERENCES DevelopmentTasks(task_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 26. Code Reviews +CREATE TABLE CodeReviews ( + review_id INT NOT NULL AUTO_INCREMENT, + task_id INT NOT NULL, + reviewer_id INT NOT NULL, + review_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + status ENUM('Approved', 'Rejected'), + PRIMARY KEY (review_id), + FOREIGN KEY (task_id) REFERENCES DevelopmentTasks(task_id), + FOREIGN KEY (reviewer_id) REFERENCES Users(user_id) +); + +-- 27. Test Cases +CREATE TABLE TestCases ( + test_case_id INT NOT NULL AUTO_INCREMENT, + task_id INT NOT NULL, + test_description TEXT, + expected_result TEXT, + PRIMARY KEY (test_case_id), + FOREIGN KEY (task_id) REFERENCES DevelopmentTasks(task_id) +); + +-- 28. Test Results +CREATE TABLE TestResults ( + result_id INT NOT NULL AUTO_INCREMENT, + test_case_id INT NOT NULL, + status ENUM('Pass', 'Fail'), + executed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (result_id), + FOREIGN KEY (test_case_id) REFERENCES TestCases(test_case_id) +); + +-- 29. Releases +CREATE TABLE Releases ( + release_id INT NOT NULL AUTO_INCREMENT, + version VARCHAR(20), + release_date DATE, + PRIMARY KEY (release_id) +); + +-- 30. Release Notes +CREATE TABLE ReleaseNotes ( + note_id INT NOT NULL AUTO_INCREMENT, + release_id INT NOT NULL, + note TEXT, + PRIMARY KEY (note_id), + FOREIGN KEY (release_id) REFERENCES Releases(release_id) +); + +-- 31. User Stories +CREATE TABLE UserStories ( + story_id INT NOT NULL AUTO_INCREMENT, + description TEXT, + acceptance_criteria TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (story_id) +); + +-- 32. Story Assignments +CREATE TABLE StoryAssignments ( + assignment_id INT NOT NULL AUTO_INCREMENT, + story_id INT NOT NULL, + user_id INT NOT NULL, + PRIMARY KEY (assignment_id), + FOREIGN KEY (story_id) REFERENCES UserStories(story_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 33. Sprints +CREATE TABLE Sprints ( + sprint_id INT NOT NULL AUTO_INCREMENT, + sprint_name VARCHAR(100), + start_date DATE, + end_date DATE, + PRIMARY KEY (sprint_id) +); + +-- 34. Sprint Tasks +CREATE TABLE SprintTasks ( + sprint_task_id INT NOT NULL AUTO_INCREMENT, + sprint_id INT NOT NULL, + task_id INT NOT NULL, + PRIMARY KEY (sprint_task_id), + FOREIGN KEY (sprint_id) REFERENCES Sprints(sprint_id), + FOREIGN KEY (task_id) REFERENCES DevelopmentTasks(task_id) +); + +-- 35. Backlogs +CREATE TABLE Backlogs ( + backlog_id INT NOT NULL AUTO_INCREMENT, + sprint_id INT NOT NULL, + task_id INT NOT NULL, + PRIMARY KEY (backlog_id), + FOREIGN KEY (sprint_id) REFERENCES Sprints(sprint_id), + FOREIGN KEY (task_id) REFERENCES DevelopmentTasks(task_id) +); + +-- 36. QA Teams +CREATE TABLE QATeams ( + qa_team_id INT NOT NULL AUTO_INCREMENT, + team_name VARCHAR(100), + PRIMARY KEY (qa_team_id) +); + +-- 37. QA Assignments +CREATE TABLE QAAssignments ( + qa_assignment_id INT NOT NULL AUTO_INCREMENT, + qa_team_id INT NOT NULL, + user_id INT NOT NULL, + PRIMARY KEY (qa_assignment_id), + FOREIGN KEY (qa_team_id) REFERENCES QATeams(qa_team_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 38. QA Reports +CREATE TABLE QAReports ( + report_id INT NOT NULL AUTO_INCREMENT, + qa_assignment_id INT NOT NULL, + report_text TEXT, + submitted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (report_id), + FOREIGN KEY (qa_assignment_id) REFERENCES QAAssignments(qa_assignment_id) +); + +-- 39. Integration Tests +CREATE TABLE IntegrationTests ( + test_id INT NOT NULL AUTO_INCREMENT, + test_description TEXT, + expected_outcome TEXT, + PRIMARY KEY (test_id) +); + +-- 40. Integration Results +CREATE TABLE IntegrationResults ( + result_id INT NOT NULL AUTO_INCREMENT, + test_id INT NOT NULL, + status ENUM('Pass', 'Fail'), + executed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (result_id), + FOREIGN KEY (test_id) REFERENCES IntegrationTests(test_id) +); + +-- 41. Performance Tests +CREATE TABLE PerformanceTests ( + performance_test_id INT NOT NULL AUTO_INCREMENT, + test_description TEXT, + expected_performance TEXT, + PRIMARY KEY (performance_test_id) +); + +-- 42. Performance Results +CREATE TABLE PerformanceResults ( + result_id INT NOT NULL AUTO_INCREMENT, + performance_test_id INT NOT NULL, + status ENUM('Pass', 'Fail'), + executed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (result_id), + FOREIGN KEY (performance_test_id) REFERENCES PerformanceTests(performance_test_id) +); + +-- 43. Documentation +CREATE TABLE Documentation ( + doc_id INT NOT NULL AUTO_INCREMENT, + title VARCHAR(100), + content TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (doc_id) +); + +-- 44. API Endpoints +CREATE TABLE ApiEndpoints ( + endpoint_id INT NOT NULL AUTO_INCREMENT, + endpoint_name VARCHAR(255), + method ENUM('GET', 'POST', 'PUT', 'DELETE'), + PRIMARY KEY (endpoint_id) +); + +-- 45. API Logs +CREATE TABLE ApiLogs ( + log_id INT NOT NULL AUTO_INCREMENT, + endpoint_id INT NOT NULL, + request_timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + response_status INT, + PRIMARY KEY (log_id), + FOREIGN KEY (endpoint_id) REFERENCES ApiEndpoints(endpoint_id) +); + +-- 46. System Metrics +CREATE TABLE SystemMetrics ( + metric_id INT NOT NULL AUTO_INCREMENT, + metric_name VARCHAR(100), + metric_value DECIMAL(10, 2), + recorded_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (metric_id) +); + +-- 47. Load Tests +CREATE TABLE LoadTests ( + load_test_id INT NOT NULL AUTO_INCREMENT, + test_description TEXT, + expected_load TEXT, + PRIMARY KEY (load_test_id) +); + +-- 48. Load Test Results +CREATE TABLE LoadTestResults ( + result_id INT NOT NULL AUTO_INCREMENT, + load_test_id INT NOT NULL, + status ENUM('Pass', 'Fail'), + executed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (result_id), + FOREIGN KEY (load_test_id) REFERENCES LoadTests(load_test_id) +); + +-- 49. Security Tests +CREATE TABLE SecurityTests ( + security_test_id INT NOT NULL AUTO_INCREMENT, + test_description TEXT, + expected_outcome TEXT, + PRIMARY KEY (security_test_id) +); + +-- 50. Security Test Results +CREATE TABLE SecurityTestResults ( + result_id INT NOT NULL AUTO_INCREMENT, + security_test_id INT NOT NULL, + status ENUM('Pass', 'Fail'), + executed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (result_id), + FOREIGN KEY (security_test_id) REFERENCES SecurityTests(security_test_id) +); + +-- 51. Risk Assessments +CREATE TABLE RiskAssessments ( + assessment_id INT NOT NULL AUTO_INCREMENT, + risk_description TEXT, + mitigation_strategy TEXT, + assessed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (assessment_id) +); + +-- 52. Audit Trails +CREATE TABLE AuditTrails ( + trail_id INT NOT NULL AUTO_INCREMENT, + action TEXT, + performed_by INT NOT NULL, + performed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (trail_id), + FOREIGN KEY (performed_by) REFERENCES Users(user_id) +); + +-- 53. Collaboration Tools +CREATE TABLE CollaborationTools ( + tool_id INT NOT NULL AUTO_INCREMENT, + tool_name VARCHAR(100), + PRIMARY KEY (tool_id) +); + +-- 54. Tool Integrations +CREATE TABLE ToolIntegrations ( + integration_id INT NOT NULL AUTO_INCREMENT, + tool_id INT NOT NULL, + user_id INT NOT NULL, + PRIMARY KEY (integration_id), + FOREIGN KEY (tool_id) REFERENCES CollaborationTools(tool_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 55. User Engagements +CREATE TABLE UserEngagements ( + engagement_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + engagement_type VARCHAR(100), + engagement_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (engagement_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 56. Change Requests +CREATE TABLE ChangeRequests ( + request_id INT NOT NULL AUTO_INCREMENT, + description TEXT, + status ENUM('Pending', 'Approved', 'Rejected'), + requested_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (request_id) +); + +-- 57. Change Request Approvals +CREATE TABLE ChangeRequestApprovals ( + approval_id INT NOT NULL AUTO_INCREMENT, + request_id INT NOT NULL, + approved_by INT NOT NULL, + approved_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (approval_id), + FOREIGN KEY (request_id) REFERENCES ChangeRequests(request_id), + FOREIGN KEY (approved_by) REFERENCES Users(user_id) +); + +-- 58. Training Sessions +CREATE TABLE TrainingSessions ( + session_id INT NOT NULL AUTO_INCREMENT, + topic VARCHAR(100), + scheduled_at TIMESTAMP, + PRIMARY KEY (session_id) +); + +-- 59. Training Attendance +CREATE TABLE TrainingAttendance ( + attendance_id INT NOT NULL AUTO_INCREMENT, + session_id INT NOT NULL, + user_id INT NOT NULL, + attended BOOLEAN DEFAULT FALSE, + PRIMARY KEY (attendance_id), + FOREIGN KEY (session_id) REFERENCES TrainingSessions(session_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 60. User Satisfaction Surveys +CREATE TABLE UserSatisfactionSurveys ( + survey_id INT NOT NULL AUTO_INCREMENT, + survey_title VARCHAR(100), + submission_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (survey_id) +); + +-- 61. Survey Responses +CREATE TABLE SurveyResponses ( + response_id INT NOT NULL AUTO_INCREMENT, + survey_id INT NOT NULL, + user_id INT NOT NULL, + response_text TEXT, + PRIMARY KEY (response_id), + FOREIGN KEY (survey_id) REFERENCES UserSatisfactionSurveys(survey_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 62. Analytics +CREATE TABLE Analytics ( + analytics_id INT NOT NULL AUTO_INCREMENT, + experiment_id INT NOT NULL, + metric_name VARCHAR(100), + metric_value DECIMAL(10, 2), + recorded_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (analytics_id), + FOREIGN KEY (experiment_id) REFERENCES Experiments(experiment_id) +); + +-- 63. Product Backlog +CREATE TABLE ProductBacklog ( + backlog_id INT NOT NULL AUTO_INCREMENT, + item_description TEXT, + priority ENUM('Low', 'Medium', 'High'), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (backlog_id) +); + +-- 64. Backlog Refinements +CREATE TABLE BacklogRefinements ( + refinement_id INT NOT NULL AUTO_INCREMENT, + backlog_id INT NOT NULL, + refined_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (refinement_id), + FOREIGN KEY (backlog_id) REFERENCES ProductBacklog(backlog_id) +); + +-- 65. Product Roadmaps +CREATE TABLE ProductRoadmaps ( + roadmap_id INT NOT NULL AUTO_INCREMENT, + title VARCHAR(100), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (roadmap_id) +); + +-- 66. Roadmap Items +CREATE TABLE RoadmapItems ( + item_id INT NOT NULL AUTO_INCREMENT, + roadmap_id INT NOT NULL, + description TEXT, + due_date DATE, + PRIMARY KEY (item_id), + FOREIGN KEY (roadmap_id) REFERENCES ProductRoadmaps(roadmap_id) +); + +-- 67. Incident Reports +CREATE TABLE IncidentReports ( + report_id INT NOT NULL AUTO_INCREMENT, + incident_description TEXT, + reported_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (report_id) +); + +-- 68. Incident Resolutions +CREATE TABLE IncidentResolutions ( + resolution_id INT NOT NULL AUTO_INCREMENT, + report_id INT NOT NULL, + resolution_description TEXT, + resolved_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (resolution_id), + FOREIGN KEY (report_id) REFERENCES IncidentReports(report_id) +); + +-- 69. Communication Logs +CREATE TABLE CommunicationLogs ( + log_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + communication_type VARCHAR(100), + log_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (log_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 70. External Collaborations +CREATE TABLE ExternalCollaborations ( + collaboration_id INT NOT NULL AUTO_INCREMENT, + company_name VARCHAR(100), + contact_person VARCHAR(100), + PRIMARY KEY (collaboration_id) +); + +-- 71. Collaboration Notes +CREATE TABLE CollaborationNotes ( + note_id INT NOT NULL AUTO_INCREMENT, + collaboration_id INT NOT NULL, + note_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (note_id), + FOREIGN KEY (collaboration_id) REFERENCES ExternalCollaborations(collaboration_id) +); + +-- 72. Retrospectives +CREATE TABLE Retrospectives ( + retrospective_id INT NOT NULL AUTO_INCREMENT, + session_id INT NOT NULL, + notes TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (retrospective_id), + FOREIGN KEY (session_id) REFERENCES TrainingSessions(session_id) +); + +-- 73. Performance Reviews +CREATE TABLE PerformanceReviews2 ( + review_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + review_period VARCHAR(50), + comments TEXT, + PRIMARY KEY (review_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 74. User Roles +CREATE TABLE UserRoles ( + role_id INT NOT NULL AUTO_INCREMENT, + role_name VARCHAR(50), + PRIMARY KEY (role_id) +); + +-- 75. User Role Assignments +CREATE TABLE UserRoleAssignments ( + assignment_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + role_id INT NOT NULL, + assigned_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (assignment_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id), + FOREIGN KEY (role_id) REFERENCES UserRoles(role_id) +); + +-- 76. API Keys +CREATE TABLE ApiKeys ( + api_key_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + key_value VARCHAR(255) UNIQUE, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (api_key_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 77. Deployment Logs +CREATE TABLE DeploymentLogs ( + log_id INT NOT NULL AUTO_INCREMENT, + deployment_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + description TEXT, + PRIMARY KEY (log_id) +); + +-- 78. Technical Debt +CREATE TABLE TechnicalDebt ( + debt_id INT NOT NULL AUTO_INCREMENT, + description TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (debt_id) +); + +-- 79. Debt Resolutions +CREATE TABLE DebtResolutions ( + resolution_id INT NOT NULL AUTO_INCREMENT, + debt_id INT NOT NULL, + resolution_description TEXT, + resolved_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (resolution_id), + FOREIGN KEY (debt_id) REFERENCES TechnicalDebt(debt_id) +); + +-- 80. Architecture Reviews +CREATE TABLE ArchitectureReviews ( + review_id INT NOT NULL AUTO_INCREMENT, + description TEXT, + reviewed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (review_id) +); + +-- 81. Technical Specifications +CREATE TABLE TechnicalSpecifications ( + spec_id INT NOT NULL AUTO_INCREMENT, + project_name VARCHAR(100), + spec_description TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (spec_id) +); + +-- 82. Technology Stack +CREATE TABLE TechnologyStack ( + stack_id INT NOT NULL AUTO_INCREMENT, + technology_name VARCHAR(100), + PRIMARY KEY (stack_id) +); + +-- 83. Stack Components +CREATE TABLE StackComponents ( + component_id INT NOT NULL AUTO_INCREMENT, + stack_id INT NOT NULL, + component_name VARCHAR(100), + PRIMARY KEY (component_id), + FOREIGN KEY (stack_id) REFERENCES TechnologyStack(stack_id) +); + +-- 84. Stakeholders +CREATE TABLE Stakeholders ( + stakeholder_id INT NOT NULL AUTO_INCREMENT, + name VARCHAR(100), + email VARCHAR(100) UNIQUE, + PRIMARY KEY (stakeholder_id) +); + +-- 85. Stakeholder Feedback +CREATE TABLE StakeholderFeedback ( + feedback_id INT NOT NULL AUTO_INCREMENT, + stakeholder_id INT NOT NULL, + feedback_text TEXT, + submitted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (feedback_id), + FOREIGN KEY (stakeholder_id) REFERENCES Stakeholders(stakeholder_id) +); + +-- 86. Meeting Notes +CREATE TABLE MeetingNotes ( + note_id INT NOT NULL AUTO_INCREMENT, + meeting_date TIMESTAMP, + notes TEXT, + PRIMARY KEY (note_id) +); + +-- 87. Project Timelines +CREATE TABLE ProjectTimelines ( + timeline_id INT NOT NULL AUTO_INCREMENT, + project_name VARCHAR(100), + start_date DATE, + end_date DATE, + PRIMARY KEY (timeline_id) +); + +-- 88. Milestones +CREATE TABLE Milestones ( + milestone_id INT NOT NULL AUTO_INCREMENT, + timeline_id INT NOT NULL, + milestone_description TEXT, + milestone_date DATE, + PRIMARY KEY (milestone_id), + FOREIGN KEY (timeline_id) REFERENCES ProjectTimelines(timeline_id) +); + +-- 89. Risk Mitigation Plans +CREATE TABLE RiskMitigationPlans ( + plan_id INT NOT NULL AUTO_INCREMENT, + risk_id INT NOT NULL, + mitigation_strategy TEXT, + PRIMARY KEY (plan_id), + FOREIGN KEY (risk_id) REFERENCES RiskAssessments(assessment_id) +); + +-- 90. User Groups +CREATE TABLE UserGroups ( + group_id INT NOT NULL AUTO_INCREMENT, + group_name VARCHAR(100), + PRIMARY KEY (group_id) +); + +-- 91. Group Memberships +CREATE TABLE GroupMemberships ( + membership_id INT NOT NULL AUTO_INCREMENT, + group_id INT NOT NULL, + user_id INT NOT NULL, + PRIMARY KEY (membership_id), + FOREIGN KEY (group_id) REFERENCES UserGroups(group_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 92. User Notifications +CREATE TABLE UserNotifications ( + notification_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + notification_text TEXT, + sent_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (notification_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 93. User Preferences +CREATE TABLE UserPreferences ( + preference_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + preference_key VARCHAR(100), + preference_value VARCHAR(255), + PRIMARY KEY (preference_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 94. Data Privacy Agreements +CREATE TABLE DataPrivacyAgreements ( + agreement_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + agreement_text TEXT, + signed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (agreement_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 95. Compliance Checklists +CREATE TABLE ComplianceChecklists ( + checklist_id INT NOT NULL AUTO_INCREMENT, + checklist_name VARCHAR(100), + PRIMARY KEY (checklist_id) +); + +-- 96. Checklist Items +CREATE TABLE ChecklistItems ( + item_id INT NOT NULL AUTO_INCREMENT, + checklist_id INT NOT NULL, + item_description TEXT, + completed BOOLEAN DEFAULT FALSE, + PRIMARY KEY (item_id), + FOREIGN KEY (checklist_id) REFERENCES ComplianceChecklists(checklist_id) +); + +-- 97. Knowledge Base Articles +CREATE TABLE KnowledgeBaseArticles ( + article_id INT NOT NULL AUTO_INCREMENT, + title VARCHAR(100), + content TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (article_id) +); + +-- 98. Article Feedback +CREATE TABLE ArticleFeedback ( + feedback_id INT NOT NULL AUTO_INCREMENT, + article_id INT NOT NULL, + user_id INT NOT NULL, + feedback_text TEXT, + submitted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (feedback_id), + FOREIGN KEY (article_id) REFERENCES KnowledgeBaseArticles(article_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 99. Roadmap Feedback +CREATE TABLE RoadmapFeedback ( + feedback_id INT NOT NULL AUTO_INCREMENT, + roadmap_id INT NOT NULL, + user_id INT NOT NULL, + feedback_text TEXT, + submitted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (feedback_id), + FOREIGN KEY (roadmap_id) REFERENCES ProductRoadmaps(roadmap_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 100. Project Status +CREATE TABLE ProjectStatus ( + status_id INT NOT NULL AUTO_INCREMENT, + project_name VARCHAR(100), + status ENUM('On Track', 'At Risk', 'Delayed'), + last_updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (status_id) +); + +-- 1. Employees +CREATE TABLE Employees ( + employee_id INT NOT NULL AUTO_INCREMENT, + first_name VARCHAR(50) NOT NULL, + last_name VARCHAR(50) NOT NULL, + email VARCHAR(100) NOT NULL UNIQUE, + phone VARCHAR(15), + hire_date DATE, + job_title VARCHAR(50), + salary DECIMAL(10, 2), + PRIMARY KEY (employee_id) +); + +-- 2. Departments +CREATE TABLE Departments ( + department_id INT NOT NULL AUTO_INCREMENT, + department_name VARCHAR(100) NOT NULL, + location VARCHAR(100), + PRIMARY KEY (department_id) +); + +-- 3. Projects +CREATE TABLE Projects ( + project_id INT NOT NULL AUTO_INCREMENT, + project_name VARCHAR(100) NOT NULL, + start_date DATE, + end_date DATE, + budget DECIMAL(10, 2), + PRIMARY KEY (project_id) +); + +-- 4. Employee Departments +CREATE TABLE EmployeeDepartments ( + emp_dept_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + department_id INT NOT NULL, + start_date DATE, + end_date DATE, + PRIMARY KEY (emp_dept_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id), + FOREIGN KEY (department_id) REFERENCES Departments(department_id) +); + +-- 5. Project Assignments +CREATE TABLE ProjectAssignments ( + assignment_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + project_id INT NOT NULL, + role VARCHAR(50), + PRIMARY KEY (assignment_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id), + FOREIGN KEY (project_id) REFERENCES Projects(project_id) +); + +-- 6. Salaries +CREATE TABLE Salaries ( + salary_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + salary_amount DECIMAL(10, 2) NOT NULL, + pay_date DATE, + PRIMARY KEY (salary_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 7. Performance Reviews +CREATE TABLE PerformanceReviews ( + review_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + review_date DATE, + score INT CHECK (score BETWEEN 1 AND 5), + comments TEXT, + PRIMARY KEY (review_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 8. Attendance +CREATE TABLE Attendance ( + attendance_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + attendance_date DATE, + status ENUM('Present', 'Absent', 'Leave'), + PRIMARY KEY (attendance_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 9. Expenses +CREATE TABLE Expenses ( + expense_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + expense_amount DECIMAL(10, 2), + expense_date DATE, + description TEXT, + PRIMARY KEY (expense_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 10. Clients +CREATE TABLE Clients ( + client_id INT NOT NULL AUTO_INCREMENT, + client_name VARCHAR(100) NOT NULL, + contact_person VARCHAR(100), + phone VARCHAR(15), + email VARCHAR(100), + PRIMARY KEY (client_id) +); + +-- 11. Invoices +CREATE TABLE Invoices ( + invoice_id INT NOT NULL AUTO_INCREMENT, + client_id INT NOT NULL, + invoice_date DATE, + amount DECIMAL(10, 2), + status ENUM('Paid', 'Pending', 'Overdue'), + PRIMARY KEY (invoice_id), + FOREIGN KEY (client_id) REFERENCES Clients(client_id) +); + +-- 12. Payments +CREATE TABLE Payments ( + payment_id INT NOT NULL AUTO_INCREMENT, + invoice_id INT NOT NULL, + payment_date DATE, + amount DECIMAL(10, 2), + PRIMARY KEY (payment_id), + FOREIGN KEY (invoice_id) REFERENCES Invoices(invoice_id) +); + +-- 13. Suppliers +CREATE TABLE Suppliers ( + supplier_id INT NOT NULL AUTO_INCREMENT, + supplier_name VARCHAR(100) NOT NULL, + contact_person VARCHAR(100), + phone VARCHAR(15), + email VARCHAR(100), + PRIMARY KEY (supplier_id) +); + +-- 14. Purchases +CREATE TABLE Purchases ( + purchase_id INT NOT NULL AUTO_INCREMENT, + supplier_id INT NOT NULL, + purchase_date DATE, + total_amount DECIMAL(10, 2), + PRIMARY KEY (purchase_id), + FOREIGN KEY (supplier_id) REFERENCES Suppliers(supplier_id) +); + +-- 15. Products +CREATE TABLE Products ( + product_id INT NOT NULL AUTO_INCREMENT, + product_name VARCHAR(100) NOT NULL, + price DECIMAL(10, 2) NOT NULL, + quantity INT NOT NULL, + PRIMARY KEY (product_id) +); + +-- 16. Inventory +CREATE TABLE Inventory ( + inventory_id INT NOT NULL AUTO_INCREMENT, + product_id INT NOT NULL, + stock_level INT, + last_updated DATE, + PRIMARY KEY (inventory_id), + FOREIGN KEY (product_id) REFERENCES Products(product_id) +); + +-- 17. Meetings +CREATE TABLE Meetings ( + meeting_id INT NOT NULL AUTO_INCREMENT, + meeting_date DATE, + agenda TEXT, + PRIMARY KEY (meeting_id) +); + +-- 18. Meeting Participants +CREATE TABLE MeetingParticipants ( + participant_id INT NOT NULL AUTO_INCREMENT, + meeting_id INT NOT NULL, + employee_id INT NOT NULL, + PRIMARY KEY (participant_id), + FOREIGN KEY (meeting_id) REFERENCES Meetings(meeting_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 19. Training Programs +CREATE TABLE TrainingPrograms ( + training_id INT NOT NULL AUTO_INCREMENT, + program_name VARCHAR(100) NOT NULL, + start_date DATE, + end_date DATE, + PRIMARY KEY (training_id) +); + +-- 20. Employee Training +CREATE TABLE EmployeeTraining ( + training_participation_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + training_id INT NOT NULL, + PRIMARY KEY (training_participation_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id), + FOREIGN KEY (training_id) REFERENCES TrainingPrograms(training_id) +); + +-- 21. Policies +CREATE TABLE Policies ( + policy_id INT NOT NULL AUTO_INCREMENT, + policy_name VARCHAR(100) NOT NULL, + description TEXT, + PRIMARY KEY (policy_id) +); + +-- 22. Policy Acknowledgments +CREATE TABLE PolicyAcknowledgments ( + acknowledgment_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + policy_id INT NOT NULL, + acknowledgment_date DATE, + PRIMARY KEY (acknowledgment_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id), + FOREIGN KEY (policy_id) REFERENCES Policies(policy_id) +); + +-- 23. Company Assets +CREATE TABLE CompanyAssets ( + asset_id INT NOT NULL AUTO_INCREMENT, + asset_name VARCHAR(100) NOT NULL, + purchase_date DATE, + value DECIMAL(10, 2), + PRIMARY KEY (asset_id) +); + +-- 24. Asset Allocation +CREATE TABLE AssetAllocation ( + allocation_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + asset_id INT NOT NULL, + allocation_date DATE, + PRIMARY KEY (allocation_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id), + FOREIGN KEY (asset_id) REFERENCES CompanyAssets(asset_id) +); + +-- 25. Customer Feedback +CREATE TABLE CustomerFeedback ( + feedback_id INT NOT NULL AUTO_INCREMENT, + client_id INT NOT NULL, + feedback_text TEXT, + feedback_date DATE, + PRIMARY KEY (feedback_id), + FOREIGN KEY (client_id) REFERENCES Clients(client_id) +); + +-- 26. Marketing Campaigns +CREATE TABLE MarketingCampaigns ( + campaign_id INT NOT NULL AUTO_INCREMENT, + campaign_name VARCHAR(100) NOT NULL, + start_date DATE, + end_date DATE, + budget DECIMAL(10, 2), + PRIMARY KEY (campaign_id) +); + +-- 27. Campaign Performance +CREATE TABLE CampaignPerformance ( + performance_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + performance_metric VARCHAR(100), + value DECIMAL(10, 2), + PRIMARY KEY (performance_id), + FOREIGN KEY (campaign_id) REFERENCES MarketingCampaigns(campaign_id) +); + +-- 28. Contracts +CREATE TABLE Contracts ( + contract_id INT NOT NULL AUTO_INCREMENT, + client_id INT NOT NULL, + start_date DATE, + end_date DATE, + contract_value DECIMAL(10, 2), + PRIMARY KEY (contract_id), + FOREIGN KEY (client_id) REFERENCES Clients(client_id) +); + +-- 29. Audit Logs +CREATE TABLE AuditLogs ( + log_id INT NOT NULL AUTO_INCREMENT, + action VARCHAR(100), + timestamp DATETIME, + employee_id INT NOT NULL, + PRIMARY KEY (log_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 30. Risk Management +CREATE TABLE RiskManagement ( + risk_id INT NOT NULL AUTO_INCREMENT, + description TEXT, + assessment_date DATE, + risk_level ENUM('Low', 'Medium', 'High'), + PRIMARY KEY (risk_id) +); + +-- 31. Risk Mitigation +CREATE TABLE RiskMitigation ( + mitigation_id INT NOT NULL AUTO_INCREMENT, + risk_id INT NOT NULL, + action_taken TEXT, + implementation_date DATE, + PRIMARY KEY (mitigation_id), + FOREIGN KEY (risk_id) REFERENCES RiskManagement(risk_id) +); + +-- 32. Business Continuity Plans +CREATE TABLE BusinessContinuityPlans ( + plan_id INT NOT NULL AUTO_INCREMENT, + plan_name VARCHAR(100) NOT NULL, + created_date DATE, + PRIMARY KEY (plan_id) +); + +-- 33. Plan Testing +CREATE TABLE PlanTesting ( + test_id INT NOT NULL AUTO_INCREMENT, + plan_id INT NOT NULL, + test_date DATE, + results TEXT, + PRIMARY KEY (test_id), + FOREIGN KEY (plan_id) REFERENCES BusinessContinuityPlans(plan_id) +); + +-- 34. Social Media Accounts +CREATE TABLE SocialMediaAccounts ( + account_id INT NOT NULL AUTO_INCREMENT, + platform VARCHAR(50), + handle VARCHAR(100), + PRIMARY KEY (account_id) +); + +-- 35. Social Media Posts +CREATE TABLE SocialMediaPosts ( + post_id INT NOT NULL AUTO_INCREMENT, + account_id INT NOT NULL, + content TEXT, + post_date DATE, + PRIMARY KEY (post_id), + FOREIGN KEY (account_id) REFERENCES SocialMediaAccounts(account_id) +); + +-- 36. Supplier Contracts +CREATE TABLE SupplierContracts ( + contract_id INT NOT NULL AUTO_INCREMENT, + supplier_id INT NOT NULL, + start_date DATE, + end_date DATE, + contract_value DECIMAL(10, 2), + PRIMARY KEY (contract_id), + FOREIGN KEY (supplier_id) REFERENCES Suppliers(supplier_id) +); + +-- 37. EventsVT +CREATE TABLE EventsVT ( + event_id INT NOT NULL AUTO_INCREMENT, + event_name VARCHAR(100), + event_date DATE, + location VARCHAR(100), + PRIMARY KEY (event_id) +); + +-- 38. Event Participants +CREATE TABLE EventParticipants ( + participant_id INT NOT NULL AUTO_INCREMENT, + event_id INT NOT NULL, + employee_id INT NOT NULL, + PRIMARY KEY (participant_id), + FOREIGN KEY (event_id) REFERENCES EventsVT(event_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 39. Market Research +CREATE TABLE MarketResearch ( + research_id INT NOT NULL AUTO_INCREMENT, + research_topic VARCHAR(100), + findings TEXT, + research_date DATE, + PRIMARY KEY (research_id) +); + +-- 40. Company Policies +CREATE TABLE CompanyPolicies ( + policy_id INT NOT NULL AUTO_INCREMENT, + policy_name VARCHAR(100), + description TEXT, + PRIMARY KEY (policy_id) +); + +-- 41. Employee Complaints +CREATE TABLE EmployeeComplaints ( + complaint_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + complaint_text TEXT, + complaint_date DATE, + PRIMARY KEY (complaint_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 42. Employee Benefits +CREATE TABLE EmployeeBenefits ( + benefit_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + benefit_type VARCHAR(100), + PRIMARY KEY (benefit_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 43. User Accounts +CREATE TABLE UserAccounts ( + user_id INT NOT NULL AUTO_INCREMENT, + username VARCHAR(50) NOT NULL UNIQUE, + password_hash VARCHAR(255) NOT NULL, + employee_id INT, + PRIMARY KEY (user_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 44. Password Resets +CREATE TABLE PasswordResets ( + reset_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + reset_date DATE, + PRIMARY KEY (reset_id), + FOREIGN KEY (user_id) REFERENCES UserAccounts(user_id) +); + +-- 45. IT Assets +CREATE TABLE ITAssets ( + asset_id INT NOT NULL AUTO_INCREMENT, + asset_name VARCHAR(100), + purchase_date DATE, + value DECIMAL(10, 2), + PRIMARY KEY (asset_id) +); + +-- 46. IT Support Tickets +CREATE TABLE ITSupportTickets ( + ticket_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + issue_description TEXT, + submission_date DATE, + status ENUM('Open', 'In Progress', 'Resolved'), + PRIMARY KEY (ticket_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 47. Vendor Management +CREATE TABLE VendorManagement ( + vendor_id INT NOT NULL AUTO_INCREMENT, + vendor_name VARCHAR(100), + contact_person VARCHAR(100), + phone VARCHAR(15), + email VARCHAR(100), + PRIMARY KEY (vendor_id) +); + +-- 48. Purchase Orders +CREATE TABLE PurchaseOrders ( + order_id INT NOT NULL AUTO_INCREMENT, + supplier_id INT NOT NULL, + order_date DATE, + total_amount DECIMAL(10, 2), + PRIMARY KEY (order_id), + FOREIGN KEY (supplier_id) REFERENCES Suppliers(supplier_id) +); + +-- 49. Sales +CREATE TABLE Sales ( + sale_id INT NOT NULL AUTO_INCREMENT, + product_id INT NOT NULL, + sale_date DATE, + quantity INT, + total_amount DECIMAL(10, 2), + PRIMARY KEY (sale_id), + FOREIGN KEY (product_id) REFERENCES Products(product_id) +); + +-- 50. Sales Reports +CREATE TABLE SalesReports ( + report_id INT NOT NULL AUTO_INCREMENT, + report_date DATE, + total_sales DECIMAL(10, 2), + PRIMARY KEY (report_id) +); + +-- 51. Financial Reports +CREATE TABLE FinancialReports ( + report_id INT NOT NULL AUTO_INCREMENT, + report_date DATE, + total_revenue DECIMAL(10, 2), + total_expenses DECIMAL(10, 2), + net_profit DECIMAL(10, 2), + PRIMARY KEY (report_id) +); + +-- 52. Business Goals +CREATE TABLE BusinessGoals ( + goal_id INT NOT NULL AUTO_INCREMENT, + goal_description TEXT, + target_date DATE, + PRIMARY KEY (goal_id) +); + +-- 53. Goal Progress +CREATE TABLE GoalProgress ( + progress_id INT NOT NULL AUTO_INCREMENT, + goal_id INT NOT NULL, + progress_percentage INT CHECK (progress_percentage BETWEEN 0 AND 100), + PRIMARY KEY (progress_id), + FOREIGN KEY (goal_id) REFERENCES BusinessGoals(goal_id) +); + +-- 54. User Roles +CREATE TABLE UserRolesVT ( + role_id INT NOT NULL AUTO_INCREMENT, + role_name VARCHAR(100), + PRIMARY KEY (role_id) +); + +-- 55. Role Assignments +CREATE TABLE RoleAssignments ( + assignment_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + role_id INT NOT NULL, + PRIMARY KEY (assignment_id), + FOREIGN KEY (user_id) REFERENCES UserAccounts(user_id), + FOREIGN KEY (role_id) REFERENCES UserRolesVT(role_id) +); + +-- 56. Feedback Forms +CREATE TABLE FeedbackForms ( + form_id INT NOT NULL AUTO_INCREMENT, + form_title VARCHAR(100), + submission_date DATE, + PRIMARY KEY (form_id) +); + +-- 57. Feedback Responses +CREATE TABLE FeedbackResponses ( + response_id INT NOT NULL AUTO_INCREMENT, + form_id INT NOT NULL, + employee_id INT NOT NULL, + response_text TEXT, + PRIMARY KEY (response_id), + FOREIGN KEY (form_id) REFERENCES FeedbackForms(form_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 58. Document Management +CREATE TABLE DocumentManagement ( + document_id INT NOT NULL AUTO_INCREMENT, + document_name VARCHAR(100), + upload_date DATE, + employee_id INT, + PRIMARY KEY (document_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 59. Legal Documents +CREATE TABLE LegalDocuments ( + document_id INT NOT NULL AUTO_INCREMENT, + document_name VARCHAR(100), + upload_date DATE, + PRIMARY KEY (document_id) +); + +-- 60. Compliance Audits +CREATE TABLE ComplianceAudits ( + audit_id INT NOT NULL AUTO_INCREMENT, + audit_date DATE, + findings TEXT, + PRIMARY KEY (audit_id) +); + +-- 61. Audit Recommendations +CREATE TABLE AuditRecommendations ( + recommendation_id INT NOT NULL AUTO_INCREMENT, + audit_id INT NOT NULL, + recommendation_text TEXT, + PRIMARY KEY (recommendation_id), + FOREIGN KEY (audit_id) REFERENCES ComplianceAudits(audit_id) +); + +-- 62. Tax Filings +CREATE TABLE TaxFilings ( + filing_id INT NOT NULL AUTO_INCREMENT, + filing_year INT NOT NULL, + amount DECIMAL(10, 2), + filing_date DATE, + PRIMARY KEY (filing_id) +); + +-- 63. Payment Methods +CREATE TABLE PaymentMethods ( + method_id INT NOT NULL AUTO_INCREMENT, + method_name VARCHAR(100), + PRIMARY KEY (method_id) +); + +-- 64. Payment Transactions +CREATE TABLE PaymentTransactions ( + transaction_id INT NOT NULL AUTO_INCREMENT, + method_id INT NOT NULL, + amount DECIMAL(10, 2), + transaction_date DATE, + PRIMARY KEY (transaction_id), + FOREIGN KEY (method_id) REFERENCES PaymentMethods(method_id) +); + +-- 65. Business Units +CREATE TABLE BusinessUnits ( + unit_id INT NOT NULL AUTO_INCREMENT, + unit_name VARCHAR(100), + PRIMARY KEY (unit_id) +); + +-- 66. Unit Budgets +CREATE TABLE UnitBudgets ( + budget_id INT NOT NULL AUTO_INCREMENT, + unit_id INT NOT NULL, + budget_amount DECIMAL(10, 2), + PRIMARY KEY (budget_id), + FOREIGN KEY (unit_id) REFERENCES BusinessUnits(unit_id) +); + +-- 67. Strategic Initiatives +CREATE TABLE StrategicInitiatives ( + initiative_id INT NOT NULL AUTO_INCREMENT, + initiative_name VARCHAR(100), + description TEXT, + PRIMARY KEY (initiative_id) +); + +-- 68. Initiative Progress +CREATE TABLE InitiativeProgress ( + progress_id INT NOT NULL AUTO_INCREMENT, + initiative_id INT NOT NULL, + progress_percentage INT CHECK (progress_percentage BETWEEN 0 AND 100), + PRIMARY KEY (progress_id), + FOREIGN KEY (initiative_id) REFERENCES StrategicInitiatives(initiative_id) +); + +-- 69. Media Relations +CREATE TABLE MediaRelations ( + media_id INT NOT NULL AUTO_INCREMENT, + contact_name VARCHAR(100), + phone VARCHAR(15), + email VARCHAR(100), + PRIMARY KEY (media_id) +); + +-- 70. Media EventsVT +CREATE TABLE MediaEventsVT ( + event_id INT NOT NULL AUTO_INCREMENT, + media_id INT NOT NULL, + event_name VARCHAR(100), + event_date DATE, + PRIMARY KEY (event_id), + FOREIGN KEY (media_id) REFERENCES MediaRelations(media_id) +); + +-- 71. StakeholdersVT +CREATE TABLE StakeholdersVT ( + stakeholder_id INT NOT NULL AUTO_INCREMENT, + stakeholder_name VARCHAR(100), + contact_person VARCHAR(100), + phone VARCHAR(15), + email VARCHAR(100), + PRIMARY KEY (stakeholder_id) +); + +-- 72. Stakeholder Engagement +CREATE TABLE StakeholderEngagement ( + engagement_id INT NOT NULL AUTO_INCREMENT, + stakeholder_id INT NOT NULL, + engagement_date DATE, + PRIMARY KEY (engagement_id), + FOREIGN KEY (stakeholder_id) REFERENCES StakeholdersVT(stakeholder_id) +); + +-- 73. Procurement +CREATE TABLE Procurement ( + procurement_id INT NOT NULL AUTO_INCREMENT, + supplier_id INT NOT NULL, + procurement_date DATE, + total_amount DECIMAL(10, 2), + PRIMARY KEY (procurement_id), + FOREIGN KEY (supplier_id) REFERENCES Suppliers(supplier_id) +); + +-- 74. Supplier Ratings +CREATE TABLE SupplierRatings ( + rating_id INT NOT NULL AUTO_INCREMENT, + supplier_id INT NOT NULL, + rating INT CHECK (rating BETWEEN 1 AND 5), + comments TEXT, + PRIMARY KEY (rating_id), + FOREIGN KEY (supplier_id) REFERENCES Suppliers(supplier_id) +); + +-- 75. Company Vehicles +CREATE TABLE CompanyVehicles ( + vehicle_id INT NOT NULL AUTO_INCREMENT, + vehicle_name VARCHAR(100), + purchase_date DATE, + value DECIMAL(10, 2), + PRIMARY KEY (vehicle_id) +); + +-- 76. Vehicle Maintenance +CREATE TABLE VehicleMaintenance ( + maintenance_id INT NOT NULL AUTO_INCREMENT, + vehicle_id INT NOT NULL, + maintenance_date DATE, + description TEXT, + PRIMARY KEY (maintenance_id), + FOREIGN KEY (vehicle_id) REFERENCES CompanyVehicles(vehicle_id) +); + +-- 77. Office Locations +CREATE TABLE OfficeLocations ( + location_id INT NOT NULL AUTO_INCREMENT, + address VARCHAR(255), + city VARCHAR(100), + state VARCHAR(100), + zip VARCHAR(10), + PRIMARY KEY (location_id) +); + +-- 78. Office Resources +CREATE TABLE OfficeResources ( + resource_id INT NOT NULL AUTO_INCREMENT, + location_id INT NOT NULL, + resource_name VARCHAR(100), + quantity INT, + PRIMARY KEY (resource_id), + FOREIGN KEY (location_id) REFERENCES OfficeLocations(location_id) +); + +-- 79. Employee Relocation +CREATE TABLE EmployeeRelocation ( + relocation_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + new_location_id INT NOT NULL, + relocation_date DATE, + PRIMARY KEY (relocation_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id), + FOREIGN KEY (new_location_id) REFERENCES OfficeLocations(location_id) +); + +-- 80. Technology Stack +CREATE TABLE TechStack ( + tech_id INT NOT NULL AUTO_INCREMENT, + tech_name VARCHAR(100), + PRIMARY KEY (tech_id) +); + +-- 81. Technology Usage +CREATE TABLE TechnologyUsage ( + usage_id INT NOT NULL AUTO_INCREMENT, + tech_id INT NOT NULL, + employee_id INT NOT NULL, + usage_date DATE, + PRIMARY KEY (usage_id), + FOREIGN KEY (tech_id) REFERENCES TechStack(tech_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 82. Community Engagement +CREATE TABLE CommunityEngagement ( + engagement_id INT NOT NULL AUTO_INCREMENT, + engagement_name VARCHAR(100), + engagement_date DATE, + PRIMARY KEY (engagement_id) +); + +-- 83. Sponsorships +CREATE TABLE Sponsorships ( + sponsorship_id INT NOT NULL AUTO_INCREMENT, + engagement_id INT NOT NULL, + amount DECIMAL(10, 2), + PRIMARY KEY (sponsorship_id), + FOREIGN KEY (engagement_id) REFERENCES CommunityEngagement(engagement_id) +); + +-- 84. Employee Surveys +CREATE TABLE EmployeeSurveys ( + survey_id INT NOT NULL AUTO_INCREMENT, + survey_title VARCHAR(100), + submission_date DATE, + PRIMARY KEY (survey_id) +); + +-- 85. Survey Responses +CREATE TABLE SurveyRes ( + response_id INT NOT NULL AUTO_INCREMENT, + survey_id INT NOT NULL, + employee_id INT NOT NULL, + response_text TEXT, + PRIMARY KEY (response_id), + FOREIGN KEY (survey_id) REFERENCES EmployeeSurveys(survey_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 86. Disaster Recovery Plans +CREATE TABLE DisasterRecoveryPlans ( + plan_id INT NOT NULL AUTO_INCREMENT, + plan_name VARCHAR(100), + created_date DATE, + PRIMARY KEY (plan_id) +); + +-- 87. Plan Implementation +CREATE TABLE PlanImplementation ( + implementation_id INT NOT NULL AUTO_INCREMENT, + plan_id INT NOT NULL, + implementation_date DATE, + PRIMARY KEY (implementation_id), + FOREIGN KEY (plan_id) REFERENCES DisasterRecoveryPlans(plan_id) +); + +-- 88. Operational Metrics +CREATE TABLE OperationalMetrics ( + metric_id INT NOT NULL AUTO_INCREMENT, + metric_name VARCHAR(100), + value DECIMAL(10, 2), + measurement_date DATE, + PRIMARY KEY (metric_id) +); + +-- 89. Technology Updates +CREATE TABLE TechnologyUpdates ( + update_id INT NOT NULL AUTO_INCREMENT, + tech_id INT NOT NULL, + update_date DATE, + description TEXT, + PRIMARY KEY (update_id), + FOREIGN KEY (tech_id) REFERENCES TechStack(tech_id) +); + +-- 90. Crisis Management +CREATE TABLE CrisisManagement ( + crisis_id INT NOT NULL AUTO_INCREMENT, + crisis_description TEXT, + response_plan TEXT, + PRIMARY KEY (crisis_id) +); + +-- 91. Crisis Response +CREATE TABLE CrisisResponse ( + response_id INT NOT NULL AUTO_INCREMENT, + crisis_id INT NOT NULL, + response_date DATE, + PRIMARY KEY (response_id), + FOREIGN KEY (crisis_id) REFERENCES CrisisManagement(crisis_id) +); + +-- 92. Company EventsVT +CREATE TABLE CompanyEventsVT ( + event_id INT NOT NULL AUTO_INCREMENT, + event_name VARCHAR(100), + event_date DATE, + PRIMARY KEY (event_id) +); + +-- 93. Event Coordination +CREATE TABLE EventCoordination ( + coordination_id INT NOT NULL AUTO_INCREMENT, + event_id INT NOT NULL, + employee_id INT NOT NULL, + PRIMARY KEY (coordination_id), + FOREIGN KEY (event_id) REFERENCES CompanyEventsVT(event_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 94. Sales Strategies +CREATE TABLE SalesStrategies ( + strategy_id INT NOT NULL AUTO_INCREMENT, + strategy_description TEXT, + PRIMARY KEY (strategy_id) +); + +-- 95. Strategy Implementation +CREATE TABLE StrategyImplementation ( + implementation_id INT NOT NULL AUTO_INCREMENT, + strategy_id INT NOT NULL, + implementation_date DATE, + PRIMARY KEY (implementation_id), + FOREIGN KEY (strategy_id) REFERENCES SalesStrategies(strategy_id) +); + +-- 96. Employee Onboarding +CREATE TABLE EmployeeOnboarding ( + onboarding_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + onboarding_date DATE, + PRIMARY KEY (onboarding_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 97. Employee Offboarding +CREATE TABLE EmployeeOffboarding ( + offboarding_id INT NOT NULL AUTO_INCREMENT, + employee_id INT NOT NULL, + offboarding_date DATE, + PRIMARY KEY (offboarding_id), + FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) +); + +-- 98. Health and Safety +CREATE TABLE HealthAndSafety ( + safety_id INT NOT NULL AUTO_INCREMENT, + safety_description TEXT, + inspection_date DATE, + PRIMARY KEY (safety_id) +); + +-- 99. Incident Reports +CREATE TABLE IncRepo ( + report_id INT NOT NULL AUTO_INCREMENT, + incident_description TEXT, + report_date DATE, + PRIMARY KEY (report_id) +); + +-- 100. Security Incidents +CREATE TABLE SecurityIncidents ( + incident_id INT NOT NULL AUTO_INCREMENT, + incident_description TEXT, + incident_date DATE, + PRIMARY KEY (incident_id) +); + +-- 1. Students +CREATE TABLE Students ( + student_id INT NOT NULL AUTO_INCREMENT, + first_name VARCHAR(50) NOT NULL, + last_name VARCHAR(50) NOT NULL, + email VARCHAR(100) UNIQUE NOT NULL, + date_of_birth DATE, + enrollment_date DATE, + PRIMARY KEY (student_id) +); + +-- 2. Courses +CREATE TABLE Courses ( + course_id INT NOT NULL AUTO_INCREMENT, + course_name VARCHAR(100) NOT NULL, + course_description TEXT, + credits INT NOT NULL, + PRIMARY KEY (course_id) +); + +-- 3. Instructors +CREATE TABLE Instructors ( + instructor_id INT NOT NULL AUTO_INCREMENT, + first_name VARCHAR(50) NOT NULL, + last_name VARCHAR(50) NOT NULL, + email VARCHAR(100) UNIQUE NOT NULL, + hire_date DATE, + PRIMARY KEY (instructor_id) +); + +-- 4. Dept +CREATE TABLE Dept ( + department_id INT NOT NULL AUTO_INCREMENT, + department_name VARCHAR(100) NOT NULL, + PRIMARY KEY (department_id) +); + +-- 5. Enrollments +CREATE TABLE Enrollments ( + enrollment_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + course_id INT NOT NULL, + enrollment_date DATE, + grade FLOAT, + PRIMARY KEY (enrollment_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) ON DELETE CASCADE, + FOREIGN KEY (course_id) REFERENCES Courses(course_id) ON DELETE CASCADE +); + +-- 6. Classes +CREATE TABLE Classes ( + class_id INT NOT NULL AUTO_INCREMENT, + course_id INT NOT NULL, + instructor_id INT NOT NULL, + semester VARCHAR(20), + year INT, + PRIMARY KEY (class_id), + FOREIGN KEY (course_id) REFERENCES Courses(course_id), + FOREIGN KEY (instructor_id) REFERENCES Instructors(instructor_id) +); + +-- 7. Assignments +CREATE TABLE Assignments ( + assignment_id INT NOT NULL AUTO_INCREMENT, + class_id INT NOT NULL, + assignment_title VARCHAR(100) NOT NULL, + due_date DATE, + PRIMARY KEY (assignment_id), + FOREIGN KEY (class_id) REFERENCES Classes(class_id) +); + +-- 8. Grades +CREATE TABLE Grades ( + grade_id INT NOT NULL AUTO_INCREMENT, + enrollment_id INT NOT NULL, + assignment_id INT NOT NULL, + score FLOAT, + PRIMARY KEY (grade_id), + FOREIGN KEY (enrollment_id) REFERENCES Enrollments(enrollment_id), + FOREIGN KEY (assignment_id) REFERENCES Assignments(assignment_id) +); + +-- 9. AttendanceVT +CREATE TABLE AttendanceVT ( + AttendanceVT_id INT NOT NULL AUTO_INCREMENT, + class_id INT NOT NULL, + student_id INT NOT NULL, + AttendanceVT_date DATE, + status ENUM('Present', 'Absent') NOT NULL, + PRIMARY KEY (AttendanceVT_id), + FOREIGN KEY (class_id) REFERENCES Classes(class_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 10. Extracurricular Activities +CREATE TABLE Extracurriculars ( + activity_id INT NOT NULL AUTO_INCREMENT, + activity_name VARCHAR(100) NOT NULL, + description TEXT, + PRIMARY KEY (activity_id) +); + +-- 11. Student Activities +CREATE TABLE StudentActivities ( + student_activity_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + activity_id INT NOT NULL, + position VARCHAR(50), + PRIMARY KEY (student_activity_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (activity_id) REFERENCES Extracurriculars(activity_id) +); + +-- 12. Course Prerequisites +CREATE TABLE CoursePrerequisites ( + course_id INT NOT NULL, + prerequisite_course_id INT NOT NULL, + PRIMARY KEY (course_id, prerequisite_course_id), + FOREIGN KEY (course_id) REFERENCES Courses(course_id), + FOREIGN KEY (prerequisite_course_id) REFERENCES Courses(course_id) +); + +-- 13. Course Materials +CREATE TABLE CourseMaterials ( + material_id INT NOT NULL AUTO_INCREMENT, + course_id INT NOT NULL, + material_type ENUM('Textbook', 'Article', 'Video', 'Other') NOT NULL, + material_link VARCHAR(255), + PRIMARY KEY (material_id), + FOREIGN KEY (course_id) REFERENCES Courses(course_id) +); + +-- 14. VTEvents +CREATE TABLE VTEvents ( + event_id INT NOT NULL AUTO_INCREMENT, + event_name VARCHAR(100) NOT NULL, + event_date DATE, + location VARCHAR(255), + PRIMARY KEY (event_id) +); + +-- 15. Event Participation +CREATE TABLE EventParticipation ( + participation_id INT NOT NULL AUTO_INCREMENT, + event_id INT NOT NULL, + student_id INT NOT NULL, + PRIMARY KEY (participation_id), + FOREIGN KEY (event_id) REFERENCES VTEvents(event_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 16. Library +CREATE TABLE Library ( + book_id INT NOT NULL AUTO_INCREMENT, + title VARCHAR(255) NOT NULL, + author VARCHAR(100), + published_year INT, + available_copies INT, + PRIMARY KEY (book_id) +); + +-- 17. Book Loans +CREATE TABLE BookLoans ( + loan_id INT NOT NULL AUTO_INCREMENT, + book_id INT NOT NULL, + student_id INT NOT NULL, + loan_date DATE, + return_date DATE, + PRIMARY KEY (loan_id), + FOREIGN KEY (book_id) REFERENCES Library(book_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 18. Scholarships +CREATE TABLE Scholarships ( + scholarship_id INT NOT NULL AUTO_INCREMENT, + scholarship_name VARCHAR(100) NOT NULL, + amount DECIMAL(10, 2) NOT NULL, + eligibility_criteria TEXT, + PRIMARY KEY (scholarship_id) +); + +-- 19. Student Scholarships +CREATE TABLE StudentScholarships ( + student_scholarship_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + scholarship_id INT NOT NULL, + awarded_date DATE, + PRIMARY KEY (student_scholarship_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (scholarship_id) REFERENCES Scholarships(scholarship_id) +); + +-- 20. Financial Aid +CREATE TABLE FinancialAidEdu ( + aid_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + aid_amount DECIMAL(10, 2), + aid_type ENUM('Grant', 'Loan', 'Work-Study') NOT NULL, + awarded_date DATE, + PRIMARY KEY (aid_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 21. Tuition Fees +CREATE TABLE TuitionFees ( + fee_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + amount DECIMAL(10, 2) NOT NULL, + due_date DATE, + paid_date DATE, + PRIMARY KEY (fee_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 22. Staff +CREATE TABLE Staff ( + staff_id INT NOT NULL AUTO_INCREMENT, + first_name VARCHAR(50) NOT NULL, + last_name VARCHAR(50) NOT NULL, + email VARCHAR(100) UNIQUE NOT NULL, + hire_date DATE, + PRIMARY KEY (staff_id) +); + +-- 23. Staff Roles +CREATE TABLE StaffRoles ( + role_id INT NOT NULL AUTO_INCREMENT, + role_name VARCHAR(100) NOT NULL, + PRIMARY KEY (role_id) +); + +-- 24. Staff Assignments +CREATE TABLE StaffAssignments ( + assignment_id INT NOT NULL AUTO_INCREMENT, + staff_id INT NOT NULL, + role_id INT NOT NULL, + assigned_date DATE, + PRIMARY KEY (assignment_id), + FOREIGN KEY (staff_id) REFERENCES Staff(staff_id), + FOREIGN KEY (role_id) REFERENCES StaffRoles(role_id) +); + +-- 25. Feedback2 +CREATE TABLE Feedback2 ( + feedback_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + feedback_text TEXT, + feedback_date DATE, + PRIMARY KEY (feedback_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 26. Course Feedback2 +CREATE TABLE CourseFeedback ( + course_feedback_id INT NOT NULL AUTO_INCREMENT, + course_id INT NOT NULL, + student_id INT NOT NULL, + feedback_text TEXT, + feedback_date DATE, + PRIMARY KEY (course_feedback_id), + FOREIGN KEY (course_id) REFERENCES Courses(course_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 27. Study Groups +CREATE TABLE StudyGroups ( + group_id INT NOT NULL AUTO_INCREMENT, + group_name VARCHAR(100) NOT NULL, + created_date DATE, + PRIMARY KEY (group_id) +); + +-- 28. Group Members +CREATE TABLE GroupMembers ( + group_member_id INT NOT NULL AUTO_INCREMENT, + group_id INT NOT NULL, + student_id INT NOT NULL, + PRIMARY KEY (group_member_id), + FOREIGN KEY (group_id) REFERENCES StudyGroups(group_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 29. Tutoring Sessions +CREATE TABLE TutoringSessions ( + session_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + student_id INT NOT NULL, + session_date DATE, + session_time TIME, + PRIMARY KEY (session_id), + FOREIGN KEY (tutor_id) REFERENCES Instructors(instructor_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 30. Faculty Meetings +CREATE TABLE FacultyMeetings ( + meeting_id INT NOT NULL AUTO_INCREMENT, + meeting_date DATE, + agenda TEXT, + PRIMARY KEY (meeting_id) +); + +-- 31. Meeting AttendanceVT +CREATE TABLE MeetingAttendanceVT ( + AttendanceVT_id INT NOT NULL AUTO_INCREMENT, + meeting_id INT NOT NULL, + instructor_id INT NOT NULL, + PRIMARY KEY (AttendanceVT_id), + FOREIGN KEY (meeting_id) REFERENCES FacultyMeetings(meeting_id), + FOREIGN KEY (instructor_id) REFERENCES Instructors(instructor_id) +); + +-- 32. Scholarships Offered +CREATE TABLE ScholarshipsOffered ( + scholarship_offered_id INT NOT NULL AUTO_INCREMENT, + scholarship_id INT NOT NULL, + department_id INT NOT NULL, + PRIMARY KEY (scholarship_offered_id), + FOREIGN KEY (scholarship_id) REFERENCES Scholarships(scholarship_id), + FOREIGN KEY (department_id) REFERENCES Dept(department_id) +); + +-- 33. Internship Opportunities +CREATE TABLE Internships ( + internship_id INT NOT NULL AUTO_INCREMENT, + company_name VARCHAR(100) NOT NULL, + position VARCHAR(100) NOT NULL, + application_deadline DATE, + PRIMARY KEY (internship_id) +); + +-- 34. Student Internships +CREATE TABLE StudentInternships ( + student_internship_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + internship_id INT NOT NULL, + PRIMARY KEY (student_internship_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (internship_id) REFERENCES Internships(internship_id) +); + +-- 35. VTEvents Coordination +CREATE TABLE EventCoordinationTwo ( + coordination_id INT NOT NULL AUTO_INCREMENT, + event_id INT NOT NULL, + staff_id INT NOT NULL, + PRIMARY KEY (coordination_id), + FOREIGN KEY (event_id) REFERENCES VTEvents(event_id), + FOREIGN KEY (staff_id) REFERENCES Staff(staff_id) +); + +-- 36. Awards +CREATE TABLE Awards ( + award_id INT NOT NULL AUTO_INCREMENT, + award_name VARCHAR(100) NOT NULL, + description TEXT, + PRIMARY KEY (award_id) +); + +-- 37. Student Awards +CREATE TABLE StudentAwards ( + student_award_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + award_id INT NOT NULL, + awarded_date DATE, + PRIMARY KEY (student_award_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (award_id) REFERENCES Awards(award_id) +); + +-- 38. Research Projects +CREATE TABLE ResearchProjects ( + project_id INT NOT NULL AUTO_INCREMENT, + project_title VARCHAR(100) NOT NULL, + faculty_id INT NOT NULL, + description TEXT, + PRIMARY KEY (project_id), + FOREIGN KEY (faculty_id) REFERENCES Instructors(instructor_id) +); + +-- 39. Project Participants +CREATE TABLE ProjectParticipants ( + participant_id INT NOT NULL AUTO_INCREMENT, + project_id INT NOT NULL, + student_id INT NOT NULL, + PRIMARY KEY (participant_id), + FOREIGN KEY (project_id) REFERENCES ResearchProjects(project_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 40. Course Schedules +CREATE TABLE CourseSchedules ( + schedule_id INT NOT NULL AUTO_INCREMENT, + course_id INT NOT NULL, + class_id INT NOT NULL, + schedule_date DATE, + start_time TIME, + end_time TIME, + PRIMARY KEY (schedule_id), + FOREIGN KEY (course_id) REFERENCES Courses(course_id), + FOREIGN KEY (class_id) REFERENCES Classes(class_id) +); + +-- 41. Classroom Resources +CREATE TABLE ClassroomResources ( + resource_id INT NOT NULL AUTO_INCREMENT, + class_id INT NOT NULL, + resource_type VARCHAR(100), + resource_description TEXT, + PRIMARY KEY (resource_id), + FOREIGN KEY (class_id) REFERENCES Classes(class_id) +); + +-- 42. Academic Calendar +CREATE TABLE AcademicCalendar ( + year INT NOT NULL, + semester VARCHAR(20) NOT NULL, + start_date DATE, + end_date DATE, + PRIMARY KEY (year, semester) +); + +-- 43. Academic Policies +CREATE TABLE AcademicPolicies ( + policy_id INT NOT NULL AUTO_INCREMENT, + policy_title VARCHAR(100) NOT NULL, + description TEXT, + PRIMARY KEY (policy_id) +); + +-- 44. Policy Updates +CREATE TABLE PolicyUpdates ( + update_id INT NOT NULL AUTO_INCREMENT, + policy_id INT NOT NULL, + update_date DATE, + PRIMARY KEY (update_id), + FOREIGN KEY (policy_id) REFERENCES AcademicPolicies(policy_id) +); + +-- 45. Notify +CREATE TABLE Notify ( + notification_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + message TEXT, + notification_date DATE, + PRIMARY KEY (notification_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 46. Parent Information +CREATE TABLE Parents ( + parent_id INT NOT NULL AUTO_INCREMENT, + first_name VARCHAR(50), + last_name VARCHAR(50), + email VARCHAR(100) UNIQUE, + phone VARCHAR(15), + PRIMARY KEY (parent_id) +); + +-- 47. Student Parents +CREATE TABLE StudentParents ( + student_parent_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + parent_id INT NOT NULL, + PRIMARY KEY (student_parent_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (parent_id) REFERENCES Parents(parent_id) +); + +-- 48. Health Records +CREATE TABLE HealthRecords ( + record_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + record_date DATE, + details TEXT, + PRIMARY KEY (record_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 49. Student Rights +CREATE TABLE StudentRights ( + right_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + description TEXT, + PRIMARY KEY (right_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 50. Counseling Sessions +CREATE TABLE CounselingSessions ( + session_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + counselor_id INT NOT NULL, + session_date DATE, + notes TEXT, + PRIMARY KEY (session_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (counselor_id) REFERENCES Instructors(instructor_id) +); + +-- Additional tables can continue in a similar manner to reach 100. +-- Here are more examples to fill up to 100 tables. + +-- 51. Academic Advising +CREATE TABLE AcademicAdvising ( + advising_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + advisor_id INT NOT NULL, + advising_date DATE, + PRIMARY KEY (advising_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (advisor_id) REFERENCES Instructors(instructor_id) +); + +-- 52. Course Evaluations +CREATE TABLE CourseEvaluations ( + evaluation_id INT NOT NULL AUTO_INCREMENT, + course_id INT NOT NULL, + student_id INT NOT NULL, + rating INT CHECK (rating BETWEEN 1 AND 5), + comments TEXT, + PRIMARY KEY (evaluation_id), + FOREIGN KEY (course_id) REFERENCES Courses(course_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 53. Academic Honors +CREATE TABLE AcademicHonors ( + honor_id INT NOT NULL AUTO_INCREMENT, + honor_name VARCHAR(100) NOT NULL, + criteria TEXT, + PRIMARY KEY (honor_id) +); + +-- 54. Student Honors +CREATE TABLE StudentHonors ( + student_honor_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + honor_id INT NOT NULL, + awarded_date DATE, + PRIMARY KEY (student_honor_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (honor_id) REFERENCES AcademicHonors(honor_id) +); + +-- 55. Learning Management System Accounts +CREATE TABLE LMSAccounts ( + lms_account_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + username VARCHAR(50) NOT NULL, + password_hash VARCHAR(255) NOT NULL, + PRIMARY KEY (lms_account_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 56. Discussion Boards +CREATE TABLE DiscussionBoards ( + board_id INT NOT NULL AUTO_INCREMENT, + course_id INT NOT NULL, + title VARCHAR(100) NOT NULL, + created_date DATE, + PRIMARY KEY (board_id), + FOREIGN KEY (course_id) REFERENCES Courses(course_id) +); + +-- 57. Discussion Posts +CREATE TABLE DiscussionPosts ( + post_id INT NOT NULL AUTO_INCREMENT, + board_id INT NOT NULL, + student_id INT NOT NULL, + content TEXT, + post_date DATE, + PRIMARY KEY (post_id), + FOREIGN KEY (board_id) REFERENCES DiscussionBoards(board_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 58. Course Forums +CREATE TABLE CourseForums ( + forum_id INT NOT NULL AUTO_INCREMENT, + course_id INT NOT NULL, + title VARCHAR(100) NOT NULL, + created_date DATE, + PRIMARY KEY (forum_id), + FOREIGN KEY (course_id) REFERENCES Courses(course_id) +); + +-- 59. Forum Responses +CREATE TABLE ForumResponses ( + response_id INT NOT NULL AUTO_INCREMENT, + forum_id INT NOT NULL, + student_id INT NOT NULL, + content TEXT, + response_date DATE, + PRIMARY KEY (response_id), + FOREIGN KEY (forum_id) REFERENCES CourseForums(forum_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 60. Online Resources +CREATE TABLE OnlineResources ( + resource_id INT NOT NULL AUTO_INCREMENT, + course_id INT NOT NULL, + resource_link VARCHAR(255), + PRIMARY KEY (resource_id), + FOREIGN KEY (course_id) REFERENCES Courses(course_id) +); + +-- 61. Laboratory Equipment +CREATE TABLE LaboratoryEquipment ( + equipment_id INT NOT NULL AUTO_INCREMENT, + equipment_name VARCHAR(100) NOT NULL, + equipment_description TEXT, + available_units INT, + PRIMARY KEY (equipment_id) +); + +-- 62. Lab Reservations +CREATE TABLE LabReservations ( + reservation_id INT NOT NULL AUTO_INCREMENT, + equipment_id INT NOT NULL, + student_id INT NOT NULL, + reservation_date DATE, + PRIMARY KEY (reservation_id), + FOREIGN KEY (equipment_id) REFERENCES LaboratoryEquipment(equipment_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 63. Course Announcements +CREATE TABLE CourseAnnouncements ( + announcement_id INT NOT NULL AUTO_INCREMENT, + course_id INT NOT NULL, + announcement_text TEXT, + announcement_date DATE, + PRIMARY KEY (announcement_id), + FOREIGN KEY (course_id) REFERENCES Courses(course_id) +); + +-- 64. Course Subscriptions +CREATE TABLE CourseSubscriptions ( + subscription_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + course_id INT NOT NULL, + subscription_date DATE, + PRIMARY KEY (subscription_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (course_id) REFERENCES Courses(course_id) +); + +-- 65. Volunteer Opportunities +CREATE TABLE VolunteerOpportunities ( + opportunity_id INT NOT NULL AUTO_INCREMENT, + opportunity_title VARCHAR(100) NOT NULL, + description TEXT, + PRIMARY KEY (opportunity_id) +); + +-- 66. Student Volunteers +CREATE TABLE StudentVolunteers ( + student_volunteer_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + opportunity_id INT NOT NULL, + PRIMARY KEY (student_volunteer_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (opportunity_id) REFERENCES VolunteerOpportunities(opportunity_id) +); + +-- 67. Facility Reservations +CREATE TABLE FacilityReservations ( + reservation_id INT NOT NULL AUTO_INCREMENT, + facility_name VARCHAR(100) NOT NULL, + reserved_by INT NOT NULL, + reservation_date DATE, + PRIMARY KEY (reservation_id), + FOREIGN KEY (reserved_by) REFERENCES Staff(staff_id) +); + +-- 68. Conference Participation +CREATE TABLE ConferenceParticipation ( + participation_id INT NOT NULL AUTO_INCREMENT, + conference_name VARCHAR(100) NOT NULL, + student_id INT NOT NULL, + date_of_conference DATE, + PRIMARY KEY (participation_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 69. International Students +CREATE TABLE InternationalStudents ( + international_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + country_of_origin VARCHAR(100), + visa_status VARCHAR(100), + PRIMARY KEY (international_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 70. Mentor-Mentee Relationships +CREATE TABLE MentorMentee ( + relationship_id INT NOT NULL AUTO_INCREMENT, + mentor_id INT NOT NULL, + mentee_id INT NOT NULL, + start_date DATE, + PRIMARY KEY (relationship_id), + FOREIGN KEY (mentor_id) REFERENCES Instructors(instructor_id), + FOREIGN KEY (mentee_id) REFERENCES Students(student_id) +); + +-- 71. Career Services +CREATE TABLE CareerServices ( + service_id INT NOT NULL AUTO_INCREMENT, + service_name VARCHAR(100) NOT NULL, + description TEXT, + PRIMARY KEY (service_id) +); + +-- 72. Career Appointments +CREATE TABLE CareerAppointments ( + appointment_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + service_id INT NOT NULL, + appointment_date DATE, + PRIMARY KEY (appointment_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (service_id) REFERENCES CareerServices(service_id) +); + +-- 73. Alumni +CREATE TABLE Alumni ( + alumni_id INT NOT NULL AUTO_INCREMENT, + first_name VARCHAR(50) NOT NULL, + last_name VARCHAR(50) NOT NULL, + graduation_year INT, + PRIMARY KEY (alumni_id) +); + +-- 74. Alumni Activities +CREATE TABLE AlumniActivities ( + activity_id INT NOT NULL AUTO_INCREMENT, + alumni_id INT NOT NULL, + activity_name VARCHAR(100), + activity_date DATE, + PRIMARY KEY (activity_id), + FOREIGN KEY (alumni_id) REFERENCES Alumni(alumni_id) +); + +-- 75. Campus Facilities +CREATE TABLE CampusFacilities ( + facility_id INT NOT NULL AUTO_INCREMENT, + facility_name VARCHAR(100) NOT NULL, + facility_description TEXT, + PRIMARY KEY (facility_id) +); + +-- 76. Facility Usage +CREATE TABLE FacilityUsage ( + usage_id INT NOT NULL AUTO_INCREMENT, + facility_id INT NOT NULL, + usage_date DATE, + PRIMARY KEY (usage_id), + FOREIGN KEY (facility_id) REFERENCES CampusFacilities(facility_id) +); + +-- 77. Campus VTEvents +CREATE TABLE CampusVTEvents ( + campus_event_id INT NOT NULL AUTO_INCREMENT, + event_name VARCHAR(100) NOT NULL, + event_date DATE, + PRIMARY KEY (campus_event_id) +); + +-- 78. Campus Organizations +CREATE TABLE CampusOrganizations ( + organization_id INT NOT NULL AUTO_INCREMENT, + organization_name VARCHAR(100) NOT NULL, + description TEXT, + PRIMARY KEY (organization_id) +); + +-- 79. Organization Membership +CREATE TABLE OrganizationMembership ( + membership_id INT NOT NULL AUTO_INCREMENT, + organization_id INT NOT NULL, + student_id INT NOT NULL, + PRIMARY KEY (membership_id), + FOREIGN KEY (organization_id) REFERENCES CampusOrganizations(organization_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 80. Campus Surveys +CREATE TABLE CampusSurveys ( + survey_id INT NOT NULL AUTO_INCREMENT, + survey_name VARCHAR(100) NOT NULL, + created_date DATE, + PRIMARY KEY (survey_id) +); + +-- 81. Survey Responses +CREATE TABLE SurveyResponsesEdu ( + response_id INT NOT NULL AUTO_INCREMENT, + survey_id INT NOT NULL, + student_id INT NOT NULL, + response_text TEXT, + PRIMARY KEY (response_id), + FOREIGN KEY (survey_id) REFERENCES CampusSurveys(survey_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 82. Social Media Engagement +CREATE TABLE SocialMediaEngagement ( + engagement_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + platform VARCHAR(100) NOT NULL, + engagement_date DATE, + PRIMARY KEY (engagement_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 83. Transportation Services +CREATE TABLE TransportationServices ( + transport_service_id INT NOT NULL AUTO_INCREMENT, + service_name VARCHAR(100) NOT NULL, + description TEXT, + PRIMARY KEY (transport_service_id) +); + +-- 84. Transportation Usage +CREATE TABLE TransportationUsage ( + usage_id INT NOT NULL AUTO_INCREMENT, + transport_service_id INT NOT NULL, + student_id INT NOT NULL, + usage_date DATE, + PRIMARY KEY (usage_id), + FOREIGN KEY (transport_service_id) REFERENCES TransportationServices(transport_service_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 85. Community Service +CREATE TABLE CommunityService ( + service_id INT NOT NULL AUTO_INCREMENT, + service_name VARCHAR(100) NOT NULL, + description TEXT, + PRIMARY KEY (service_id) +); + +-- 86. Student Community Service +CREATE TABLE StudentCommunityService ( + student_service_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + service_id INT NOT NULL, + PRIMARY KEY (student_service_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (service_id) REFERENCES CommunityService(service_id) +); + +-- 87. Student Health Services +CREATE TABLE StudentHealthServices ( + health_service_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + service_name VARCHAR(100) NOT NULL, + visit_date DATE, + PRIMARY KEY (health_service_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 88. Counseling Services +CREATE TABLE CounselingServices ( + counseling_service_id INT NOT NULL AUTO_INCREMENT, + service_name VARCHAR(100) NOT NULL, + description TEXT, + PRIMARY KEY (counseling_service_id) +); + +-- 89. Student Counseling Services +CREATE TABLE StudentCounselingServices ( + student_counseling_service_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + counseling_service_id INT NOT NULL, + PRIMARY KEY (student_counseling_service_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (counseling_service_id) REFERENCES CounselingServices(counseling_service_id) +); + +-- 90. Student Financial Services +CREATE TABLE StudentFinancialServices ( + financial_service_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + service_name VARCHAR(100) NOT NULL, + visit_date DATE, + PRIMARY KEY (financial_service_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 91. Academic Resources +CREATE TABLE AcademicResources ( + resource_id INT NOT NULL AUTO_INCREMENT, + resource_name VARCHAR(100) NOT NULL, + resource_description TEXT, + PRIMARY KEY (resource_id) +); + +-- 92. Student Resource Usage +CREATE TABLE StudentResourceUsage ( + usage_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + resource_id INT NOT NULL, + usage_date DATE, + PRIMARY KEY (usage_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (resource_id) REFERENCES AcademicResources(resource_id) +); + +-- 93. Course Libraries +CREATE TABLE CourseLibraries ( + library_id INT NOT NULL AUTO_INCREMENT, + course_id INT NOT NULL, + resource_id INT NOT NULL, + PRIMARY KEY (library_id), + FOREIGN KEY (course_id) REFERENCES Courses(course_id), + FOREIGN KEY (resource_id) REFERENCES AcademicResources(resource_id) +); + +-- 94. Academic Integrity Policies +CREATE TABLE AcademicIntegrityPolicies ( + policy_id INT NOT NULL AUTO_INCREMENT, + policy_name VARCHAR(100) NOT NULL, + description TEXT, + PRIMARY KEY (policy_id) +); + +-- 95. Integrity Violations +CREATE TABLE IntegrityViolations ( + violation_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + policy_id INT NOT NULL, + violation_date DATE, + PRIMARY KEY (violation_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id), + FOREIGN KEY (policy_id) REFERENCES AcademicIntegrityPolicies(policy_id) +); + +-- 96. Financial Aid +CREATE TABLE FinancialAidEduTwo ( + aid_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + aid_amount DECIMAL(10, 2), + aid_date DATE, + PRIMARY KEY (aid_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 97. Student Job Opportunities +CREATE TABLE StudentJobOpportunities ( + job_opportunity_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + job_title VARCHAR(100), + application_date DATE, + PRIMARY KEY (job_opportunity_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 98. Campus News +CREATE TABLE CampusNews ( + news_id INT NOT NULL AUTO_INCREMENT, + title VARCHAR(100) NOT NULL, + content TEXT, + published_date DATE, + PRIMARY KEY (news_id) +); + +-- 99. Emergency Contacts +CREATE TABLE EmergencyContacts ( + contact_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + contact_name VARCHAR(100), + contact_phone VARCHAR(15), + relationship VARCHAR(50), + PRIMARY KEY (contact_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 100. Student Feedback2 +CREATE TABLE StudentFeedback ( + feedback_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + feedback_text TEXT, + feedback_date DATE, + PRIMARY KEY (feedback_id), + FOREIGN KEY (student_id) REFERENCES Students(student_id) +); + +-- 1. Campaigns +CREATE TABLE Campaigns ( + campaign_id INT NOT NULL AUTO_INCREMENT, + campaign_name VARCHAR(100), + start_date DATE, + end_date DATE, + budget DECIMAL(10, 2), + PRIMARY KEY (campaign_id) +); + +-- 2. Campaign Channels +CREATE TABLE CampaignChannels ( + channel_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + channel_name VARCHAR(100), + PRIMARY KEY (channel_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 3. Leads +CREATE TABLE Leads ( + lead_id INT NOT NULL AUTO_INCREMENT, + first_name VARCHAR(50), + last_name VARCHAR(50), + email VARCHAR(100) UNIQUE, + phone VARCHAR(15), + source VARCHAR(100), + status ENUM('New', 'Contacted', 'Qualified', 'Converted', 'Lost'), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (lead_id) +); + +-- 4. Lead Assignments +CREATE TABLE LeadAssignments ( + assignment_id INT NOT NULL AUTO_INCREMENT, + lead_id INT NOT NULL, + user_id INT NOT NULL, + assigned_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (assignment_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id), + FOREIGN KEY (user_id) REFERENCES Users(user_id) +); + +-- 5. Contacts +CREATE TABLE Contacts ( + contact_id INT NOT NULL AUTO_INCREMENT, + lead_id INT NOT NULL, + contact_method VARCHAR(50), + contact_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + notes TEXT, + PRIMARY KEY (contact_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 6. Opportunities +CREATE TABLE Opportunities ( + opportunity_id INT NOT NULL AUTO_INCREMENT, + lead_id INT NOT NULL, + opportunity_value DECIMAL(10, 2), + close_date DATE, + stage ENUM('Prospecting', 'Negotiation', 'Closed Won', 'Closed Lost'), + PRIMARY KEY (opportunity_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 7. Marketing Materials +CREATE TABLE MarketingMaterials ( + material_id INT NOT NULL AUTO_INCREMENT, + material_type VARCHAR(100), + title VARCHAR(100), + content TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (material_id) +); + +-- 8. Material Usage +CREATE TABLE MaterialUsage ( + usage_id INT NOT NULL AUTO_INCREMENT, + material_id INT NOT NULL, + campaign_id INT NOT NULL, + PRIMARY KEY (usage_id), + FOREIGN KEY (material_id) REFERENCES MarketingMaterials(material_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 9. Email Campaigns +CREATE TABLE EmailCampaigns ( + email_campaign_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + subject VARCHAR(100), + body TEXT, + sent_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (email_campaign_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 10. Email Opens +CREATE TABLE EmailOpens ( + open_id INT NOT NULL AUTO_INCREMENT, + email_campaign_id INT NOT NULL, + lead_id INT NOT NULL, + opened_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (open_id), + FOREIGN KEY (email_campaign_id) REFERENCES EmailCampaigns(email_campaign_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 11. Email Clicks +CREATE TABLE EmailClicks ( + click_id INT NOT NULL AUTO_INCREMENT, + email_campaign_id INT NOT NULL, + lead_id INT NOT NULL, + clicked_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (click_id), + FOREIGN KEY (email_campaign_id) REFERENCES EmailCampaigns(email_campaign_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 12. Social Media Campaigns +CREATE TABLE SocialMediaCampaigns ( + sm_campaign_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + platform VARCHAR(100), + post_content TEXT, + scheduled_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (sm_campaign_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 13. Social Media Engagements +CREATE TABLE SocialMediaEngagements ( + engagement_id INT NOT NULL AUTO_INCREMENT, + sm_campaign_id INT NOT NULL, + engagement_type ENUM('Like', 'Share', 'Comment'), + engagement_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (engagement_id), + FOREIGN KEY (sm_campaign_id) REFERENCES SocialMediaCampaigns(sm_campaign_id) +); + +-- 14. Surveys +CREATE TABLE Surveys ( + survey_id INT NOT NULL AUTO_INCREMENT, + survey_title VARCHAR(100), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (survey_id) +); + +-- 15. Survey Questions +CREATE TABLE SurveyQuestions ( + question_id INT NOT NULL AUTO_INCREMENT, + survey_id INT NOT NULL, + question_text TEXT, + question_type ENUM('Multiple Choice', 'Open-Ended'), + PRIMARY KEY (question_id), + FOREIGN KEY (survey_id) REFERENCES Surveys(survey_id) +); + +-- 16. Survey Responses +CREATE TABLE MarkSurveyResponses ( + response_id INT NOT NULL AUTO_INCREMENT, + question_id INT NOT NULL, + lead_id INT NOT NULL, + response_text TEXT, + submitted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (response_id), + FOREIGN KEY (question_id) REFERENCES SurveyQuestions(question_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 17. Market Research +CREATE TABLE MarkMarketResearch ( + research_id INT NOT NULL AUTO_INCREMENT, + research_topic VARCHAR(100), + findings TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (research_id) +); + +-- 18. Competitor Analysis +CREATE TABLE CompetitorAnalysis ( + analysis_id INT NOT NULL AUTO_INCREMENT, + competitor_name VARCHAR(100), + strengths TEXT, + weaknesses TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (analysis_id) +); + +-- 19. User Personas +CREATE TABLE UserPersonas ( + persona_id INT NOT NULL AUTO_INCREMENT, + persona_name VARCHAR(100), + demographics TEXT, + behaviors TEXT, + primary_goal TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (persona_id) +); + +-- 20. Brand Guidelines +CREATE TABLE BrandGuidelines ( + guideline_id INT NOT NULL AUTO_INCREMENT, + guideline_name VARCHAR(100), + content TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (guideline_id) +); + +-- 21. Marketing Budgets +CREATE TABLE MarketingBudgets ( + budget_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + allocated_amount DECIMAL(10, 2), + spent_amount DECIMAL(10, 2) DEFAULT 0, + PRIMARY KEY (budget_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 22. Partnerships +CREATE TABLE Partnerships ( + partnership_id INT NOT NULL AUTO_INCREMENT, + partner_name VARCHAR(100), + partnership_type VARCHAR(100), + start_date DATE, + end_date DATE, + PRIMARY KEY (partnership_id) +); + +-- 23. Partnership Activities +CREATE TABLE PartnershipActivities ( + activity_id INT NOT NULL AUTO_INCREMENT, + partnership_id INT NOT NULL, + activity_description TEXT, + activity_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (activity_id), + FOREIGN KEY (partnership_id) REFERENCES Partnerships(partnership_id) +); + +-- 24. Affiliate Programs +CREATE TABLE AffiliatePrograms ( + program_id INT NOT NULL AUTO_INCREMENT, + program_name VARCHAR(100), + commission_rate DECIMAL(5, 2), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (program_id) +); + +-- 25. Affiliates +CREATE TABLE Affiliates ( + affiliate_id INT NOT NULL AUTO_INCREMENT, + program_id INT NOT NULL, + affiliate_name VARCHAR(100), + contact_email VARCHAR(100) UNIQUE, + PRIMARY KEY (affiliate_id), + FOREIGN KEY (program_id) REFERENCES AffiliatePrograms(program_id) +); + +-- 26. Affiliate Sales +CREATE TABLE AffiliateSales ( + sale_id INT NOT NULL AUTO_INCREMENT, + affiliate_id INT NOT NULL, + lead_id INT NOT NULL, + sale_value DECIMAL(10, 2), + sale_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (sale_id), + FOREIGN KEY (affiliate_id) REFERENCES Affiliates(affiliate_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 27. Event Marketing +CREATE TABLE EventMarketing ( + event_id INT NOT NULL AUTO_INCREMENT, + event_name VARCHAR(100), + event_date DATE, + location VARCHAR(100), + description TEXT, + PRIMARY KEY (event_id) +); + +-- 28. Event Attendees +CREATE TABLE EventAttendees ( + attendee_id INT NOT NULL AUTO_INCREMENT, + event_id INT NOT NULL, + lead_id INT NOT NULL, + registered_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (attendee_id), + FOREIGN KEY (event_id) REFERENCES EventMarketing(event_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 29. Webinars +CREATE TABLE Webinars ( + webinar_id INT NOT NULL AUTO_INCREMENT, + title VARCHAR(100), + scheduled_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (webinar_id) +); + +-- 30. Webinar Registrations +CREATE TABLE WebinarRegistrations ( + registration_id INT NOT NULL AUTO_INCREMENT, + webinar_id INT NOT NULL, + lead_id INT NOT NULL, + registered_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (registration_id), + FOREIGN KEY (webinar_id) REFERENCES Webinars(webinar_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 31. Marketing Automation +CREATE TABLE MarketingAutomation ( + automation_id INT NOT NULL AUTO_INCREMENT, + name VARCHAR(100), + trigger_event VARCHAR(100), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (automation_id) +); + +-- 32. Automation Actions +CREATE TABLE AutomationActions ( + action_id INT NOT NULL AUTO_INCREMENT, + automation_id INT NOT NULL, + action_type VARCHAR(100), + action_details TEXT, + PRIMARY KEY (action_id), + FOREIGN KEY (automation_id) REFERENCES MarketingAutomation(automation_id) +); + +-- 33. Ad Campaigns +CREATE TABLE AdCampaigns ( + ad_campaign_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + ad_platform VARCHAR(100), + ad_content TEXT, + budget DECIMAL(10, 2), + start_date DATE, + end_date DATE, + PRIMARY KEY (ad_campaign_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 34. Ad Performance +CREATE TABLE AdPerformance ( + performance_id INT NOT NULL AUTO_INCREMENT, + ad_campaign_id INT NOT NULL, + impressions INT, + clicks INT, + conversions INT, + cost DECIMAL(10, 2), + PRIMARY KEY (performance_id), + FOREIGN KEY (ad_campaign_id) REFERENCES AdCampaigns(ad_campaign_id) +); + +-- 35. Content Calendar +CREATE TABLE ContentCalendar ( + calendar_id INT NOT NULL AUTO_INCREMENT, + content_type VARCHAR(100), + scheduled_date DATE, + title VARCHAR(100), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (calendar_id) +); + +-- 36. Content Pieces +CREATE TABLE ContentPieces ( + piece_id INT NOT NULL AUTO_INCREMENT, + calendar_id INT NOT NULL, + content_text TEXT, + PRIMARY KEY (piece_id), + FOREIGN KEY (calendar_id) REFERENCES ContentCalendar(calendar_id) +); + +-- 37. Content Engagement +CREATE TABLE ContentEngagement ( + engagement_id INT NOT NULL AUTO_INCREMENT, + piece_id INT NOT NULL, + lead_id INT NOT NULL, + engagement_type ENUM('View', 'Share', 'Comment'), + engagement_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (engagement_id), + FOREIGN KEY (piece_id) REFERENCES ContentPieces(piece_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 38. Customer Feedback +CREATE TABLE MarkCustomerFeedback ( + feedback_id INT NOT NULL AUTO_INCREMENT, + lead_id INT NOT NULL, + feedback_text TEXT, + submitted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (feedback_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 39. Referral Programs +CREATE TABLE ReferralPrograms ( + referral_id INT NOT NULL AUTO_INCREMENT, + program_name VARCHAR(100), + reward_type VARCHAR(100), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (referral_id) +); + +-- 40. Referrals +CREATE TABLE Referrals ( + referral_id INT NOT NULL AUTO_INCREMENT, + referral_program_id INT NOT NULL, + referrer_id INT NOT NULL, + referred_lead_id INT NOT NULL, + PRIMARY KEY (referral_id), + FOREIGN KEY (referral_program_id) REFERENCES ReferralPrograms(referral_id), + FOREIGN KEY (referrer_id) REFERENCES Leads(lead_id), + FOREIGN KEY (referred_lead_id) REFERENCES Leads(lead_id) +); + +-- 41. Competitor Tracking +CREATE TABLE CompetitorTracking ( + tracking_id INT NOT NULL AUTO_INCREMENT, + competitor_name VARCHAR(100), + monitoring_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (tracking_id) +); + +-- 42. Competitor Actions +CREATE TABLE CompetitorActions ( + action_id INT NOT NULL AUTO_INCREMENT, + tracking_id INT NOT NULL, + action_description TEXT, + PRIMARY KEY (action_id), + FOREIGN KEY (tracking_id) REFERENCES CompetitorTracking(tracking_id) +); + +-- 43. Marketing Events +CREATE TABLE MarketingEvents ( + event_id INT NOT NULL AUTO_INCREMENT, + event_name VARCHAR(100), + event_type VARCHAR(100), + event_date DATE, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (event_id) +); + +-- 44. Event Feedback +CREATE TABLE EventFeedback ( + feedback_id INT NOT NULL AUTO_INCREMENT, + event_id INT NOT NULL, + lead_id INT NOT NULL, + feedback_text TEXT, + submitted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (feedback_id), + FOREIGN KEY (event_id) REFERENCES MarketingEvents(event_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 45. Promotional Codes +CREATE TABLE PromotionalCodes ( + code_id INT NOT NULL AUTO_INCREMENT, + code_value VARCHAR(50) UNIQUE, + discount DECIMAL(5, 2), + expiration_date DATE, + PRIMARY KEY (code_id) +); + +-- 46. Code Usage +CREATE TABLE CodeUsage ( + usage_id INT NOT NULL AUTO_INCREMENT, + code_id INT NOT NULL, + lead_id INT NOT NULL, + used_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (usage_id), + FOREIGN KEY (code_id) REFERENCES PromotionalCodes(code_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 47. Performance Metrics +CREATE TABLE PerformanceMetrics ( + metric_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + leads_generated INT, + conversions INT, + revenue DECIMAL(10, 2), + PRIMARY KEY (metric_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 48. ROI Analysis +CREATE TABLE ROIAnalysis ( + roi_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + investment DECIMAL(10, 2), + roi_percentage DECIMAL(5, 2), + PRIMARY KEY (roi_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 49. Budget Allocations +CREATE TABLE BudgetAllocations ( + allocation_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + allocated_amount DECIMAL(10, 2), + PRIMARY KEY (allocation_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 50. Media Spend +CREATE TABLE MediaSpend ( + spend_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + media_type VARCHAR(100), + amount DECIMAL(10, 2), + spend_date DATE, + PRIMARY KEY (spend_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 51. Target Audiences +CREATE TABLE TargetAudiences ( + audience_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + demographic_details TEXT, + PRIMARY KEY (audience_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 52. Marketing Analytics +CREATE TABLE MarketingAnalytics ( + analytics_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + analysis_date DATE, + insights TEXT, + PRIMARY KEY (analytics_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 53. Lead Sources +CREATE TABLE LeadSources ( + source_id INT NOT NULL AUTO_INCREMENT, + source_name VARCHAR(100), + PRIMARY KEY (source_id) +); + +-- 54. Source Tracking +CREATE TABLE SourceTracking ( + tracking_id INT NOT NULL AUTO_INCREMENT, + source_id INT NOT NULL, + lead_id INT NOT NULL, + tracked_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (tracking_id), + FOREIGN KEY (source_id) REFERENCES LeadSources(source_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 55. Brand Awareness +CREATE TABLE BrandAwareness ( + awareness_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + awareness_level ENUM('Low', 'Medium', 'High'), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (awareness_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 56. Brand Perception +CREATE TABLE BrandPerception ( + perception_id INT NOT NULL AUTO_INCREMENT, + lead_id INT NOT NULL, + perception_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (perception_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 57. Influencer Marketing +CREATE TABLE InfluencerMarketing ( + influencer_id INT NOT NULL AUTO_INCREMENT, + influencer_name VARCHAR(100), + platform VARCHAR(100), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (influencer_id) +); + +-- 58. Influencer Collaborations +CREATE TABLE InfluencerCollaborations ( + collaboration_id INT NOT NULL AUTO_INCREMENT, + influencer_id INT NOT NULL, + campaign_id INT NOT NULL, + terms TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (collaboration_id), + FOREIGN KEY (influencer_id) REFERENCES InfluencerMarketing(influencer_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 59. Marketing Collateral +CREATE TABLE MarketingCollateral ( + collateral_id INT NOT NULL AUTO_INCREMENT, + collateral_type VARCHAR(100), + description TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (collateral_id) +); + +-- 60. Collateral Usage +CREATE TABLE CollateralUsage ( + usage_id INT NOT NULL AUTO_INCREMENT, + collateral_id INT NOT NULL, + campaign_id INT NOT NULL, + PRIMARY KEY (usage_id), + FOREIGN KEY (collateral_id) REFERENCES MarketingCollateral(collateral_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 61. Customer Segmentation +CREATE TABLE CustomerSegmentation ( + segment_id INT NOT NULL AUTO_INCREMENT, + segment_name VARCHAR(100), + criteria TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (segment_id) +); + +-- 62. Segment Members +CREATE TABLE SegmentMembers ( + member_id INT NOT NULL AUTO_INCREMENT, + segment_id INT NOT NULL, + lead_id INT NOT NULL, + PRIMARY KEY (member_id), + FOREIGN KEY (segment_id) REFERENCES CustomerSegmentation(segment_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 63. Customer Journey +CREATE TABLE CustomerJourney ( + journey_id INT NOT NULL AUTO_INCREMENT, + lead_id INT NOT NULL, + touchpoints TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (journey_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 64. Marketing Performance +CREATE TABLE MarketingPerformance ( + performance_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + leads_generated INT, + conversions INT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (performance_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 65. Ad Spend Analysis +CREATE TABLE AdSpendAnalysis ( + analysis_id INT NOT NULL AUTO_INCREMENT, + ad_campaign_id INT NOT NULL, + total_spend DECIMAL(10, 2), + leads_generated INT, + conversions INT, + PRIMARY KEY (analysis_id), + FOREIGN KEY (ad_campaign_id) REFERENCES AdCampaigns(ad_campaign_id) +); + +-- 66. Conversion Rates +CREATE TABLE ConversionRates ( + rate_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + conversion_rate DECIMAL(5, 2), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (rate_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 67. Customer Retention +CREATE TABLE CustomerRetention ( + retention_id INT NOT NULL AUTO_INCREMENT, + lead_id INT NOT NULL, + retention_score DECIMAL(5, 2), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (retention_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 68. Churn Analysis +CREATE TABLE ChurnAnalysis ( + churn_id INT NOT NULL AUTO_INCREMENT, + lead_id INT NOT NULL, + churn_reason TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (churn_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 69. Customer Loyalty Programs +CREATE TABLE CustomerLoyaltyPrograms ( + program_id INT NOT NULL AUTO_INCREMENT, + program_name VARCHAR(100), + points_required INT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (program_id) +); + +-- 70. Loyalty Program Members +CREATE TABLE LoyaltyProgramMembers ( + member_id INT NOT NULL AUTO_INCREMENT, + program_id INT NOT NULL, + lead_id INT NOT NULL, + points_earned INT DEFAULT 0, + PRIMARY KEY (member_id), + FOREIGN KEY (program_id) REFERENCES CustomerLoyaltyPrograms(program_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 71. Loyalty Redemptions +CREATE TABLE LoyaltyRedemptions ( + redemption_id INT NOT NULL AUTO_INCREMENT, + member_id INT NOT NULL, + redeemed_points INT, + redemption_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (redemption_id), + FOREIGN KEY (member_id) REFERENCES LoyaltyProgramMembers(member_id) +); + +-- 72. Event Sponsorships +CREATE TABLE EventSponsorships ( + sponsorship_id INT NOT NULL AUTO_INCREMENT, + event_id INT NOT NULL, + sponsor_name VARCHAR(100), + sponsorship_amount DECIMAL(10, 2), + PRIMARY KEY (sponsorship_id), + FOREIGN KEY (event_id) REFERENCES EventMarketing(event_id) +); + +-- 73. Customer Success Stories +CREATE TABLE CustomerSuccessStories ( + story_id INT NOT NULL AUTO_INCREMENT, + lead_id INT NOT NULL, + success_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (story_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 74. Marketing Technology Stack +CREATE TABLE MarketingTechStack ( + tech_id INT NOT NULL AUTO_INCREMENT, + tech_name VARCHAR(100), + usage_description TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (tech_id) +); + +-- 75. Tech Stack Usage +CREATE TABLE TechStackUsage ( + usage_id INT NOT NULL AUTO_INCREMENT, + tech_id INT NOT NULL, + campaign_id INT NOT NULL, + PRIMARY KEY (usage_id), + FOREIGN KEY (tech_id) REFERENCES MarketingTechStack(tech_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 76. Social Media Analytics +CREATE TABLE SocialMediaAnalytics ( + analytics_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + platform VARCHAR(100), + metrics TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (analytics_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 77. Content Performance +CREATE TABLE ContentPerformance ( + performance_id INT NOT NULL AUTO_INCREMENT, + piece_id INT NOT NULL, + metrics TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (performance_id), + FOREIGN KEY (piece_id) REFERENCES ContentPieces(piece_id) +); + +-- 78. Lead Scoring +CREATE TABLE LeadScoring ( + score_id INT NOT NULL AUTO_INCREMENT, + lead_id INT NOT NULL, + score INT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (score_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 79. Account Based Marketing +CREATE TABLE AccountBasedMarketing ( + abm_id INT NOT NULL AUTO_INCREMENT, + account_name VARCHAR(100), + target_audience VARCHAR(100), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (abm_id) +); + +-- 80. ABM Engagements +CREATE TABLE ABMEngagements ( + engagement_id INT NOT NULL AUTO_INCREMENT, + abm_id INT NOT NULL, + lead_id INT NOT NULL, + engagement_type VARCHAR(100), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (engagement_id), + FOREIGN KEY (abm_id) REFERENCES AccountBasedMarketing(abm_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 81. Marketing KPIs +CREATE TABLE MarketingKPIs ( + kpi_id INT NOT NULL AUTO_INCREMENT, + kpi_name VARCHAR(100), + target_value DECIMAL(10, 2), + actual_value DECIMAL(10, 2), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (kpi_id) +); + +-- 82. KPI Tracking +CREATE TABLE KPITracking ( + tracking_id INT NOT NULL AUTO_INCREMENT, + kpi_id INT NOT NULL, + tracked_date DATE, + value DECIMAL(10, 2), + PRIMARY KEY (tracking_id), + FOREIGN KEY (kpi_id) REFERENCES MarketingKPIs(kpi_id) +); + +-- 83. Digital Marketing Strategy +CREATE TABLE DigitalMarketingStrategy ( + strategy_id INT NOT NULL AUTO_INCREMENT, + strategy_name VARCHAR(100), + description TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (strategy_id) +); + +-- 84. Strategy Implementation +CREATE TABLE VTStratImplement ( + implementation_id INT NOT NULL AUTO_INCREMENT, + strategy_id INT NOT NULL, + start_date DATE, + end_date DATE, + PRIMARY KEY (implementation_id), + FOREIGN KEY (strategy_id) REFERENCES DigitalMarketingStrategy(strategy_id) +); + +-- 85. Customer Acquisition +CREATE TABLE CustomerAcquisition ( + acquisition_id INT NOT NULL AUTO_INCREMENT, + lead_id INT NOT NULL, + acquisition_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (acquisition_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 86. Customer Retention Programs +CREATE TABLE CustomerRetentionPrograms ( + retention_program_id INT NOT NULL AUTO_INCREMENT, + program_name VARCHAR(100), + description TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (retention_program_id) +); + +-- 87. Retention Program Participation +CREATE TABLE RetentionProgramParticipation ( + participation_id INT NOT NULL AUTO_INCREMENT, + retention_program_id INT NOT NULL, + lead_id INT NOT NULL, + PRIMARY KEY (participation_id), + FOREIGN KEY (retention_program_id) REFERENCES CustomerRetentionPrograms(retention_program_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 88. Customer Segmentation Criteria +CREATE TABLE CustomerSegmentationCriteria ( + criteria_id INT NOT NULL AUTO_INCREMENT, + segment_id INT NOT NULL, + criteria_text TEXT, + PRIMARY KEY (criteria_id), + FOREIGN KEY (segment_id) REFERENCES CustomerSegmentation(segment_id) +); + +-- 89. Audience Insights +CREATE TABLE AudienceInsights ( + insight_id INT NOT NULL AUTO_INCREMENT, + segment_id INT NOT NULL, + insight_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (insight_id), + FOREIGN KEY (segment_id) REFERENCES CustomerSegmentation(segment_id) +); + +-- 90. Marketing Workshops +CREATE TABLE MarketingWorkshops ( + workshop_id INT NOT NULL AUTO_INCREMENT, + workshop_name VARCHAR(100), + date DATE, + description TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (workshop_id) +); + +-- 91. Workshop Registrations +CREATE TABLE WorkshopRegistrations ( + registration_id INT NOT NULL AUTO_INCREMENT, + workshop_id INT NOT NULL, + lead_id INT NOT NULL, + registered_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (registration_id), + FOREIGN KEY (workshop_id) REFERENCES MarketingWorkshops(workshop_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 92. Marketing Training +CREATE TABLE MarketingTraining ( + training_id INT NOT NULL AUTO_INCREMENT, + training_name VARCHAR(100), + training_date DATE, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (training_id) +); + +-- 93. Training Registrations +CREATE TABLE TrainingRegistrations ( + registration_id INT NOT NULL AUTO_INCREMENT, + training_id INT NOT NULL, + lead_id INT NOT NULL, + registered_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (registration_id), + FOREIGN KEY (training_id) REFERENCES MarketingTraining(training_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 94. Marketing Partnerships +CREATE TABLE MarketingPartnerships ( + partnership_id INT NOT NULL AUTO_INCREMENT, + partner_name VARCHAR(100), + collaboration_description TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (partnership_id) +); + +-- 95. Partnership Engagements +CREATE TABLE PartnershipEngagements ( + engagement_id INT NOT NULL AUTO_INCREMENT, + partnership_id INT NOT NULL, + lead_id INT NOT NULL, + engagement_type VARCHAR(100), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (engagement_id), + FOREIGN KEY (partnership_id) REFERENCES MarketingPartnerships(partnership_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 96. Marketing Research +CREATE TABLE MarketingResearch ( + research_id INT NOT NULL AUTO_INCREMENT, + topic VARCHAR(100), + findings TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (research_id) +); + +-- 97. Research Collaborations +CREATE TABLE ResearchCollaborations ( + collaboration_id INT NOT NULL AUTO_INCREMENT, + research_id INT NOT NULL, + partner_name VARCHAR(100), + PRIMARY KEY (collaboration_id), + FOREIGN KEY (research_id) REFERENCES MarketingResearch(research_id) +); + +-- 98. Campaign Trends +CREATE TABLE CampaignTrends ( + trend_id INT NOT NULL AUTO_INCREMENT, + campaign_id INT NOT NULL, + trend_description TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (trend_id), + FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) +); + +-- 99. Marketing Events Feedback +CREATE TABLE MarketingEventsFeedback ( + feedback_id INT NOT NULL AUTO_INCREMENT, + event_id INT NOT NULL, + lead_id INT NOT NULL, + feedback_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (feedback_id), + FOREIGN KEY (event_id) REFERENCES MarketingEvents(event_id), + FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) +); + +-- 100. Marketing Goals +CREATE TABLE MarketingGoals ( + goal_id INT NOT NULL AUTO_INCREMENT, + goal_name VARCHAR(100), + target_value DECIMAL(10, 2), + actual_value DECIMAL(10, 2), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (goal_id) +); + +-- 1. Tutors +CREATE TABLE Tutors ( + tutor_id INT NOT NULL AUTO_INCREMENT, + first_name VARCHAR(50), + last_name VARCHAR(50), + email VARCHAR(100) UNIQUE, + phone VARCHAR(15), + subject_specialty VARCHAR(100), + experience_years INT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (tutor_id) +); + +-- 2. Tutor Profiles +CREATE TABLE TutorProfiles ( + profile_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + bio TEXT, + profile_picture VARCHAR(255), + PRIMARY KEY (profile_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 3. Subjects +CREATE TABLE Subjects ( + subject_id INT NOT NULL AUTO_INCREMENT, + subject_name VARCHAR(100), + PRIMARY KEY (subject_id) +); + +-- 4. Tutor_Subjects +CREATE TABLE Tutor_Subjects ( + tutor_subject_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + subject_id INT NOT NULL, + PRIMARY KEY (tutor_subject_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), + FOREIGN KEY (subject_id) REFERENCES Subjects(subject_id) +); + +-- 5. StudentsVT +CREATE TABLE StudentsVT ( + student_id INT NOT NULL AUTO_INCREMENT, + first_name VARCHAR(50), + last_name VARCHAR(50), + email VARCHAR(100) UNIQUE, + phone VARCHAR(15), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (student_id) +); + +-- 6. Student_Enrollments +CREATE TABLE Student_Enrollments ( + enrollment_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + course_id INT NOT NULL, + enrollment_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (enrollment_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 7. VTCourses2 +CREATE TABLE VTCourses2 ( + course_id INT NOT NULL AUTO_INCREMENT, + course_name VARCHAR(100), + course_description TEXT, + PRIMARY KEY (course_id) +); + +-- 8. Tutor_Schedules +CREATE TABLE Tutor_Schedules ( + schedule_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + available_day VARCHAR(10), + available_time TIME, + PRIMARY KEY (schedule_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 9. TutoringSessionsTwo +CREATE TABLE TutoringSessionsTwo ( + session_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + student_id INT NOT NULL, + course_id INT NOT NULL, + session_date TIMESTAMP, + session_duration INT, -- in minutes + PRIMARY KEY (session_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id), + FOREIGN KEY (course_id) REFERENCES VTCourses2(course_id) +); + +-- 10. Session_Feedback +CREATE TABLE Session_Feedback ( + feedback_id INT NOT NULL AUTO_INCREMENT, + session_id INT NOT NULL, + rating INT CHECK (rating >= 1 AND rating <= 5), + comments TEXT, + PRIMARY KEY (feedback_id), + FOREIGN KEY (session_id) REFERENCES TutoringSessionsTwo(session_id) +); + +-- 11. Tutor_Ratings +CREATE TABLE Tutor_Ratings ( + rating_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + student_id INT NOT NULL, + rating INT CHECK (rating >= 1 AND rating <= 5), + comments TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (rating_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 12. Tutor_Availability +CREATE TABLE Tutor_Availability ( + availability_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + date DATE, + available BOOLEAN, + PRIMARY KEY (availability_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 13. PaymentsVT +CREATE TABLE PaymentsVT ( + payment_id INT NOT NULL AUTO_INCREMENT, + student_id INT NOT NULL, + session_id INT NOT NULL, + amount DECIMAL(10, 2), + payment_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (payment_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id), + FOREIGN KEY (session_id) REFERENCES TutoringSessionsTwo(session_id) +); + +-- 14. Discounts +CREATE TABLE Discounts ( + discount_id INT NOT NULL AUTO_INCREMENT, + discount_code VARCHAR(50), + discount_percentage DECIMAL(5, 2), + valid_until DATE, + PRIMARY KEY (discount_id) +); + +-- 15. Tutor_Reviews +CREATE TABLE Tutor_Reviews ( + review_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + review_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (review_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 16. TutoringEvents +CREATE TABLE TutoringEvents ( + event_id INT NOT NULL AUTO_INCREMENT, + event_name VARCHAR(100), + event_date DATE, + event_location VARCHAR(255), + PRIMARY KEY (event_id) +); + +-- 17. Event_Attendees +CREATE TABLE Event_Attendees ( + attendee_id INT NOT NULL AUTO_INCREMENT, + event_id INT NOT NULL, + student_id INT NOT NULL, + PRIMARY KEY (attendee_id), + FOREIGN KEY (event_id) REFERENCES TutoringEvents(event_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 18. TutoringNotify +CREATE TABLE TutoringNotify ( + notification_id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, -- Can be student or tutor + notification_text TEXT, + is_read BOOLEAN DEFAULT FALSE, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (notification_id) +); + +-- 19. Tutor_Qualifications +CREATE TABLE Tutor_Qualifications ( + qualification_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + qualification_name VARCHAR(100), + institution VARCHAR(100), + year_obtained INT, + PRIMARY KEY (qualification_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 20. Tutor_Experience +CREATE TABLE Tutor_Experience ( + experience_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + previous_employer VARCHAR(100), + position VARCHAR(100), + years_worked INT, + PRIMARY KEY (experience_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 21. Tutor_Specialties +CREATE TABLE Tutor_Specialties ( + specialty_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + specialty_name VARCHAR(100), + PRIMARY KEY (specialty_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 22. Tutor_Skills +CREATE TABLE Tutor_Skills ( + skill_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + skill_name VARCHAR(100), + PRIMARY KEY (skill_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 23. Tutor_Timings +CREATE TABLE Tutor_Timings ( + timing_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + timing_start TIME, + timing_end TIME, + PRIMARY KEY (timing_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 24. Tutor_Languages +CREATE TABLE Tutor_Languages ( + language_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + language_name VARCHAR(100), + PRIMARY KEY (language_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 25. Session_Notes +CREATE TABLE Session_Notes ( + note_id INT NOT NULL AUTO_INCREMENT, + session_id INT NOT NULL, + note_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (note_id), + FOREIGN KEY (session_id) REFERENCES TutoringSessionsTwo(session_id) +); + +-- 26. Tutor_Certifications +CREATE TABLE Tutor_Certifications_Two ( + certification_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + certification_name VARCHAR(100), + issuing_organization VARCHAR(100), + year_obtained INT, + PRIMARY KEY (certification_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 27. Session_Reschedule +CREATE TABLE Session_Reschedule ( + reschedule_id INT NOT NULL AUTO_INCREMENT, + session_id INT NOT NULL, + new_session_date TIMESTAMP, + PRIMARY KEY (reschedule_id), + FOREIGN KEY (session_id) REFERENCES TutoringSessionsTwo(session_id) +); + +-- 28. Tutor_SocialMedia +CREATE TABLE Tutor_SocialMedia ( + social_media_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + platform VARCHAR(50), + profile_url VARCHAR(255), + PRIMARY KEY (social_media_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 29. Tutor_Articles +CREATE TABLE Tutor_Articles ( + article_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + article_title VARCHAR(100), + article_content TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (article_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 30. Tutor_Blog +CREATE TABLE Tutor_Blog ( + blog_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + blog_title VARCHAR(100), + blog_content TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (blog_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 31. Tutor_Media +CREATE TABLE Tutor_Media ( + media_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + media_type VARCHAR(50), -- e.g., video, image + media_url VARCHAR(255), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (media_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 32. Tutor_Projects +CREATE TABLE Tutor_Projects ( + project_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + project_title VARCHAR(100), + project_description TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (project_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 33. Tutor_Events +CREATE TABLE Tutor_Events ( + tutor_event_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + event_id INT NOT NULL, + PRIMARY KEY (tutor_event_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), + FOREIGN KEY (event_id) REFERENCES TutoringEvents(event_id) +); + +-- 34. Tutor_Connections +CREATE TABLE Tutor_Connections ( + connection_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + student_id INT NOT NULL, + connection_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (connection_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 35. Tutor_SuccessStories +CREATE TABLE Tutor_SuccessStories ( + story_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + student_id INT NOT NULL, + story_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (story_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 36. Tutor_Videos +CREATE TABLE Tutor_Videos ( + video_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + video_title VARCHAR(100), + video_url VARCHAR(255), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (video_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 37. Tutor_Questions +CREATE TABLE Tutor_Questions ( + question_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + question_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (question_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 38. Tutor_Answers +CREATE TABLE Tutor_Answers ( + answer_id INT NOT NULL AUTO_INCREMENT, + question_id INT NOT NULL, + answer_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (answer_id), + FOREIGN KEY (question_id) REFERENCES Tutor_Questions(question_id) +); + +-- 39. Tutor_Categories +CREATE TABLE Tutor_Categories ( + category_id INT NOT NULL AUTO_INCREMENT, + category_name VARCHAR(100), + PRIMARY KEY (category_id) +); + +-- 40. Tutor_Category_Assignment +CREATE TABLE Tutor_Category_Assignment ( + assignment_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + category_id INT NOT NULL, + PRIMARY KEY (assignment_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), + FOREIGN KEY (category_id) REFERENCES Tutor_Categories(category_id) +); + +-- 41. Tutor_Articles_Comments +CREATE TABLE Tutor_Articles_Comments ( + comment_id INT NOT NULL AUTO_INCREMENT, + article_id INT NOT NULL, + student_id INT NOT NULL, + comment_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (comment_id), + FOREIGN KEY (article_id) REFERENCES Tutor_Articles(article_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 42. Tutor_Blog_Comments +CREATE TABLE Tutor_Blog_Comments ( + comment_id INT NOT NULL AUTO_INCREMENT, + blog_id INT NOT NULL, + student_id INT NOT NULL, + comment_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (comment_id), + FOREIGN KEY (blog_id) REFERENCES Tutor_Blog(blog_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 43. Tutor_Resources +CREATE TABLE Tutor_Resources ( + resource_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + resource_name VARCHAR(100), + resource_url VARCHAR(255), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (resource_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 44. Tutor_Galleries +CREATE TABLE Tutor_Galleries ( + gallery_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + gallery_title VARCHAR(100), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (gallery_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 45. Gallery_Images +CREATE TABLE Gallery_Images ( + image_id INT NOT NULL AUTO_INCREMENT, + gallery_id INT NOT NULL, + image_url VARCHAR(255), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (image_id), + FOREIGN KEY (gallery_id) REFERENCES Tutor_Galleries(gallery_id) +); + +-- 46. Tutor_Policies +CREATE TABLE Tutor_Policies ( + policy_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + policy_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (policy_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 47. Tutor_Reports +CREATE TABLE Tutor_Reports ( + report_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + report_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (report_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 48. Tutor_Awards +CREATE TABLE Tutor_Awards ( + award_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + award_name VARCHAR(100), + award_year INT, + PRIMARY KEY (award_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 49. Tutor_Banners +CREATE TABLE Tutor_Banners ( + banner_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + banner_image VARCHAR(255), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (banner_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 50. Tutor_SuccessMetrics +CREATE TABLE Tutor_SuccessMetrics ( + metric_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + metric_name VARCHAR(100), + metric_value DECIMAL(10, 2), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (metric_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 51. Tutor_Projects_Comments +CREATE TABLE Tutor_Projects_Comments ( + comment_id INT NOT NULL AUTO_INCREMENT, + project_id INT NOT NULL, + student_id INT NOT NULL, + comment_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (comment_id), + FOREIGN KEY (project_id) REFERENCES Tutor_Projects(project_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 52. Tutor_Media_Comments +CREATE TABLE Tutor_Media_Comments ( + comment_id INT NOT NULL AUTO_INCREMENT, + media_id INT NOT NULL, + student_id INT NOT NULL, + comment_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (comment_id), + FOREIGN KEY (media_id) REFERENCES Tutor_Media(media_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 53. Tutor_Event_Comments +CREATE TABLE Tutor_Event_Comments ( + comment_id INT NOT NULL AUTO_INCREMENT, + event_id INT NOT NULL, + student_id INT NOT NULL, + comment_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (comment_id), + FOREIGN KEY (event_id) REFERENCES TutoringEvents(event_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 54. Tutor_Session_Tags +CREATE TABLE Tutor_Session_Tags ( + tag_id INT NOT NULL AUTO_INCREMENT, + session_id INT NOT NULL, + tag_name VARCHAR(100), + PRIMARY KEY (tag_id), + FOREIGN KEY (session_id) REFERENCES TutoringSessionsTwo(session_id) +); + +-- 55. Tutor_Meeting +CREATE TABLE Tutor_Meeting ( + meeting_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + student_id INT NOT NULL, + meeting_date TIMESTAMP, + meeting_duration INT, + PRIMARY KEY (meeting_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 56. Tutor_Video_Sessions +CREATE TABLE Tutor_Video_Sessions ( + video_session_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + student_id INT NOT NULL, + session_date TIMESTAMP, + PRIMARY KEY (video_session_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 57. Tutor_Workshops +CREATE TABLE Tutor_Workshops ( + workshop_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + workshop_name VARCHAR(100), + workshop_description TEXT, + workshop_date TIMESTAMP, + PRIMARY KEY (workshop_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 58. Tutor_Forum +CREATE TABLE Tutor_Forum ( + forum_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + forum_topic VARCHAR(100), + forum_content TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (forum_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 59. Tutor_Forum_Comments +CREATE TABLE Tutor_Forum_Comments ( + comment_id INT NOT NULL AUTO_INCREMENT, + forum_id INT NOT NULL, + student_id INT NOT NULL, + comment_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (comment_id), + FOREIGN KEY (forum_id) REFERENCES Tutor_Forum(forum_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 60. Tutor_Notes +CREATE TABLE Tutor_Notes ( + note_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + note_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (note_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 61. Tutor_Articles_Likes +CREATE TABLE Tutor_Articles_Likes ( + like_id INT NOT NULL AUTO_INCREMENT, + article_id INT NOT NULL, + student_id INT NOT NULL, + PRIMARY KEY (like_id), + FOREIGN KEY (article_id) REFERENCES Tutor_Articles(article_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 62. Tutor_Blog_Likes +CREATE TABLE Tutor_Blog_Likes ( + like_id INT NOT NULL AUTO_INCREMENT, + blog_id INT NOT NULL, + student_id INT NOT NULL, + PRIMARY KEY (like_id), + FOREIGN KEY (blog_id) REFERENCES Tutor_Blog(blog_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 63. Tutor_Projects_Likes +CREATE TABLE Tutor_Projects_Likes ( + like_id INT NOT NULL AUTO_INCREMENT, + project_id INT NOT NULL, + student_id INT NOT NULL, + PRIMARY KEY (like_id), + FOREIGN KEY (project_id) REFERENCES Tutor_Projects(project_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 64. Tutor_Certifications_Comments +CREATE TABLE Tutor_Certifications_Comments ( + comment_id INT NOT NULL AUTO_INCREMENT, + certification_id INT NOT NULL, + student_id INT NOT NULL, + comment_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (comment_id), + FOREIGN KEY (certification_id) REFERENCES Tutor_Certifications_Two(certification_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 65. Tutor_Awards_Comments +CREATE TABLE Tutor_Awards_Comments ( + comment_id INT NOT NULL AUTO_INCREMENT, + award_id INT NOT NULL, + student_id INT NOT NULL, + comment_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (comment_id), + FOREIGN KEY (award_id) REFERENCES Tutor_Awards(award_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 66. Tutor_Galleries_Comments +CREATE TABLE Tutor_Galleries_Comments ( + comment_id INT NOT NULL AUTO_INCREMENT, + gallery_id INT NOT NULL, + student_id INT NOT NULL, + comment_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (comment_id), + FOREIGN KEY (gallery_id) REFERENCES Tutor_Galleries(gallery_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 67. Tutor_Resources_Comments +CREATE TABLE Tutor_Resources_Comments ( + comment_id INT NOT NULL AUTO_INCREMENT, + resource_id INT NOT NULL, + student_id INT NOT NULL, + comment_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (comment_id), + FOREIGN KEY (resource_id) REFERENCES Tutor_Resources(resource_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 68. Tutor_SocialMedia_Likes +CREATE TABLE Tutor_SocialMedia_Likes ( + like_id INT NOT NULL AUTO_INCREMENT, + social_media_id INT NOT NULL, + student_id INT NOT NULL, + PRIMARY KEY (like_id), + FOREIGN KEY (social_media_id) REFERENCES Tutor_SocialMedia(social_media_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 69. Tutor_Financials +CREATE TABLE Tutor_Financials ( + financial_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + income DECIMAL(10, 2), + expenses DECIMAL(10, 2), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (financial_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 70. Tutor_Statistics +CREATE TABLE Tutor_Statistics ( + statistic_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + session_count INT, + feedback_count INT, + success_rate DECIMAL(5, 2), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (statistic_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 71. Tutor_IndustryConnections +CREATE TABLE Tutor_IndustryConnections ( + connection_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + organization_name VARCHAR(100), + contact_person VARCHAR(100), + contact_info VARCHAR(100), + PRIMARY KEY (connection_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 72. Tutor_Referrals +CREATE TABLE Tutor_Referrals ( + referral_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + referred_student_id INT NOT NULL, + referral_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (referral_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), + FOREIGN KEY (referred_student_id) REFERENCES StudentsVT(student_id) +); + +-- 73. Tutor_Meeting_Notes +CREATE TABLE Tutor_Meeting_Notes ( + meeting_note_id INT NOT NULL AUTO_INCREMENT, + meeting_id INT NOT NULL, + note_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (meeting_note_id), + FOREIGN KEY (meeting_id) REFERENCES Tutor_Meeting(meeting_id) +); + +-- 74. Tutor_Languages_Spoken +CREATE TABLE Tutor_Languages_Spoken ( + spoken_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + language_name VARCHAR(100), + PRIMARY KEY (spoken_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 75. Tutor_Interactions +CREATE TABLE Tutor_Interactions ( + interaction_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + student_id INT NOT NULL, + interaction_type VARCHAR(100), -- e.g., call, email + interaction_date TIMESTAMP, + PRIMARY KEY (interaction_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), + FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) +); + +-- 76. Tutor_Feedback +CREATE TABLE Tutor_Feedback ( + feedback_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + feedback_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (feedback_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 77. Tutor_Collaborations +CREATE TABLE Tutor_Collaborations ( + collaboration_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + project_name VARCHAR(100), + project_description TEXT, + PRIMARY KEY (collaboration_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 78. Tutor_Conferences +CREATE TABLE Tutor_Conferences ( + conference_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + conference_name VARCHAR(100), + conference_date DATE, + PRIMARY KEY (conference_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 79. Tutor_Podcasts +CREATE TABLE Tutor_Podcasts ( + podcast_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + podcast_title VARCHAR(100), + podcast_url VARCHAR(255), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (podcast_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 80. Tutor_Webinars +CREATE TABLE Tutor_Webinars ( + webinar_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + webinar_title VARCHAR(100), + webinar_date TIMESTAMP, + PRIMARY KEY (webinar_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 81. Tutor_Websites +CREATE TABLE Tutor_Websites ( + website_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + website_url VARCHAR(255), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (website_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 82. Tutor_SocialMediaMetrics +CREATE TABLE Tutor_SocialMediaMetrics ( + metric_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + platform VARCHAR(50), + followers_count INT, + engagement_rate DECIMAL(5, 2), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (metric_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 83. Tutor_Ads +CREATE TABLE Tutor_Ads ( + ad_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + ad_content TEXT, + ad_platform VARCHAR(100), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (ad_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 84. Tutor_AdMetrics +CREATE TABLE Tutor_AdMetrics ( + metric_id INT NOT NULL AUTO_INCREMENT, + ad_id INT NOT NULL, + clicks INT, + impressions INT, + PRIMARY KEY (metric_id), + FOREIGN KEY (ad_id) REFERENCES Tutor_Ads(ad_id) +); + +-- 85. Tutor_Competitions +CREATE TABLE Tutor_Competitions ( + competition_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + competition_name VARCHAR(100), + competition_date DATE, + PRIMARY KEY (competition_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 86. Tutor_Networks +CREATE TABLE Tutor_Networks ( + network_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + network_name VARCHAR(100), + PRIMARY KEY (network_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 87. Tutor_Partnerships +CREATE TABLE Tutor_Partnerships ( + partnership_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + partner_name VARCHAR(100), + partnership_date TIMESTAMP, + PRIMARY KEY (partnership_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 88. Tutor_Certifications +CREATE TABLE Tutor_Certifications ( + certification_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + certification_name VARCHAR(100), + issued_date DATE, + expiration_date DATE, + PRIMARY KEY (certification_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 89. Tutor_TrainingPrograms +CREATE TABLE Tutor_TrainingPrograms ( + training_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + program_name VARCHAR(100), + program_description TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (training_id) +); + +-- 90. Tutor_FeedbackResponses +CREATE TABLE Tutor_FeedbackResponses ( + response_id INT NOT NULL AUTO_INCREMENT, + feedback_id INT NOT NULL, + response_text TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (response_id), + FOREIGN KEY (feedback_id) REFERENCES Tutor_Feedback(feedback_id) +); + +-- 91. Tutor_Mentorships +CREATE TABLE Tutor_Mentorships ( + mentorship_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + mentee_id INT NOT NULL, + start_date DATE, + end_date DATE, + PRIMARY KEY (mentorship_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), + FOREIGN KEY (mentee_id) REFERENCES StudentsVT(student_id) +); + +-- 92. Tutor_Resources +CREATE TABLE Tutor_Resources_Two ( + resource_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + resource_title VARCHAR(100), + resource_url VARCHAR(255), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (resource_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 93. Tutor_Articles +CREATE TABLE Tutor_Articles_Two ( + article_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + article_title VARCHAR(100), + article_content TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (article_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 94. Tutor_TrainingSessions +CREATE TABLE Tutor_TrainingSessions ( + session_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + session_date TIMESTAMP, + session_topic VARCHAR(100), + PRIMARY KEY (session_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 95. Tutor_Videos +CREATE TABLE Tutor_Videos_Two ( + video_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + video_title VARCHAR(100), + video_url VARCHAR(255), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (video_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 96. Tutor_AudioLectures +CREATE TABLE Tutor_AudioLectures ( + audio_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + audio_title VARCHAR(100), + audio_url VARCHAR(255), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (audio_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 97. Tutor_BookRecommendations +CREATE TABLE Tutor_BookRecommendations ( + recommendation_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + book_title VARCHAR(100), + author VARCHAR(100), + PRIMARY KEY (recommendation_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 98. Tutor_FeedbackSurveys +CREATE TABLE Tutor_FeedbackSurveys ( + survey_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + survey_title VARCHAR(100), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (survey_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 99. Tutor_EventParticipation +CREATE TABLE Tutor_EventParticipation ( + participation_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + event_name VARCHAR(100), + event_date DATE, + PRIMARY KEY (participation_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); + +-- 100. Tutor_Goals +CREATE TABLE Tutor_Goals ( + goal_id INT NOT NULL AUTO_INCREMENT, + tutor_id INT NOT NULL, + goal_description TEXT, + target_date DATE, + PRIMARY KEY (goal_id), + FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) +); diff --git a/testing/schema-mapping/example-mysql-schema.sql b/testing/schema-mapping/example-mysql-schema.sql index 5ffd304..79eaf11 100644 --- a/testing/schema-mapping/example-mysql-schema.sql +++ b/testing/schema-mapping/example-mysql-schema.sql @@ -4946,4 +4946,4 @@ CREATE TABLE Tutor_Goals ( target_date DATE, PRIMARY KEY (goal_id), FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); +); \ No newline at end of file diff --git a/testing/schema-mapping/map-data.py b/testing/schema-mapping/map-data.py index 30e6eb4..d8aff12 100644 --- a/testing/schema-mapping/map-data.py +++ b/testing/schema-mapping/map-data.py @@ -30,18 +30,21 @@ def write_yaml(input_dict, file_path): def generate_attr_def(attr, attr_type): definition = {} - if attr_type == "INT" or attr_type.startswith("DECIMAL"): + if attr_type.startswith("INT") or attr_type.startswith("DECIMAL") or attr_type.startswith("FLOAT"): definition["type"] = "int" definition["min"] = 1 definition["max"] = 100 elif attr_type.startswith("VARCHAR") or attr_type.startswith("TEXT") or attr_type.startswith("ENUM"): definition["type"] = "choice" definition["values"] = ["choice 1", "choice 2", "choice 3"] + elif attr_type.startswith("DATE"): + definition["type"] = "date" elif attr_type.startswith("BOOLEAN"): - definition["type"] = "choice" - definition["values"] = ["True", "False"] - elif attr_type == "TIMESTAMP": - definition["type"] = attr_type.lower() + definition["type"] = "int" + definition["min"] = 0 + definition["max"] = 1 + elif attr_type.startswith("TIMESTAMP") or attr_type.startswith("TIME"): + definition["type"] = "timestamp" else: definition["type"] = attr_type return definition @@ -78,7 +81,7 @@ def generate_attr_def(attr, attr_type): for name in table_names: streaming_list.append({ "topic_name": name + "_topic", - "record_count": 100, + "record_count": 1000, "dataset": name, }) write_yaml({"streaming": streaming_list}, testing_var_file_path) diff --git a/testing/stream_kafka.py b/testing/stream_kafka.py index cc6df49..95e0048 100644 --- a/testing/stream_kafka.py +++ b/testing/stream_kafka.py @@ -40,7 +40,7 @@ def produce_event_logs_to_kafka(num_records, topic_name, dataset_num): producer.produce(topic_name, value=json.dumps(log)) producer.poll(0) # Polls the producer for message delivery events # Optional: Sleep for a small amount of time to allow the queue to clear - time.sleep(0.001) # Adjust this value as needed + time.sleep(0.0001) # Adjust this value as needed print(f"Sent: {log}") # Wait up to 5 seconds for messages to be sent producer.flush(timeout=5) From 87fa68c318e4e0d00e3e748bb0d62a6868440721 Mon Sep 17 00:00:00 2001 From: Kevin Tran Date: Thu, 26 Sep 2024 14:33:42 -0700 Subject: [PATCH 07/15] chore: cleanup and documentation --- ...e-mysql-schema.sql => ex-mysql-schema.sql} | 0 .../example-mysql-schema copy.sql | 4949 ----------------- testing/schema-mapping/map-data.py | 5 +- 3 files changed, 3 insertions(+), 4951 deletions(-) rename testing/schema-mapping/{example-mysql-schema.sql => ex-mysql-schema.sql} (100%) delete mode 100644 testing/schema-mapping/example-mysql-schema copy.sql diff --git a/testing/schema-mapping/example-mysql-schema.sql b/testing/schema-mapping/ex-mysql-schema.sql similarity index 100% rename from testing/schema-mapping/example-mysql-schema.sql rename to testing/schema-mapping/ex-mysql-schema.sql diff --git a/testing/schema-mapping/example-mysql-schema copy.sql b/testing/schema-mapping/example-mysql-schema copy.sql deleted file mode 100644 index 5ffd304..0000000 --- a/testing/schema-mapping/example-mysql-schema copy.sql +++ /dev/null @@ -1,4949 +0,0 @@ --- 1. Users -CREATE TABLE Users ( - user_id INT NOT NULL AUTO_INCREMENT, - username VARCHAR(50) NOT NULL UNIQUE, - email VARCHAR(100) NOT NULL UNIQUE, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (user_id) -); - --- 2. Experiments -CREATE TABLE Experiments ( - experiment_id INT NOT NULL AUTO_INCREMENT, - experiment_name VARCHAR(100) NOT NULL, - start_date DATE, - end_date DATE, - status ENUM('Active', 'Completed', 'Paused'), - PRIMARY KEY (experiment_id) -); - --- 3. Variants -CREATE TABLE Variants ( - variant_id INT NOT NULL AUTO_INCREMENT, - experiment_id INT NOT NULL, - variant_name VARCHAR(50) NOT NULL, - PRIMARY KEY (variant_id), - FOREIGN KEY (experiment_id) REFERENCES Experiments(experiment_id) -); - --- 4. User Assignments -CREATE TABLE UserAssignments ( - assignment_id INT NOT NULL AUTO_INCREMENT, - user_id INT NOT NULL, - variant_id INT NOT NULL, - assigned_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (assignment_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id), - FOREIGN KEY (variant_id) REFERENCES Variants(variant_id) -); - --- 5. Events -CREATE TABLE Events ( - event_id INT NOT NULL AUTO_INCREMENT, - user_id INT NOT NULL, - experiment_id INT NOT NULL, - event_type VARCHAR(50), - event_timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (event_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id), - FOREIGN KEY (experiment_id) REFERENCES Experiments(experiment_id) -); - --- 6. Goals -CREATE TABLE Goals ( - goal_id INT NOT NULL AUTO_INCREMENT, - experiment_id INT NOT NULL, - goal_description TEXT, - PRIMARY KEY (goal_id), - FOREIGN KEY (experiment_id) REFERENCES Experiments(experiment_id) -); - --- 7. Goal Metrics -CREATE TABLE GoalMetrics ( - metric_id INT NOT NULL AUTO_INCREMENT, - goal_id INT NOT NULL, - variant_id INT NOT NULL, - conversion_count INT, - PRIMARY KEY (metric_id), - FOREIGN KEY (goal_id) REFERENCES Goals(goal_id), - FOREIGN KEY (variant_id) REFERENCES Variants(variant_id) -); - --- 8. Feedback -CREATE TABLE Feedback ( - feedback_id INT NOT NULL AUTO_INCREMENT, - user_id INT NOT NULL, - experiment_id INT NOT NULL, - feedback_text TEXT, - submitted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (feedback_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id), - FOREIGN KEY (experiment_id) REFERENCES Experiments(experiment_id) -); - --- 9. Feature Flags -CREATE TABLE FeatureFlags ( - flag_id INT NOT NULL AUTO_INCREMENT, - flag_name VARCHAR(100) NOT NULL UNIQUE, - is_active BOOLEAN DEFAULT TRUE, - PRIMARY KEY (flag_id) -); - --- 10. Flag Assignments -CREATE TABLE FlagAssignments ( - assignment_id INT NOT NULL AUTO_INCREMENT, - user_id INT NOT NULL, - flag_id INT NOT NULL, - assigned_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (assignment_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id), - FOREIGN KEY (flag_id) REFERENCES FeatureFlags(flag_id) -); - --- 11. Sessions -CREATE TABLE Sessions ( - session_id INT NOT NULL AUTO_INCREMENT, - user_id INT NOT NULL, - start_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - end_time TIMESTAMP, - PRIMARY KEY (session_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id) -); - --- 12. Page Views -CREATE TABLE PageViews ( - view_id INT NOT NULL AUTO_INCREMENT, - user_id INT NOT NULL, - session_id INT NOT NULL, - page_url VARCHAR(255), - view_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (view_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id), - FOREIGN KEY (session_id) REFERENCES Sessions(session_id) -); - --- 13. Clicks -CREATE TABLE Clicks ( - click_id INT NOT NULL AUTO_INCREMENT, - user_id INT NOT NULL, - event_id INT NOT NULL, - click_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (click_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id), - FOREIGN KEY (event_id) REFERENCES Events(event_id) -); - --- 14. Annotations -CREATE TABLE Annotations ( - annotation_id INT NOT NULL AUTO_INCREMENT, - experiment_id INT NOT NULL, - note TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (annotation_id), - FOREIGN KEY (experiment_id) REFERENCES Experiments(experiment_id) -); - --- 15. Metrics -CREATE TABLE Metrics ( - metric_id INT NOT NULL AUTO_INCREMENT, - experiment_id INT NOT NULL, - metric_name VARCHAR(100), - metric_value DECIMAL(10, 2), - recorded_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (metric_id), - FOREIGN KEY (experiment_id) REFERENCES Experiments(experiment_id) -); - --- 16. Cohorts -CREATE TABLE Cohorts ( - cohort_id INT NOT NULL AUTO_INCREMENT, - cohort_name VARCHAR(100), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (cohort_id) -); - --- 17. Cohort Members -CREATE TABLE CohortMembers ( - member_id INT NOT NULL AUTO_INCREMENT, - cohort_id INT NOT NULL, - user_id INT NOT NULL, - joined_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (member_id), - FOREIGN KEY (cohort_id) REFERENCES Cohorts(cohort_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id) -); - --- 18. User Segments -CREATE TABLE UserSegments ( - segment_id INT NOT NULL AUTO_INCREMENT, - segment_name VARCHAR(100), - criteria TEXT, - PRIMARY KEY (segment_id) -); - --- 19. Segment Memberships -CREATE TABLE SegmentMemberships ( - membership_id INT NOT NULL AUTO_INCREMENT, - segment_id INT NOT NULL, - user_id INT NOT NULL, - PRIMARY KEY (membership_id), - FOREIGN KEY (segment_id) REFERENCES UserSegments(segment_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id) -); - --- 20. Notifications -CREATE TABLE Notifications ( - notification_id INT NOT NULL AUTO_INCREMENT, - user_id INT NOT NULL, - message TEXT, - sent_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (notification_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id) -); - --- 21. Test Plans -CREATE TABLE TestPlans ( - plan_id INT NOT NULL AUTO_INCREMENT, - experiment_id INT NOT NULL, - plan_description TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (plan_id), - FOREIGN KEY (experiment_id) REFERENCES Experiments(experiment_id) -); - --- 22. Results -CREATE TABLE Results ( - result_id INT NOT NULL AUTO_INCREMENT, - experiment_id INT NOT NULL, - variant_id INT NOT NULL, - total_users INT, - conversion_rate DECIMAL(5, 2), - PRIMARY KEY (result_id), - FOREIGN KEY (experiment_id) REFERENCES Experiments(experiment_id), - FOREIGN KEY (variant_id) REFERENCES Variants(variant_id) -); - --- 23. Rollouts -CREATE TABLE Rollouts ( - rollout_id INT NOT NULL AUTO_INCREMENT, - feature_id INT NOT NULL, - rollout_percentage INT CHECK (rollout_percentage BETWEEN 0 AND 100), - rollout_date DATE, - PRIMARY KEY (rollout_id), - FOREIGN KEY (feature_id) REFERENCES FeatureFlags(flag_id) -); - --- 24. Development Tasks -CREATE TABLE DevelopmentTasks ( - task_id INT NOT NULL AUTO_INCREMENT, - task_name VARCHAR(100), - assigned_to INT, - status ENUM('Pending', 'In Progress', 'Completed'), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (task_id), - FOREIGN KEY (assigned_to) REFERENCES Users(user_id) -); - --- 25. Task Comments -CREATE TABLE TaskComments ( - comment_id INT NOT NULL AUTO_INCREMENT, - task_id INT NOT NULL, - user_id INT NOT NULL, - comment_text TEXT, - commented_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (comment_id), - FOREIGN KEY (task_id) REFERENCES DevelopmentTasks(task_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id) -); - --- 26. Code Reviews -CREATE TABLE CodeReviews ( - review_id INT NOT NULL AUTO_INCREMENT, - task_id INT NOT NULL, - reviewer_id INT NOT NULL, - review_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - status ENUM('Approved', 'Rejected'), - PRIMARY KEY (review_id), - FOREIGN KEY (task_id) REFERENCES DevelopmentTasks(task_id), - FOREIGN KEY (reviewer_id) REFERENCES Users(user_id) -); - --- 27. Test Cases -CREATE TABLE TestCases ( - test_case_id INT NOT NULL AUTO_INCREMENT, - task_id INT NOT NULL, - test_description TEXT, - expected_result TEXT, - PRIMARY KEY (test_case_id), - FOREIGN KEY (task_id) REFERENCES DevelopmentTasks(task_id) -); - --- 28. Test Results -CREATE TABLE TestResults ( - result_id INT NOT NULL AUTO_INCREMENT, - test_case_id INT NOT NULL, - status ENUM('Pass', 'Fail'), - executed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (result_id), - FOREIGN KEY (test_case_id) REFERENCES TestCases(test_case_id) -); - --- 29. Releases -CREATE TABLE Releases ( - release_id INT NOT NULL AUTO_INCREMENT, - version VARCHAR(20), - release_date DATE, - PRIMARY KEY (release_id) -); - --- 30. Release Notes -CREATE TABLE ReleaseNotes ( - note_id INT NOT NULL AUTO_INCREMENT, - release_id INT NOT NULL, - note TEXT, - PRIMARY KEY (note_id), - FOREIGN KEY (release_id) REFERENCES Releases(release_id) -); - --- 31. User Stories -CREATE TABLE UserStories ( - story_id INT NOT NULL AUTO_INCREMENT, - description TEXT, - acceptance_criteria TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (story_id) -); - --- 32. Story Assignments -CREATE TABLE StoryAssignments ( - assignment_id INT NOT NULL AUTO_INCREMENT, - story_id INT NOT NULL, - user_id INT NOT NULL, - PRIMARY KEY (assignment_id), - FOREIGN KEY (story_id) REFERENCES UserStories(story_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id) -); - --- 33. Sprints -CREATE TABLE Sprints ( - sprint_id INT NOT NULL AUTO_INCREMENT, - sprint_name VARCHAR(100), - start_date DATE, - end_date DATE, - PRIMARY KEY (sprint_id) -); - --- 34. Sprint Tasks -CREATE TABLE SprintTasks ( - sprint_task_id INT NOT NULL AUTO_INCREMENT, - sprint_id INT NOT NULL, - task_id INT NOT NULL, - PRIMARY KEY (sprint_task_id), - FOREIGN KEY (sprint_id) REFERENCES Sprints(sprint_id), - FOREIGN KEY (task_id) REFERENCES DevelopmentTasks(task_id) -); - --- 35. Backlogs -CREATE TABLE Backlogs ( - backlog_id INT NOT NULL AUTO_INCREMENT, - sprint_id INT NOT NULL, - task_id INT NOT NULL, - PRIMARY KEY (backlog_id), - FOREIGN KEY (sprint_id) REFERENCES Sprints(sprint_id), - FOREIGN KEY (task_id) REFERENCES DevelopmentTasks(task_id) -); - --- 36. QA Teams -CREATE TABLE QATeams ( - qa_team_id INT NOT NULL AUTO_INCREMENT, - team_name VARCHAR(100), - PRIMARY KEY (qa_team_id) -); - --- 37. QA Assignments -CREATE TABLE QAAssignments ( - qa_assignment_id INT NOT NULL AUTO_INCREMENT, - qa_team_id INT NOT NULL, - user_id INT NOT NULL, - PRIMARY KEY (qa_assignment_id), - FOREIGN KEY (qa_team_id) REFERENCES QATeams(qa_team_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id) -); - --- 38. QA Reports -CREATE TABLE QAReports ( - report_id INT NOT NULL AUTO_INCREMENT, - qa_assignment_id INT NOT NULL, - report_text TEXT, - submitted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (report_id), - FOREIGN KEY (qa_assignment_id) REFERENCES QAAssignments(qa_assignment_id) -); - --- 39. Integration Tests -CREATE TABLE IntegrationTests ( - test_id INT NOT NULL AUTO_INCREMENT, - test_description TEXT, - expected_outcome TEXT, - PRIMARY KEY (test_id) -); - --- 40. Integration Results -CREATE TABLE IntegrationResults ( - result_id INT NOT NULL AUTO_INCREMENT, - test_id INT NOT NULL, - status ENUM('Pass', 'Fail'), - executed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (result_id), - FOREIGN KEY (test_id) REFERENCES IntegrationTests(test_id) -); - --- 41. Performance Tests -CREATE TABLE PerformanceTests ( - performance_test_id INT NOT NULL AUTO_INCREMENT, - test_description TEXT, - expected_performance TEXT, - PRIMARY KEY (performance_test_id) -); - --- 42. Performance Results -CREATE TABLE PerformanceResults ( - result_id INT NOT NULL AUTO_INCREMENT, - performance_test_id INT NOT NULL, - status ENUM('Pass', 'Fail'), - executed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (result_id), - FOREIGN KEY (performance_test_id) REFERENCES PerformanceTests(performance_test_id) -); - --- 43. Documentation -CREATE TABLE Documentation ( - doc_id INT NOT NULL AUTO_INCREMENT, - title VARCHAR(100), - content TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (doc_id) -); - --- 44. API Endpoints -CREATE TABLE ApiEndpoints ( - endpoint_id INT NOT NULL AUTO_INCREMENT, - endpoint_name VARCHAR(255), - method ENUM('GET', 'POST', 'PUT', 'DELETE'), - PRIMARY KEY (endpoint_id) -); - --- 45. API Logs -CREATE TABLE ApiLogs ( - log_id INT NOT NULL AUTO_INCREMENT, - endpoint_id INT NOT NULL, - request_timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - response_status INT, - PRIMARY KEY (log_id), - FOREIGN KEY (endpoint_id) REFERENCES ApiEndpoints(endpoint_id) -); - --- 46. System Metrics -CREATE TABLE SystemMetrics ( - metric_id INT NOT NULL AUTO_INCREMENT, - metric_name VARCHAR(100), - metric_value DECIMAL(10, 2), - recorded_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (metric_id) -); - --- 47. Load Tests -CREATE TABLE LoadTests ( - load_test_id INT NOT NULL AUTO_INCREMENT, - test_description TEXT, - expected_load TEXT, - PRIMARY KEY (load_test_id) -); - --- 48. Load Test Results -CREATE TABLE LoadTestResults ( - result_id INT NOT NULL AUTO_INCREMENT, - load_test_id INT NOT NULL, - status ENUM('Pass', 'Fail'), - executed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (result_id), - FOREIGN KEY (load_test_id) REFERENCES LoadTests(load_test_id) -); - --- 49. Security Tests -CREATE TABLE SecurityTests ( - security_test_id INT NOT NULL AUTO_INCREMENT, - test_description TEXT, - expected_outcome TEXT, - PRIMARY KEY (security_test_id) -); - --- 50. Security Test Results -CREATE TABLE SecurityTestResults ( - result_id INT NOT NULL AUTO_INCREMENT, - security_test_id INT NOT NULL, - status ENUM('Pass', 'Fail'), - executed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (result_id), - FOREIGN KEY (security_test_id) REFERENCES SecurityTests(security_test_id) -); - --- 51. Risk Assessments -CREATE TABLE RiskAssessments ( - assessment_id INT NOT NULL AUTO_INCREMENT, - risk_description TEXT, - mitigation_strategy TEXT, - assessed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (assessment_id) -); - --- 52. Audit Trails -CREATE TABLE AuditTrails ( - trail_id INT NOT NULL AUTO_INCREMENT, - action TEXT, - performed_by INT NOT NULL, - performed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (trail_id), - FOREIGN KEY (performed_by) REFERENCES Users(user_id) -); - --- 53. Collaboration Tools -CREATE TABLE CollaborationTools ( - tool_id INT NOT NULL AUTO_INCREMENT, - tool_name VARCHAR(100), - PRIMARY KEY (tool_id) -); - --- 54. Tool Integrations -CREATE TABLE ToolIntegrations ( - integration_id INT NOT NULL AUTO_INCREMENT, - tool_id INT NOT NULL, - user_id INT NOT NULL, - PRIMARY KEY (integration_id), - FOREIGN KEY (tool_id) REFERENCES CollaborationTools(tool_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id) -); - --- 55. User Engagements -CREATE TABLE UserEngagements ( - engagement_id INT NOT NULL AUTO_INCREMENT, - user_id INT NOT NULL, - engagement_type VARCHAR(100), - engagement_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (engagement_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id) -); - --- 56. Change Requests -CREATE TABLE ChangeRequests ( - request_id INT NOT NULL AUTO_INCREMENT, - description TEXT, - status ENUM('Pending', 'Approved', 'Rejected'), - requested_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (request_id) -); - --- 57. Change Request Approvals -CREATE TABLE ChangeRequestApprovals ( - approval_id INT NOT NULL AUTO_INCREMENT, - request_id INT NOT NULL, - approved_by INT NOT NULL, - approved_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (approval_id), - FOREIGN KEY (request_id) REFERENCES ChangeRequests(request_id), - FOREIGN KEY (approved_by) REFERENCES Users(user_id) -); - --- 58. Training Sessions -CREATE TABLE TrainingSessions ( - session_id INT NOT NULL AUTO_INCREMENT, - topic VARCHAR(100), - scheduled_at TIMESTAMP, - PRIMARY KEY (session_id) -); - --- 59. Training Attendance -CREATE TABLE TrainingAttendance ( - attendance_id INT NOT NULL AUTO_INCREMENT, - session_id INT NOT NULL, - user_id INT NOT NULL, - attended BOOLEAN DEFAULT FALSE, - PRIMARY KEY (attendance_id), - FOREIGN KEY (session_id) REFERENCES TrainingSessions(session_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id) -); - --- 60. User Satisfaction Surveys -CREATE TABLE UserSatisfactionSurveys ( - survey_id INT NOT NULL AUTO_INCREMENT, - survey_title VARCHAR(100), - submission_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (survey_id) -); - --- 61. Survey Responses -CREATE TABLE SurveyResponses ( - response_id INT NOT NULL AUTO_INCREMENT, - survey_id INT NOT NULL, - user_id INT NOT NULL, - response_text TEXT, - PRIMARY KEY (response_id), - FOREIGN KEY (survey_id) REFERENCES UserSatisfactionSurveys(survey_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id) -); - --- 62. Analytics -CREATE TABLE Analytics ( - analytics_id INT NOT NULL AUTO_INCREMENT, - experiment_id INT NOT NULL, - metric_name VARCHAR(100), - metric_value DECIMAL(10, 2), - recorded_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (analytics_id), - FOREIGN KEY (experiment_id) REFERENCES Experiments(experiment_id) -); - --- 63. Product Backlog -CREATE TABLE ProductBacklog ( - backlog_id INT NOT NULL AUTO_INCREMENT, - item_description TEXT, - priority ENUM('Low', 'Medium', 'High'), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (backlog_id) -); - --- 64. Backlog Refinements -CREATE TABLE BacklogRefinements ( - refinement_id INT NOT NULL AUTO_INCREMENT, - backlog_id INT NOT NULL, - refined_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (refinement_id), - FOREIGN KEY (backlog_id) REFERENCES ProductBacklog(backlog_id) -); - --- 65. Product Roadmaps -CREATE TABLE ProductRoadmaps ( - roadmap_id INT NOT NULL AUTO_INCREMENT, - title VARCHAR(100), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (roadmap_id) -); - --- 66. Roadmap Items -CREATE TABLE RoadmapItems ( - item_id INT NOT NULL AUTO_INCREMENT, - roadmap_id INT NOT NULL, - description TEXT, - due_date DATE, - PRIMARY KEY (item_id), - FOREIGN KEY (roadmap_id) REFERENCES ProductRoadmaps(roadmap_id) -); - --- 67. Incident Reports -CREATE TABLE IncidentReports ( - report_id INT NOT NULL AUTO_INCREMENT, - incident_description TEXT, - reported_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (report_id) -); - --- 68. Incident Resolutions -CREATE TABLE IncidentResolutions ( - resolution_id INT NOT NULL AUTO_INCREMENT, - report_id INT NOT NULL, - resolution_description TEXT, - resolved_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (resolution_id), - FOREIGN KEY (report_id) REFERENCES IncidentReports(report_id) -); - --- 69. Communication Logs -CREATE TABLE CommunicationLogs ( - log_id INT NOT NULL AUTO_INCREMENT, - user_id INT NOT NULL, - communication_type VARCHAR(100), - log_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (log_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id) -); - --- 70. External Collaborations -CREATE TABLE ExternalCollaborations ( - collaboration_id INT NOT NULL AUTO_INCREMENT, - company_name VARCHAR(100), - contact_person VARCHAR(100), - PRIMARY KEY (collaboration_id) -); - --- 71. Collaboration Notes -CREATE TABLE CollaborationNotes ( - note_id INT NOT NULL AUTO_INCREMENT, - collaboration_id INT NOT NULL, - note_text TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (note_id), - FOREIGN KEY (collaboration_id) REFERENCES ExternalCollaborations(collaboration_id) -); - --- 72. Retrospectives -CREATE TABLE Retrospectives ( - retrospective_id INT NOT NULL AUTO_INCREMENT, - session_id INT NOT NULL, - notes TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (retrospective_id), - FOREIGN KEY (session_id) REFERENCES TrainingSessions(session_id) -); - --- 73. Performance Reviews -CREATE TABLE PerformanceReviews2 ( - review_id INT NOT NULL AUTO_INCREMENT, - user_id INT NOT NULL, - review_period VARCHAR(50), - comments TEXT, - PRIMARY KEY (review_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id) -); - --- 74. User Roles -CREATE TABLE UserRoles ( - role_id INT NOT NULL AUTO_INCREMENT, - role_name VARCHAR(50), - PRIMARY KEY (role_id) -); - --- 75. User Role Assignments -CREATE TABLE UserRoleAssignments ( - assignment_id INT NOT NULL AUTO_INCREMENT, - user_id INT NOT NULL, - role_id INT NOT NULL, - assigned_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (assignment_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id), - FOREIGN KEY (role_id) REFERENCES UserRoles(role_id) -); - --- 76. API Keys -CREATE TABLE ApiKeys ( - api_key_id INT NOT NULL AUTO_INCREMENT, - user_id INT NOT NULL, - key_value VARCHAR(255) UNIQUE, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (api_key_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id) -); - --- 77. Deployment Logs -CREATE TABLE DeploymentLogs ( - log_id INT NOT NULL AUTO_INCREMENT, - deployment_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - description TEXT, - PRIMARY KEY (log_id) -); - --- 78. Technical Debt -CREATE TABLE TechnicalDebt ( - debt_id INT NOT NULL AUTO_INCREMENT, - description TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (debt_id) -); - --- 79. Debt Resolutions -CREATE TABLE DebtResolutions ( - resolution_id INT NOT NULL AUTO_INCREMENT, - debt_id INT NOT NULL, - resolution_description TEXT, - resolved_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (resolution_id), - FOREIGN KEY (debt_id) REFERENCES TechnicalDebt(debt_id) -); - --- 80. Architecture Reviews -CREATE TABLE ArchitectureReviews ( - review_id INT NOT NULL AUTO_INCREMENT, - description TEXT, - reviewed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (review_id) -); - --- 81. Technical Specifications -CREATE TABLE TechnicalSpecifications ( - spec_id INT NOT NULL AUTO_INCREMENT, - project_name VARCHAR(100), - spec_description TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (spec_id) -); - --- 82. Technology Stack -CREATE TABLE TechnologyStack ( - stack_id INT NOT NULL AUTO_INCREMENT, - technology_name VARCHAR(100), - PRIMARY KEY (stack_id) -); - --- 83. Stack Components -CREATE TABLE StackComponents ( - component_id INT NOT NULL AUTO_INCREMENT, - stack_id INT NOT NULL, - component_name VARCHAR(100), - PRIMARY KEY (component_id), - FOREIGN KEY (stack_id) REFERENCES TechnologyStack(stack_id) -); - --- 84. Stakeholders -CREATE TABLE Stakeholders ( - stakeholder_id INT NOT NULL AUTO_INCREMENT, - name VARCHAR(100), - email VARCHAR(100) UNIQUE, - PRIMARY KEY (stakeholder_id) -); - --- 85. Stakeholder Feedback -CREATE TABLE StakeholderFeedback ( - feedback_id INT NOT NULL AUTO_INCREMENT, - stakeholder_id INT NOT NULL, - feedback_text TEXT, - submitted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (feedback_id), - FOREIGN KEY (stakeholder_id) REFERENCES Stakeholders(stakeholder_id) -); - --- 86. Meeting Notes -CREATE TABLE MeetingNotes ( - note_id INT NOT NULL AUTO_INCREMENT, - meeting_date TIMESTAMP, - notes TEXT, - PRIMARY KEY (note_id) -); - --- 87. Project Timelines -CREATE TABLE ProjectTimelines ( - timeline_id INT NOT NULL AUTO_INCREMENT, - project_name VARCHAR(100), - start_date DATE, - end_date DATE, - PRIMARY KEY (timeline_id) -); - --- 88. Milestones -CREATE TABLE Milestones ( - milestone_id INT NOT NULL AUTO_INCREMENT, - timeline_id INT NOT NULL, - milestone_description TEXT, - milestone_date DATE, - PRIMARY KEY (milestone_id), - FOREIGN KEY (timeline_id) REFERENCES ProjectTimelines(timeline_id) -); - --- 89. Risk Mitigation Plans -CREATE TABLE RiskMitigationPlans ( - plan_id INT NOT NULL AUTO_INCREMENT, - risk_id INT NOT NULL, - mitigation_strategy TEXT, - PRIMARY KEY (plan_id), - FOREIGN KEY (risk_id) REFERENCES RiskAssessments(assessment_id) -); - --- 90. User Groups -CREATE TABLE UserGroups ( - group_id INT NOT NULL AUTO_INCREMENT, - group_name VARCHAR(100), - PRIMARY KEY (group_id) -); - --- 91. Group Memberships -CREATE TABLE GroupMemberships ( - membership_id INT NOT NULL AUTO_INCREMENT, - group_id INT NOT NULL, - user_id INT NOT NULL, - PRIMARY KEY (membership_id), - FOREIGN KEY (group_id) REFERENCES UserGroups(group_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id) -); - --- 92. User Notifications -CREATE TABLE UserNotifications ( - notification_id INT NOT NULL AUTO_INCREMENT, - user_id INT NOT NULL, - notification_text TEXT, - sent_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (notification_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id) -); - --- 93. User Preferences -CREATE TABLE UserPreferences ( - preference_id INT NOT NULL AUTO_INCREMENT, - user_id INT NOT NULL, - preference_key VARCHAR(100), - preference_value VARCHAR(255), - PRIMARY KEY (preference_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id) -); - --- 94. Data Privacy Agreements -CREATE TABLE DataPrivacyAgreements ( - agreement_id INT NOT NULL AUTO_INCREMENT, - user_id INT NOT NULL, - agreement_text TEXT, - signed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (agreement_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id) -); - --- 95. Compliance Checklists -CREATE TABLE ComplianceChecklists ( - checklist_id INT NOT NULL AUTO_INCREMENT, - checklist_name VARCHAR(100), - PRIMARY KEY (checklist_id) -); - --- 96. Checklist Items -CREATE TABLE ChecklistItems ( - item_id INT NOT NULL AUTO_INCREMENT, - checklist_id INT NOT NULL, - item_description TEXT, - completed BOOLEAN DEFAULT FALSE, - PRIMARY KEY (item_id), - FOREIGN KEY (checklist_id) REFERENCES ComplianceChecklists(checklist_id) -); - --- 97. Knowledge Base Articles -CREATE TABLE KnowledgeBaseArticles ( - article_id INT NOT NULL AUTO_INCREMENT, - title VARCHAR(100), - content TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (article_id) -); - --- 98. Article Feedback -CREATE TABLE ArticleFeedback ( - feedback_id INT NOT NULL AUTO_INCREMENT, - article_id INT NOT NULL, - user_id INT NOT NULL, - feedback_text TEXT, - submitted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (feedback_id), - FOREIGN KEY (article_id) REFERENCES KnowledgeBaseArticles(article_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id) -); - --- 99. Roadmap Feedback -CREATE TABLE RoadmapFeedback ( - feedback_id INT NOT NULL AUTO_INCREMENT, - roadmap_id INT NOT NULL, - user_id INT NOT NULL, - feedback_text TEXT, - submitted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (feedback_id), - FOREIGN KEY (roadmap_id) REFERENCES ProductRoadmaps(roadmap_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id) -); - --- 100. Project Status -CREATE TABLE ProjectStatus ( - status_id INT NOT NULL AUTO_INCREMENT, - project_name VARCHAR(100), - status ENUM('On Track', 'At Risk', 'Delayed'), - last_updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (status_id) -); - --- 1. Employees -CREATE TABLE Employees ( - employee_id INT NOT NULL AUTO_INCREMENT, - first_name VARCHAR(50) NOT NULL, - last_name VARCHAR(50) NOT NULL, - email VARCHAR(100) NOT NULL UNIQUE, - phone VARCHAR(15), - hire_date DATE, - job_title VARCHAR(50), - salary DECIMAL(10, 2), - PRIMARY KEY (employee_id) -); - --- 2. Departments -CREATE TABLE Departments ( - department_id INT NOT NULL AUTO_INCREMENT, - department_name VARCHAR(100) NOT NULL, - location VARCHAR(100), - PRIMARY KEY (department_id) -); - --- 3. Projects -CREATE TABLE Projects ( - project_id INT NOT NULL AUTO_INCREMENT, - project_name VARCHAR(100) NOT NULL, - start_date DATE, - end_date DATE, - budget DECIMAL(10, 2), - PRIMARY KEY (project_id) -); - --- 4. Employee Departments -CREATE TABLE EmployeeDepartments ( - emp_dept_id INT NOT NULL AUTO_INCREMENT, - employee_id INT NOT NULL, - department_id INT NOT NULL, - start_date DATE, - end_date DATE, - PRIMARY KEY (emp_dept_id), - FOREIGN KEY (employee_id) REFERENCES Employees(employee_id), - FOREIGN KEY (department_id) REFERENCES Departments(department_id) -); - --- 5. Project Assignments -CREATE TABLE ProjectAssignments ( - assignment_id INT NOT NULL AUTO_INCREMENT, - employee_id INT NOT NULL, - project_id INT NOT NULL, - role VARCHAR(50), - PRIMARY KEY (assignment_id), - FOREIGN KEY (employee_id) REFERENCES Employees(employee_id), - FOREIGN KEY (project_id) REFERENCES Projects(project_id) -); - --- 6. Salaries -CREATE TABLE Salaries ( - salary_id INT NOT NULL AUTO_INCREMENT, - employee_id INT NOT NULL, - salary_amount DECIMAL(10, 2) NOT NULL, - pay_date DATE, - PRIMARY KEY (salary_id), - FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) -); - --- 7. Performance Reviews -CREATE TABLE PerformanceReviews ( - review_id INT NOT NULL AUTO_INCREMENT, - employee_id INT NOT NULL, - review_date DATE, - score INT CHECK (score BETWEEN 1 AND 5), - comments TEXT, - PRIMARY KEY (review_id), - FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) -); - --- 8. Attendance -CREATE TABLE Attendance ( - attendance_id INT NOT NULL AUTO_INCREMENT, - employee_id INT NOT NULL, - attendance_date DATE, - status ENUM('Present', 'Absent', 'Leave'), - PRIMARY KEY (attendance_id), - FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) -); - --- 9. Expenses -CREATE TABLE Expenses ( - expense_id INT NOT NULL AUTO_INCREMENT, - employee_id INT NOT NULL, - expense_amount DECIMAL(10, 2), - expense_date DATE, - description TEXT, - PRIMARY KEY (expense_id), - FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) -); - --- 10. Clients -CREATE TABLE Clients ( - client_id INT NOT NULL AUTO_INCREMENT, - client_name VARCHAR(100) NOT NULL, - contact_person VARCHAR(100), - phone VARCHAR(15), - email VARCHAR(100), - PRIMARY KEY (client_id) -); - --- 11. Invoices -CREATE TABLE Invoices ( - invoice_id INT NOT NULL AUTO_INCREMENT, - client_id INT NOT NULL, - invoice_date DATE, - amount DECIMAL(10, 2), - status ENUM('Paid', 'Pending', 'Overdue'), - PRIMARY KEY (invoice_id), - FOREIGN KEY (client_id) REFERENCES Clients(client_id) -); - --- 12. Payments -CREATE TABLE Payments ( - payment_id INT NOT NULL AUTO_INCREMENT, - invoice_id INT NOT NULL, - payment_date DATE, - amount DECIMAL(10, 2), - PRIMARY KEY (payment_id), - FOREIGN KEY (invoice_id) REFERENCES Invoices(invoice_id) -); - --- 13. Suppliers -CREATE TABLE Suppliers ( - supplier_id INT NOT NULL AUTO_INCREMENT, - supplier_name VARCHAR(100) NOT NULL, - contact_person VARCHAR(100), - phone VARCHAR(15), - email VARCHAR(100), - PRIMARY KEY (supplier_id) -); - --- 14. Purchases -CREATE TABLE Purchases ( - purchase_id INT NOT NULL AUTO_INCREMENT, - supplier_id INT NOT NULL, - purchase_date DATE, - total_amount DECIMAL(10, 2), - PRIMARY KEY (purchase_id), - FOREIGN KEY (supplier_id) REFERENCES Suppliers(supplier_id) -); - --- 15. Products -CREATE TABLE Products ( - product_id INT NOT NULL AUTO_INCREMENT, - product_name VARCHAR(100) NOT NULL, - price DECIMAL(10, 2) NOT NULL, - quantity INT NOT NULL, - PRIMARY KEY (product_id) -); - --- 16. Inventory -CREATE TABLE Inventory ( - inventory_id INT NOT NULL AUTO_INCREMENT, - product_id INT NOT NULL, - stock_level INT, - last_updated DATE, - PRIMARY KEY (inventory_id), - FOREIGN KEY (product_id) REFERENCES Products(product_id) -); - --- 17. Meetings -CREATE TABLE Meetings ( - meeting_id INT NOT NULL AUTO_INCREMENT, - meeting_date DATE, - agenda TEXT, - PRIMARY KEY (meeting_id) -); - --- 18. Meeting Participants -CREATE TABLE MeetingParticipants ( - participant_id INT NOT NULL AUTO_INCREMENT, - meeting_id INT NOT NULL, - employee_id INT NOT NULL, - PRIMARY KEY (participant_id), - FOREIGN KEY (meeting_id) REFERENCES Meetings(meeting_id), - FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) -); - --- 19. Training Programs -CREATE TABLE TrainingPrograms ( - training_id INT NOT NULL AUTO_INCREMENT, - program_name VARCHAR(100) NOT NULL, - start_date DATE, - end_date DATE, - PRIMARY KEY (training_id) -); - --- 20. Employee Training -CREATE TABLE EmployeeTraining ( - training_participation_id INT NOT NULL AUTO_INCREMENT, - employee_id INT NOT NULL, - training_id INT NOT NULL, - PRIMARY KEY (training_participation_id), - FOREIGN KEY (employee_id) REFERENCES Employees(employee_id), - FOREIGN KEY (training_id) REFERENCES TrainingPrograms(training_id) -); - --- 21. Policies -CREATE TABLE Policies ( - policy_id INT NOT NULL AUTO_INCREMENT, - policy_name VARCHAR(100) NOT NULL, - description TEXT, - PRIMARY KEY (policy_id) -); - --- 22. Policy Acknowledgments -CREATE TABLE PolicyAcknowledgments ( - acknowledgment_id INT NOT NULL AUTO_INCREMENT, - employee_id INT NOT NULL, - policy_id INT NOT NULL, - acknowledgment_date DATE, - PRIMARY KEY (acknowledgment_id), - FOREIGN KEY (employee_id) REFERENCES Employees(employee_id), - FOREIGN KEY (policy_id) REFERENCES Policies(policy_id) -); - --- 23. Company Assets -CREATE TABLE CompanyAssets ( - asset_id INT NOT NULL AUTO_INCREMENT, - asset_name VARCHAR(100) NOT NULL, - purchase_date DATE, - value DECIMAL(10, 2), - PRIMARY KEY (asset_id) -); - --- 24. Asset Allocation -CREATE TABLE AssetAllocation ( - allocation_id INT NOT NULL AUTO_INCREMENT, - employee_id INT NOT NULL, - asset_id INT NOT NULL, - allocation_date DATE, - PRIMARY KEY (allocation_id), - FOREIGN KEY (employee_id) REFERENCES Employees(employee_id), - FOREIGN KEY (asset_id) REFERENCES CompanyAssets(asset_id) -); - --- 25. Customer Feedback -CREATE TABLE CustomerFeedback ( - feedback_id INT NOT NULL AUTO_INCREMENT, - client_id INT NOT NULL, - feedback_text TEXT, - feedback_date DATE, - PRIMARY KEY (feedback_id), - FOREIGN KEY (client_id) REFERENCES Clients(client_id) -); - --- 26. Marketing Campaigns -CREATE TABLE MarketingCampaigns ( - campaign_id INT NOT NULL AUTO_INCREMENT, - campaign_name VARCHAR(100) NOT NULL, - start_date DATE, - end_date DATE, - budget DECIMAL(10, 2), - PRIMARY KEY (campaign_id) -); - --- 27. Campaign Performance -CREATE TABLE CampaignPerformance ( - performance_id INT NOT NULL AUTO_INCREMENT, - campaign_id INT NOT NULL, - performance_metric VARCHAR(100), - value DECIMAL(10, 2), - PRIMARY KEY (performance_id), - FOREIGN KEY (campaign_id) REFERENCES MarketingCampaigns(campaign_id) -); - --- 28. Contracts -CREATE TABLE Contracts ( - contract_id INT NOT NULL AUTO_INCREMENT, - client_id INT NOT NULL, - start_date DATE, - end_date DATE, - contract_value DECIMAL(10, 2), - PRIMARY KEY (contract_id), - FOREIGN KEY (client_id) REFERENCES Clients(client_id) -); - --- 29. Audit Logs -CREATE TABLE AuditLogs ( - log_id INT NOT NULL AUTO_INCREMENT, - action VARCHAR(100), - timestamp DATETIME, - employee_id INT NOT NULL, - PRIMARY KEY (log_id), - FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) -); - --- 30. Risk Management -CREATE TABLE RiskManagement ( - risk_id INT NOT NULL AUTO_INCREMENT, - description TEXT, - assessment_date DATE, - risk_level ENUM('Low', 'Medium', 'High'), - PRIMARY KEY (risk_id) -); - --- 31. Risk Mitigation -CREATE TABLE RiskMitigation ( - mitigation_id INT NOT NULL AUTO_INCREMENT, - risk_id INT NOT NULL, - action_taken TEXT, - implementation_date DATE, - PRIMARY KEY (mitigation_id), - FOREIGN KEY (risk_id) REFERENCES RiskManagement(risk_id) -); - --- 32. Business Continuity Plans -CREATE TABLE BusinessContinuityPlans ( - plan_id INT NOT NULL AUTO_INCREMENT, - plan_name VARCHAR(100) NOT NULL, - created_date DATE, - PRIMARY KEY (plan_id) -); - --- 33. Plan Testing -CREATE TABLE PlanTesting ( - test_id INT NOT NULL AUTO_INCREMENT, - plan_id INT NOT NULL, - test_date DATE, - results TEXT, - PRIMARY KEY (test_id), - FOREIGN KEY (plan_id) REFERENCES BusinessContinuityPlans(plan_id) -); - --- 34. Social Media Accounts -CREATE TABLE SocialMediaAccounts ( - account_id INT NOT NULL AUTO_INCREMENT, - platform VARCHAR(50), - handle VARCHAR(100), - PRIMARY KEY (account_id) -); - --- 35. Social Media Posts -CREATE TABLE SocialMediaPosts ( - post_id INT NOT NULL AUTO_INCREMENT, - account_id INT NOT NULL, - content TEXT, - post_date DATE, - PRIMARY KEY (post_id), - FOREIGN KEY (account_id) REFERENCES SocialMediaAccounts(account_id) -); - --- 36. Supplier Contracts -CREATE TABLE SupplierContracts ( - contract_id INT NOT NULL AUTO_INCREMENT, - supplier_id INT NOT NULL, - start_date DATE, - end_date DATE, - contract_value DECIMAL(10, 2), - PRIMARY KEY (contract_id), - FOREIGN KEY (supplier_id) REFERENCES Suppliers(supplier_id) -); - --- 37. EventsVT -CREATE TABLE EventsVT ( - event_id INT NOT NULL AUTO_INCREMENT, - event_name VARCHAR(100), - event_date DATE, - location VARCHAR(100), - PRIMARY KEY (event_id) -); - --- 38. Event Participants -CREATE TABLE EventParticipants ( - participant_id INT NOT NULL AUTO_INCREMENT, - event_id INT NOT NULL, - employee_id INT NOT NULL, - PRIMARY KEY (participant_id), - FOREIGN KEY (event_id) REFERENCES EventsVT(event_id), - FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) -); - --- 39. Market Research -CREATE TABLE MarketResearch ( - research_id INT NOT NULL AUTO_INCREMENT, - research_topic VARCHAR(100), - findings TEXT, - research_date DATE, - PRIMARY KEY (research_id) -); - --- 40. Company Policies -CREATE TABLE CompanyPolicies ( - policy_id INT NOT NULL AUTO_INCREMENT, - policy_name VARCHAR(100), - description TEXT, - PRIMARY KEY (policy_id) -); - --- 41. Employee Complaints -CREATE TABLE EmployeeComplaints ( - complaint_id INT NOT NULL AUTO_INCREMENT, - employee_id INT NOT NULL, - complaint_text TEXT, - complaint_date DATE, - PRIMARY KEY (complaint_id), - FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) -); - --- 42. Employee Benefits -CREATE TABLE EmployeeBenefits ( - benefit_id INT NOT NULL AUTO_INCREMENT, - employee_id INT NOT NULL, - benefit_type VARCHAR(100), - PRIMARY KEY (benefit_id), - FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) -); - --- 43. User Accounts -CREATE TABLE UserAccounts ( - user_id INT NOT NULL AUTO_INCREMENT, - username VARCHAR(50) NOT NULL UNIQUE, - password_hash VARCHAR(255) NOT NULL, - employee_id INT, - PRIMARY KEY (user_id), - FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) -); - --- 44. Password Resets -CREATE TABLE PasswordResets ( - reset_id INT NOT NULL AUTO_INCREMENT, - user_id INT NOT NULL, - reset_date DATE, - PRIMARY KEY (reset_id), - FOREIGN KEY (user_id) REFERENCES UserAccounts(user_id) -); - --- 45. IT Assets -CREATE TABLE ITAssets ( - asset_id INT NOT NULL AUTO_INCREMENT, - asset_name VARCHAR(100), - purchase_date DATE, - value DECIMAL(10, 2), - PRIMARY KEY (asset_id) -); - --- 46. IT Support Tickets -CREATE TABLE ITSupportTickets ( - ticket_id INT NOT NULL AUTO_INCREMENT, - employee_id INT NOT NULL, - issue_description TEXT, - submission_date DATE, - status ENUM('Open', 'In Progress', 'Resolved'), - PRIMARY KEY (ticket_id), - FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) -); - --- 47. Vendor Management -CREATE TABLE VendorManagement ( - vendor_id INT NOT NULL AUTO_INCREMENT, - vendor_name VARCHAR(100), - contact_person VARCHAR(100), - phone VARCHAR(15), - email VARCHAR(100), - PRIMARY KEY (vendor_id) -); - --- 48. Purchase Orders -CREATE TABLE PurchaseOrders ( - order_id INT NOT NULL AUTO_INCREMENT, - supplier_id INT NOT NULL, - order_date DATE, - total_amount DECIMAL(10, 2), - PRIMARY KEY (order_id), - FOREIGN KEY (supplier_id) REFERENCES Suppliers(supplier_id) -); - --- 49. Sales -CREATE TABLE Sales ( - sale_id INT NOT NULL AUTO_INCREMENT, - product_id INT NOT NULL, - sale_date DATE, - quantity INT, - total_amount DECIMAL(10, 2), - PRIMARY KEY (sale_id), - FOREIGN KEY (product_id) REFERENCES Products(product_id) -); - --- 50. Sales Reports -CREATE TABLE SalesReports ( - report_id INT NOT NULL AUTO_INCREMENT, - report_date DATE, - total_sales DECIMAL(10, 2), - PRIMARY KEY (report_id) -); - --- 51. Financial Reports -CREATE TABLE FinancialReports ( - report_id INT NOT NULL AUTO_INCREMENT, - report_date DATE, - total_revenue DECIMAL(10, 2), - total_expenses DECIMAL(10, 2), - net_profit DECIMAL(10, 2), - PRIMARY KEY (report_id) -); - --- 52. Business Goals -CREATE TABLE BusinessGoals ( - goal_id INT NOT NULL AUTO_INCREMENT, - goal_description TEXT, - target_date DATE, - PRIMARY KEY (goal_id) -); - --- 53. Goal Progress -CREATE TABLE GoalProgress ( - progress_id INT NOT NULL AUTO_INCREMENT, - goal_id INT NOT NULL, - progress_percentage INT CHECK (progress_percentage BETWEEN 0 AND 100), - PRIMARY KEY (progress_id), - FOREIGN KEY (goal_id) REFERENCES BusinessGoals(goal_id) -); - --- 54. User Roles -CREATE TABLE UserRolesVT ( - role_id INT NOT NULL AUTO_INCREMENT, - role_name VARCHAR(100), - PRIMARY KEY (role_id) -); - --- 55. Role Assignments -CREATE TABLE RoleAssignments ( - assignment_id INT NOT NULL AUTO_INCREMENT, - user_id INT NOT NULL, - role_id INT NOT NULL, - PRIMARY KEY (assignment_id), - FOREIGN KEY (user_id) REFERENCES UserAccounts(user_id), - FOREIGN KEY (role_id) REFERENCES UserRolesVT(role_id) -); - --- 56. Feedback Forms -CREATE TABLE FeedbackForms ( - form_id INT NOT NULL AUTO_INCREMENT, - form_title VARCHAR(100), - submission_date DATE, - PRIMARY KEY (form_id) -); - --- 57. Feedback Responses -CREATE TABLE FeedbackResponses ( - response_id INT NOT NULL AUTO_INCREMENT, - form_id INT NOT NULL, - employee_id INT NOT NULL, - response_text TEXT, - PRIMARY KEY (response_id), - FOREIGN KEY (form_id) REFERENCES FeedbackForms(form_id), - FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) -); - --- 58. Document Management -CREATE TABLE DocumentManagement ( - document_id INT NOT NULL AUTO_INCREMENT, - document_name VARCHAR(100), - upload_date DATE, - employee_id INT, - PRIMARY KEY (document_id), - FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) -); - --- 59. Legal Documents -CREATE TABLE LegalDocuments ( - document_id INT NOT NULL AUTO_INCREMENT, - document_name VARCHAR(100), - upload_date DATE, - PRIMARY KEY (document_id) -); - --- 60. Compliance Audits -CREATE TABLE ComplianceAudits ( - audit_id INT NOT NULL AUTO_INCREMENT, - audit_date DATE, - findings TEXT, - PRIMARY KEY (audit_id) -); - --- 61. Audit Recommendations -CREATE TABLE AuditRecommendations ( - recommendation_id INT NOT NULL AUTO_INCREMENT, - audit_id INT NOT NULL, - recommendation_text TEXT, - PRIMARY KEY (recommendation_id), - FOREIGN KEY (audit_id) REFERENCES ComplianceAudits(audit_id) -); - --- 62. Tax Filings -CREATE TABLE TaxFilings ( - filing_id INT NOT NULL AUTO_INCREMENT, - filing_year INT NOT NULL, - amount DECIMAL(10, 2), - filing_date DATE, - PRIMARY KEY (filing_id) -); - --- 63. Payment Methods -CREATE TABLE PaymentMethods ( - method_id INT NOT NULL AUTO_INCREMENT, - method_name VARCHAR(100), - PRIMARY KEY (method_id) -); - --- 64. Payment Transactions -CREATE TABLE PaymentTransactions ( - transaction_id INT NOT NULL AUTO_INCREMENT, - method_id INT NOT NULL, - amount DECIMAL(10, 2), - transaction_date DATE, - PRIMARY KEY (transaction_id), - FOREIGN KEY (method_id) REFERENCES PaymentMethods(method_id) -); - --- 65. Business Units -CREATE TABLE BusinessUnits ( - unit_id INT NOT NULL AUTO_INCREMENT, - unit_name VARCHAR(100), - PRIMARY KEY (unit_id) -); - --- 66. Unit Budgets -CREATE TABLE UnitBudgets ( - budget_id INT NOT NULL AUTO_INCREMENT, - unit_id INT NOT NULL, - budget_amount DECIMAL(10, 2), - PRIMARY KEY (budget_id), - FOREIGN KEY (unit_id) REFERENCES BusinessUnits(unit_id) -); - --- 67. Strategic Initiatives -CREATE TABLE StrategicInitiatives ( - initiative_id INT NOT NULL AUTO_INCREMENT, - initiative_name VARCHAR(100), - description TEXT, - PRIMARY KEY (initiative_id) -); - --- 68. Initiative Progress -CREATE TABLE InitiativeProgress ( - progress_id INT NOT NULL AUTO_INCREMENT, - initiative_id INT NOT NULL, - progress_percentage INT CHECK (progress_percentage BETWEEN 0 AND 100), - PRIMARY KEY (progress_id), - FOREIGN KEY (initiative_id) REFERENCES StrategicInitiatives(initiative_id) -); - --- 69. Media Relations -CREATE TABLE MediaRelations ( - media_id INT NOT NULL AUTO_INCREMENT, - contact_name VARCHAR(100), - phone VARCHAR(15), - email VARCHAR(100), - PRIMARY KEY (media_id) -); - --- 70. Media EventsVT -CREATE TABLE MediaEventsVT ( - event_id INT NOT NULL AUTO_INCREMENT, - media_id INT NOT NULL, - event_name VARCHAR(100), - event_date DATE, - PRIMARY KEY (event_id), - FOREIGN KEY (media_id) REFERENCES MediaRelations(media_id) -); - --- 71. StakeholdersVT -CREATE TABLE StakeholdersVT ( - stakeholder_id INT NOT NULL AUTO_INCREMENT, - stakeholder_name VARCHAR(100), - contact_person VARCHAR(100), - phone VARCHAR(15), - email VARCHAR(100), - PRIMARY KEY (stakeholder_id) -); - --- 72. Stakeholder Engagement -CREATE TABLE StakeholderEngagement ( - engagement_id INT NOT NULL AUTO_INCREMENT, - stakeholder_id INT NOT NULL, - engagement_date DATE, - PRIMARY KEY (engagement_id), - FOREIGN KEY (stakeholder_id) REFERENCES StakeholdersVT(stakeholder_id) -); - --- 73. Procurement -CREATE TABLE Procurement ( - procurement_id INT NOT NULL AUTO_INCREMENT, - supplier_id INT NOT NULL, - procurement_date DATE, - total_amount DECIMAL(10, 2), - PRIMARY KEY (procurement_id), - FOREIGN KEY (supplier_id) REFERENCES Suppliers(supplier_id) -); - --- 74. Supplier Ratings -CREATE TABLE SupplierRatings ( - rating_id INT NOT NULL AUTO_INCREMENT, - supplier_id INT NOT NULL, - rating INT CHECK (rating BETWEEN 1 AND 5), - comments TEXT, - PRIMARY KEY (rating_id), - FOREIGN KEY (supplier_id) REFERENCES Suppliers(supplier_id) -); - --- 75. Company Vehicles -CREATE TABLE CompanyVehicles ( - vehicle_id INT NOT NULL AUTO_INCREMENT, - vehicle_name VARCHAR(100), - purchase_date DATE, - value DECIMAL(10, 2), - PRIMARY KEY (vehicle_id) -); - --- 76. Vehicle Maintenance -CREATE TABLE VehicleMaintenance ( - maintenance_id INT NOT NULL AUTO_INCREMENT, - vehicle_id INT NOT NULL, - maintenance_date DATE, - description TEXT, - PRIMARY KEY (maintenance_id), - FOREIGN KEY (vehicle_id) REFERENCES CompanyVehicles(vehicle_id) -); - --- 77. Office Locations -CREATE TABLE OfficeLocations ( - location_id INT NOT NULL AUTO_INCREMENT, - address VARCHAR(255), - city VARCHAR(100), - state VARCHAR(100), - zip VARCHAR(10), - PRIMARY KEY (location_id) -); - --- 78. Office Resources -CREATE TABLE OfficeResources ( - resource_id INT NOT NULL AUTO_INCREMENT, - location_id INT NOT NULL, - resource_name VARCHAR(100), - quantity INT, - PRIMARY KEY (resource_id), - FOREIGN KEY (location_id) REFERENCES OfficeLocations(location_id) -); - --- 79. Employee Relocation -CREATE TABLE EmployeeRelocation ( - relocation_id INT NOT NULL AUTO_INCREMENT, - employee_id INT NOT NULL, - new_location_id INT NOT NULL, - relocation_date DATE, - PRIMARY KEY (relocation_id), - FOREIGN KEY (employee_id) REFERENCES Employees(employee_id), - FOREIGN KEY (new_location_id) REFERENCES OfficeLocations(location_id) -); - --- 80. Technology Stack -CREATE TABLE TechStack ( - tech_id INT NOT NULL AUTO_INCREMENT, - tech_name VARCHAR(100), - PRIMARY KEY (tech_id) -); - --- 81. Technology Usage -CREATE TABLE TechnologyUsage ( - usage_id INT NOT NULL AUTO_INCREMENT, - tech_id INT NOT NULL, - employee_id INT NOT NULL, - usage_date DATE, - PRIMARY KEY (usage_id), - FOREIGN KEY (tech_id) REFERENCES TechStack(tech_id), - FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) -); - --- 82. Community Engagement -CREATE TABLE CommunityEngagement ( - engagement_id INT NOT NULL AUTO_INCREMENT, - engagement_name VARCHAR(100), - engagement_date DATE, - PRIMARY KEY (engagement_id) -); - --- 83. Sponsorships -CREATE TABLE Sponsorships ( - sponsorship_id INT NOT NULL AUTO_INCREMENT, - engagement_id INT NOT NULL, - amount DECIMAL(10, 2), - PRIMARY KEY (sponsorship_id), - FOREIGN KEY (engagement_id) REFERENCES CommunityEngagement(engagement_id) -); - --- 84. Employee Surveys -CREATE TABLE EmployeeSurveys ( - survey_id INT NOT NULL AUTO_INCREMENT, - survey_title VARCHAR(100), - submission_date DATE, - PRIMARY KEY (survey_id) -); - --- 85. Survey Responses -CREATE TABLE SurveyRes ( - response_id INT NOT NULL AUTO_INCREMENT, - survey_id INT NOT NULL, - employee_id INT NOT NULL, - response_text TEXT, - PRIMARY KEY (response_id), - FOREIGN KEY (survey_id) REFERENCES EmployeeSurveys(survey_id), - FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) -); - --- 86. Disaster Recovery Plans -CREATE TABLE DisasterRecoveryPlans ( - plan_id INT NOT NULL AUTO_INCREMENT, - plan_name VARCHAR(100), - created_date DATE, - PRIMARY KEY (plan_id) -); - --- 87. Plan Implementation -CREATE TABLE PlanImplementation ( - implementation_id INT NOT NULL AUTO_INCREMENT, - plan_id INT NOT NULL, - implementation_date DATE, - PRIMARY KEY (implementation_id), - FOREIGN KEY (plan_id) REFERENCES DisasterRecoveryPlans(plan_id) -); - --- 88. Operational Metrics -CREATE TABLE OperationalMetrics ( - metric_id INT NOT NULL AUTO_INCREMENT, - metric_name VARCHAR(100), - value DECIMAL(10, 2), - measurement_date DATE, - PRIMARY KEY (metric_id) -); - --- 89. Technology Updates -CREATE TABLE TechnologyUpdates ( - update_id INT NOT NULL AUTO_INCREMENT, - tech_id INT NOT NULL, - update_date DATE, - description TEXT, - PRIMARY KEY (update_id), - FOREIGN KEY (tech_id) REFERENCES TechStack(tech_id) -); - --- 90. Crisis Management -CREATE TABLE CrisisManagement ( - crisis_id INT NOT NULL AUTO_INCREMENT, - crisis_description TEXT, - response_plan TEXT, - PRIMARY KEY (crisis_id) -); - --- 91. Crisis Response -CREATE TABLE CrisisResponse ( - response_id INT NOT NULL AUTO_INCREMENT, - crisis_id INT NOT NULL, - response_date DATE, - PRIMARY KEY (response_id), - FOREIGN KEY (crisis_id) REFERENCES CrisisManagement(crisis_id) -); - --- 92. Company EventsVT -CREATE TABLE CompanyEventsVT ( - event_id INT NOT NULL AUTO_INCREMENT, - event_name VARCHAR(100), - event_date DATE, - PRIMARY KEY (event_id) -); - --- 93. Event Coordination -CREATE TABLE EventCoordination ( - coordination_id INT NOT NULL AUTO_INCREMENT, - event_id INT NOT NULL, - employee_id INT NOT NULL, - PRIMARY KEY (coordination_id), - FOREIGN KEY (event_id) REFERENCES CompanyEventsVT(event_id), - FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) -); - --- 94. Sales Strategies -CREATE TABLE SalesStrategies ( - strategy_id INT NOT NULL AUTO_INCREMENT, - strategy_description TEXT, - PRIMARY KEY (strategy_id) -); - --- 95. Strategy Implementation -CREATE TABLE StrategyImplementation ( - implementation_id INT NOT NULL AUTO_INCREMENT, - strategy_id INT NOT NULL, - implementation_date DATE, - PRIMARY KEY (implementation_id), - FOREIGN KEY (strategy_id) REFERENCES SalesStrategies(strategy_id) -); - --- 96. Employee Onboarding -CREATE TABLE EmployeeOnboarding ( - onboarding_id INT NOT NULL AUTO_INCREMENT, - employee_id INT NOT NULL, - onboarding_date DATE, - PRIMARY KEY (onboarding_id), - FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) -); - --- 97. Employee Offboarding -CREATE TABLE EmployeeOffboarding ( - offboarding_id INT NOT NULL AUTO_INCREMENT, - employee_id INT NOT NULL, - offboarding_date DATE, - PRIMARY KEY (offboarding_id), - FOREIGN KEY (employee_id) REFERENCES Employees(employee_id) -); - --- 98. Health and Safety -CREATE TABLE HealthAndSafety ( - safety_id INT NOT NULL AUTO_INCREMENT, - safety_description TEXT, - inspection_date DATE, - PRIMARY KEY (safety_id) -); - --- 99. Incident Reports -CREATE TABLE IncRepo ( - report_id INT NOT NULL AUTO_INCREMENT, - incident_description TEXT, - report_date DATE, - PRIMARY KEY (report_id) -); - --- 100. Security Incidents -CREATE TABLE SecurityIncidents ( - incident_id INT NOT NULL AUTO_INCREMENT, - incident_description TEXT, - incident_date DATE, - PRIMARY KEY (incident_id) -); - --- 1. Students -CREATE TABLE Students ( - student_id INT NOT NULL AUTO_INCREMENT, - first_name VARCHAR(50) NOT NULL, - last_name VARCHAR(50) NOT NULL, - email VARCHAR(100) UNIQUE NOT NULL, - date_of_birth DATE, - enrollment_date DATE, - PRIMARY KEY (student_id) -); - --- 2. Courses -CREATE TABLE Courses ( - course_id INT NOT NULL AUTO_INCREMENT, - course_name VARCHAR(100) NOT NULL, - course_description TEXT, - credits INT NOT NULL, - PRIMARY KEY (course_id) -); - --- 3. Instructors -CREATE TABLE Instructors ( - instructor_id INT NOT NULL AUTO_INCREMENT, - first_name VARCHAR(50) NOT NULL, - last_name VARCHAR(50) NOT NULL, - email VARCHAR(100) UNIQUE NOT NULL, - hire_date DATE, - PRIMARY KEY (instructor_id) -); - --- 4. Dept -CREATE TABLE Dept ( - department_id INT NOT NULL AUTO_INCREMENT, - department_name VARCHAR(100) NOT NULL, - PRIMARY KEY (department_id) -); - --- 5. Enrollments -CREATE TABLE Enrollments ( - enrollment_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - course_id INT NOT NULL, - enrollment_date DATE, - grade FLOAT, - PRIMARY KEY (enrollment_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) ON DELETE CASCADE, - FOREIGN KEY (course_id) REFERENCES Courses(course_id) ON DELETE CASCADE -); - --- 6. Classes -CREATE TABLE Classes ( - class_id INT NOT NULL AUTO_INCREMENT, - course_id INT NOT NULL, - instructor_id INT NOT NULL, - semester VARCHAR(20), - year INT, - PRIMARY KEY (class_id), - FOREIGN KEY (course_id) REFERENCES Courses(course_id), - FOREIGN KEY (instructor_id) REFERENCES Instructors(instructor_id) -); - --- 7. Assignments -CREATE TABLE Assignments ( - assignment_id INT NOT NULL AUTO_INCREMENT, - class_id INT NOT NULL, - assignment_title VARCHAR(100) NOT NULL, - due_date DATE, - PRIMARY KEY (assignment_id), - FOREIGN KEY (class_id) REFERENCES Classes(class_id) -); - --- 8. Grades -CREATE TABLE Grades ( - grade_id INT NOT NULL AUTO_INCREMENT, - enrollment_id INT NOT NULL, - assignment_id INT NOT NULL, - score FLOAT, - PRIMARY KEY (grade_id), - FOREIGN KEY (enrollment_id) REFERENCES Enrollments(enrollment_id), - FOREIGN KEY (assignment_id) REFERENCES Assignments(assignment_id) -); - --- 9. AttendanceVT -CREATE TABLE AttendanceVT ( - AttendanceVT_id INT NOT NULL AUTO_INCREMENT, - class_id INT NOT NULL, - student_id INT NOT NULL, - AttendanceVT_date DATE, - status ENUM('Present', 'Absent') NOT NULL, - PRIMARY KEY (AttendanceVT_id), - FOREIGN KEY (class_id) REFERENCES Classes(class_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 10. Extracurricular Activities -CREATE TABLE Extracurriculars ( - activity_id INT NOT NULL AUTO_INCREMENT, - activity_name VARCHAR(100) NOT NULL, - description TEXT, - PRIMARY KEY (activity_id) -); - --- 11. Student Activities -CREATE TABLE StudentActivities ( - student_activity_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - activity_id INT NOT NULL, - position VARCHAR(50), - PRIMARY KEY (student_activity_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id), - FOREIGN KEY (activity_id) REFERENCES Extracurriculars(activity_id) -); - --- 12. Course Prerequisites -CREATE TABLE CoursePrerequisites ( - course_id INT NOT NULL, - prerequisite_course_id INT NOT NULL, - PRIMARY KEY (course_id, prerequisite_course_id), - FOREIGN KEY (course_id) REFERENCES Courses(course_id), - FOREIGN KEY (prerequisite_course_id) REFERENCES Courses(course_id) -); - --- 13. Course Materials -CREATE TABLE CourseMaterials ( - material_id INT NOT NULL AUTO_INCREMENT, - course_id INT NOT NULL, - material_type ENUM('Textbook', 'Article', 'Video', 'Other') NOT NULL, - material_link VARCHAR(255), - PRIMARY KEY (material_id), - FOREIGN KEY (course_id) REFERENCES Courses(course_id) -); - --- 14. VTEvents -CREATE TABLE VTEvents ( - event_id INT NOT NULL AUTO_INCREMENT, - event_name VARCHAR(100) NOT NULL, - event_date DATE, - location VARCHAR(255), - PRIMARY KEY (event_id) -); - --- 15. Event Participation -CREATE TABLE EventParticipation ( - participation_id INT NOT NULL AUTO_INCREMENT, - event_id INT NOT NULL, - student_id INT NOT NULL, - PRIMARY KEY (participation_id), - FOREIGN KEY (event_id) REFERENCES VTEvents(event_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 16. Library -CREATE TABLE Library ( - book_id INT NOT NULL AUTO_INCREMENT, - title VARCHAR(255) NOT NULL, - author VARCHAR(100), - published_year INT, - available_copies INT, - PRIMARY KEY (book_id) -); - --- 17. Book Loans -CREATE TABLE BookLoans ( - loan_id INT NOT NULL AUTO_INCREMENT, - book_id INT NOT NULL, - student_id INT NOT NULL, - loan_date DATE, - return_date DATE, - PRIMARY KEY (loan_id), - FOREIGN KEY (book_id) REFERENCES Library(book_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 18. Scholarships -CREATE TABLE Scholarships ( - scholarship_id INT NOT NULL AUTO_INCREMENT, - scholarship_name VARCHAR(100) NOT NULL, - amount DECIMAL(10, 2) NOT NULL, - eligibility_criteria TEXT, - PRIMARY KEY (scholarship_id) -); - --- 19. Student Scholarships -CREATE TABLE StudentScholarships ( - student_scholarship_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - scholarship_id INT NOT NULL, - awarded_date DATE, - PRIMARY KEY (student_scholarship_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id), - FOREIGN KEY (scholarship_id) REFERENCES Scholarships(scholarship_id) -); - --- 20. Financial Aid -CREATE TABLE FinancialAidEdu ( - aid_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - aid_amount DECIMAL(10, 2), - aid_type ENUM('Grant', 'Loan', 'Work-Study') NOT NULL, - awarded_date DATE, - PRIMARY KEY (aid_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 21. Tuition Fees -CREATE TABLE TuitionFees ( - fee_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - amount DECIMAL(10, 2) NOT NULL, - due_date DATE, - paid_date DATE, - PRIMARY KEY (fee_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 22. Staff -CREATE TABLE Staff ( - staff_id INT NOT NULL AUTO_INCREMENT, - first_name VARCHAR(50) NOT NULL, - last_name VARCHAR(50) NOT NULL, - email VARCHAR(100) UNIQUE NOT NULL, - hire_date DATE, - PRIMARY KEY (staff_id) -); - --- 23. Staff Roles -CREATE TABLE StaffRoles ( - role_id INT NOT NULL AUTO_INCREMENT, - role_name VARCHAR(100) NOT NULL, - PRIMARY KEY (role_id) -); - --- 24. Staff Assignments -CREATE TABLE StaffAssignments ( - assignment_id INT NOT NULL AUTO_INCREMENT, - staff_id INT NOT NULL, - role_id INT NOT NULL, - assigned_date DATE, - PRIMARY KEY (assignment_id), - FOREIGN KEY (staff_id) REFERENCES Staff(staff_id), - FOREIGN KEY (role_id) REFERENCES StaffRoles(role_id) -); - --- 25. Feedback2 -CREATE TABLE Feedback2 ( - feedback_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - feedback_text TEXT, - feedback_date DATE, - PRIMARY KEY (feedback_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 26. Course Feedback2 -CREATE TABLE CourseFeedback ( - course_feedback_id INT NOT NULL AUTO_INCREMENT, - course_id INT NOT NULL, - student_id INT NOT NULL, - feedback_text TEXT, - feedback_date DATE, - PRIMARY KEY (course_feedback_id), - FOREIGN KEY (course_id) REFERENCES Courses(course_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 27. Study Groups -CREATE TABLE StudyGroups ( - group_id INT NOT NULL AUTO_INCREMENT, - group_name VARCHAR(100) NOT NULL, - created_date DATE, - PRIMARY KEY (group_id) -); - --- 28. Group Members -CREATE TABLE GroupMembers ( - group_member_id INT NOT NULL AUTO_INCREMENT, - group_id INT NOT NULL, - student_id INT NOT NULL, - PRIMARY KEY (group_member_id), - FOREIGN KEY (group_id) REFERENCES StudyGroups(group_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 29. Tutoring Sessions -CREATE TABLE TutoringSessions ( - session_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - student_id INT NOT NULL, - session_date DATE, - session_time TIME, - PRIMARY KEY (session_id), - FOREIGN KEY (tutor_id) REFERENCES Instructors(instructor_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 30. Faculty Meetings -CREATE TABLE FacultyMeetings ( - meeting_id INT NOT NULL AUTO_INCREMENT, - meeting_date DATE, - agenda TEXT, - PRIMARY KEY (meeting_id) -); - --- 31. Meeting AttendanceVT -CREATE TABLE MeetingAttendanceVT ( - AttendanceVT_id INT NOT NULL AUTO_INCREMENT, - meeting_id INT NOT NULL, - instructor_id INT NOT NULL, - PRIMARY KEY (AttendanceVT_id), - FOREIGN KEY (meeting_id) REFERENCES FacultyMeetings(meeting_id), - FOREIGN KEY (instructor_id) REFERENCES Instructors(instructor_id) -); - --- 32. Scholarships Offered -CREATE TABLE ScholarshipsOffered ( - scholarship_offered_id INT NOT NULL AUTO_INCREMENT, - scholarship_id INT NOT NULL, - department_id INT NOT NULL, - PRIMARY KEY (scholarship_offered_id), - FOREIGN KEY (scholarship_id) REFERENCES Scholarships(scholarship_id), - FOREIGN KEY (department_id) REFERENCES Dept(department_id) -); - --- 33. Internship Opportunities -CREATE TABLE Internships ( - internship_id INT NOT NULL AUTO_INCREMENT, - company_name VARCHAR(100) NOT NULL, - position VARCHAR(100) NOT NULL, - application_deadline DATE, - PRIMARY KEY (internship_id) -); - --- 34. Student Internships -CREATE TABLE StudentInternships ( - student_internship_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - internship_id INT NOT NULL, - PRIMARY KEY (student_internship_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id), - FOREIGN KEY (internship_id) REFERENCES Internships(internship_id) -); - --- 35. VTEvents Coordination -CREATE TABLE EventCoordinationTwo ( - coordination_id INT NOT NULL AUTO_INCREMENT, - event_id INT NOT NULL, - staff_id INT NOT NULL, - PRIMARY KEY (coordination_id), - FOREIGN KEY (event_id) REFERENCES VTEvents(event_id), - FOREIGN KEY (staff_id) REFERENCES Staff(staff_id) -); - --- 36. Awards -CREATE TABLE Awards ( - award_id INT NOT NULL AUTO_INCREMENT, - award_name VARCHAR(100) NOT NULL, - description TEXT, - PRIMARY KEY (award_id) -); - --- 37. Student Awards -CREATE TABLE StudentAwards ( - student_award_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - award_id INT NOT NULL, - awarded_date DATE, - PRIMARY KEY (student_award_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id), - FOREIGN KEY (award_id) REFERENCES Awards(award_id) -); - --- 38. Research Projects -CREATE TABLE ResearchProjects ( - project_id INT NOT NULL AUTO_INCREMENT, - project_title VARCHAR(100) NOT NULL, - faculty_id INT NOT NULL, - description TEXT, - PRIMARY KEY (project_id), - FOREIGN KEY (faculty_id) REFERENCES Instructors(instructor_id) -); - --- 39. Project Participants -CREATE TABLE ProjectParticipants ( - participant_id INT NOT NULL AUTO_INCREMENT, - project_id INT NOT NULL, - student_id INT NOT NULL, - PRIMARY KEY (participant_id), - FOREIGN KEY (project_id) REFERENCES ResearchProjects(project_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 40. Course Schedules -CREATE TABLE CourseSchedules ( - schedule_id INT NOT NULL AUTO_INCREMENT, - course_id INT NOT NULL, - class_id INT NOT NULL, - schedule_date DATE, - start_time TIME, - end_time TIME, - PRIMARY KEY (schedule_id), - FOREIGN KEY (course_id) REFERENCES Courses(course_id), - FOREIGN KEY (class_id) REFERENCES Classes(class_id) -); - --- 41. Classroom Resources -CREATE TABLE ClassroomResources ( - resource_id INT NOT NULL AUTO_INCREMENT, - class_id INT NOT NULL, - resource_type VARCHAR(100), - resource_description TEXT, - PRIMARY KEY (resource_id), - FOREIGN KEY (class_id) REFERENCES Classes(class_id) -); - --- 42. Academic Calendar -CREATE TABLE AcademicCalendar ( - year INT NOT NULL, - semester VARCHAR(20) NOT NULL, - start_date DATE, - end_date DATE, - PRIMARY KEY (year, semester) -); - --- 43. Academic Policies -CREATE TABLE AcademicPolicies ( - policy_id INT NOT NULL AUTO_INCREMENT, - policy_title VARCHAR(100) NOT NULL, - description TEXT, - PRIMARY KEY (policy_id) -); - --- 44. Policy Updates -CREATE TABLE PolicyUpdates ( - update_id INT NOT NULL AUTO_INCREMENT, - policy_id INT NOT NULL, - update_date DATE, - PRIMARY KEY (update_id), - FOREIGN KEY (policy_id) REFERENCES AcademicPolicies(policy_id) -); - --- 45. Notify -CREATE TABLE Notify ( - notification_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - message TEXT, - notification_date DATE, - PRIMARY KEY (notification_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 46. Parent Information -CREATE TABLE Parents ( - parent_id INT NOT NULL AUTO_INCREMENT, - first_name VARCHAR(50), - last_name VARCHAR(50), - email VARCHAR(100) UNIQUE, - phone VARCHAR(15), - PRIMARY KEY (parent_id) -); - --- 47. Student Parents -CREATE TABLE StudentParents ( - student_parent_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - parent_id INT NOT NULL, - PRIMARY KEY (student_parent_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id), - FOREIGN KEY (parent_id) REFERENCES Parents(parent_id) -); - --- 48. Health Records -CREATE TABLE HealthRecords ( - record_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - record_date DATE, - details TEXT, - PRIMARY KEY (record_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 49. Student Rights -CREATE TABLE StudentRights ( - right_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - description TEXT, - PRIMARY KEY (right_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 50. Counseling Sessions -CREATE TABLE CounselingSessions ( - session_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - counselor_id INT NOT NULL, - session_date DATE, - notes TEXT, - PRIMARY KEY (session_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id), - FOREIGN KEY (counselor_id) REFERENCES Instructors(instructor_id) -); - --- Additional tables can continue in a similar manner to reach 100. --- Here are more examples to fill up to 100 tables. - --- 51. Academic Advising -CREATE TABLE AcademicAdvising ( - advising_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - advisor_id INT NOT NULL, - advising_date DATE, - PRIMARY KEY (advising_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id), - FOREIGN KEY (advisor_id) REFERENCES Instructors(instructor_id) -); - --- 52. Course Evaluations -CREATE TABLE CourseEvaluations ( - evaluation_id INT NOT NULL AUTO_INCREMENT, - course_id INT NOT NULL, - student_id INT NOT NULL, - rating INT CHECK (rating BETWEEN 1 AND 5), - comments TEXT, - PRIMARY KEY (evaluation_id), - FOREIGN KEY (course_id) REFERENCES Courses(course_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 53. Academic Honors -CREATE TABLE AcademicHonors ( - honor_id INT NOT NULL AUTO_INCREMENT, - honor_name VARCHAR(100) NOT NULL, - criteria TEXT, - PRIMARY KEY (honor_id) -); - --- 54. Student Honors -CREATE TABLE StudentHonors ( - student_honor_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - honor_id INT NOT NULL, - awarded_date DATE, - PRIMARY KEY (student_honor_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id), - FOREIGN KEY (honor_id) REFERENCES AcademicHonors(honor_id) -); - --- 55. Learning Management System Accounts -CREATE TABLE LMSAccounts ( - lms_account_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - username VARCHAR(50) NOT NULL, - password_hash VARCHAR(255) NOT NULL, - PRIMARY KEY (lms_account_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 56. Discussion Boards -CREATE TABLE DiscussionBoards ( - board_id INT NOT NULL AUTO_INCREMENT, - course_id INT NOT NULL, - title VARCHAR(100) NOT NULL, - created_date DATE, - PRIMARY KEY (board_id), - FOREIGN KEY (course_id) REFERENCES Courses(course_id) -); - --- 57. Discussion Posts -CREATE TABLE DiscussionPosts ( - post_id INT NOT NULL AUTO_INCREMENT, - board_id INT NOT NULL, - student_id INT NOT NULL, - content TEXT, - post_date DATE, - PRIMARY KEY (post_id), - FOREIGN KEY (board_id) REFERENCES DiscussionBoards(board_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 58. Course Forums -CREATE TABLE CourseForums ( - forum_id INT NOT NULL AUTO_INCREMENT, - course_id INT NOT NULL, - title VARCHAR(100) NOT NULL, - created_date DATE, - PRIMARY KEY (forum_id), - FOREIGN KEY (course_id) REFERENCES Courses(course_id) -); - --- 59. Forum Responses -CREATE TABLE ForumResponses ( - response_id INT NOT NULL AUTO_INCREMENT, - forum_id INT NOT NULL, - student_id INT NOT NULL, - content TEXT, - response_date DATE, - PRIMARY KEY (response_id), - FOREIGN KEY (forum_id) REFERENCES CourseForums(forum_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 60. Online Resources -CREATE TABLE OnlineResources ( - resource_id INT NOT NULL AUTO_INCREMENT, - course_id INT NOT NULL, - resource_link VARCHAR(255), - PRIMARY KEY (resource_id), - FOREIGN KEY (course_id) REFERENCES Courses(course_id) -); - --- 61. Laboratory Equipment -CREATE TABLE LaboratoryEquipment ( - equipment_id INT NOT NULL AUTO_INCREMENT, - equipment_name VARCHAR(100) NOT NULL, - equipment_description TEXT, - available_units INT, - PRIMARY KEY (equipment_id) -); - --- 62. Lab Reservations -CREATE TABLE LabReservations ( - reservation_id INT NOT NULL AUTO_INCREMENT, - equipment_id INT NOT NULL, - student_id INT NOT NULL, - reservation_date DATE, - PRIMARY KEY (reservation_id), - FOREIGN KEY (equipment_id) REFERENCES LaboratoryEquipment(equipment_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 63. Course Announcements -CREATE TABLE CourseAnnouncements ( - announcement_id INT NOT NULL AUTO_INCREMENT, - course_id INT NOT NULL, - announcement_text TEXT, - announcement_date DATE, - PRIMARY KEY (announcement_id), - FOREIGN KEY (course_id) REFERENCES Courses(course_id) -); - --- 64. Course Subscriptions -CREATE TABLE CourseSubscriptions ( - subscription_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - course_id INT NOT NULL, - subscription_date DATE, - PRIMARY KEY (subscription_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id), - FOREIGN KEY (course_id) REFERENCES Courses(course_id) -); - --- 65. Volunteer Opportunities -CREATE TABLE VolunteerOpportunities ( - opportunity_id INT NOT NULL AUTO_INCREMENT, - opportunity_title VARCHAR(100) NOT NULL, - description TEXT, - PRIMARY KEY (opportunity_id) -); - --- 66. Student Volunteers -CREATE TABLE StudentVolunteers ( - student_volunteer_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - opportunity_id INT NOT NULL, - PRIMARY KEY (student_volunteer_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id), - FOREIGN KEY (opportunity_id) REFERENCES VolunteerOpportunities(opportunity_id) -); - --- 67. Facility Reservations -CREATE TABLE FacilityReservations ( - reservation_id INT NOT NULL AUTO_INCREMENT, - facility_name VARCHAR(100) NOT NULL, - reserved_by INT NOT NULL, - reservation_date DATE, - PRIMARY KEY (reservation_id), - FOREIGN KEY (reserved_by) REFERENCES Staff(staff_id) -); - --- 68. Conference Participation -CREATE TABLE ConferenceParticipation ( - participation_id INT NOT NULL AUTO_INCREMENT, - conference_name VARCHAR(100) NOT NULL, - student_id INT NOT NULL, - date_of_conference DATE, - PRIMARY KEY (participation_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 69. International Students -CREATE TABLE InternationalStudents ( - international_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - country_of_origin VARCHAR(100), - visa_status VARCHAR(100), - PRIMARY KEY (international_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 70. Mentor-Mentee Relationships -CREATE TABLE MentorMentee ( - relationship_id INT NOT NULL AUTO_INCREMENT, - mentor_id INT NOT NULL, - mentee_id INT NOT NULL, - start_date DATE, - PRIMARY KEY (relationship_id), - FOREIGN KEY (mentor_id) REFERENCES Instructors(instructor_id), - FOREIGN KEY (mentee_id) REFERENCES Students(student_id) -); - --- 71. Career Services -CREATE TABLE CareerServices ( - service_id INT NOT NULL AUTO_INCREMENT, - service_name VARCHAR(100) NOT NULL, - description TEXT, - PRIMARY KEY (service_id) -); - --- 72. Career Appointments -CREATE TABLE CareerAppointments ( - appointment_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - service_id INT NOT NULL, - appointment_date DATE, - PRIMARY KEY (appointment_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id), - FOREIGN KEY (service_id) REFERENCES CareerServices(service_id) -); - --- 73. Alumni -CREATE TABLE Alumni ( - alumni_id INT NOT NULL AUTO_INCREMENT, - first_name VARCHAR(50) NOT NULL, - last_name VARCHAR(50) NOT NULL, - graduation_year INT, - PRIMARY KEY (alumni_id) -); - --- 74. Alumni Activities -CREATE TABLE AlumniActivities ( - activity_id INT NOT NULL AUTO_INCREMENT, - alumni_id INT NOT NULL, - activity_name VARCHAR(100), - activity_date DATE, - PRIMARY KEY (activity_id), - FOREIGN KEY (alumni_id) REFERENCES Alumni(alumni_id) -); - --- 75. Campus Facilities -CREATE TABLE CampusFacilities ( - facility_id INT NOT NULL AUTO_INCREMENT, - facility_name VARCHAR(100) NOT NULL, - facility_description TEXT, - PRIMARY KEY (facility_id) -); - --- 76. Facility Usage -CREATE TABLE FacilityUsage ( - usage_id INT NOT NULL AUTO_INCREMENT, - facility_id INT NOT NULL, - usage_date DATE, - PRIMARY KEY (usage_id), - FOREIGN KEY (facility_id) REFERENCES CampusFacilities(facility_id) -); - --- 77. Campus VTEvents -CREATE TABLE CampusVTEvents ( - campus_event_id INT NOT NULL AUTO_INCREMENT, - event_name VARCHAR(100) NOT NULL, - event_date DATE, - PRIMARY KEY (campus_event_id) -); - --- 78. Campus Organizations -CREATE TABLE CampusOrganizations ( - organization_id INT NOT NULL AUTO_INCREMENT, - organization_name VARCHAR(100) NOT NULL, - description TEXT, - PRIMARY KEY (organization_id) -); - --- 79. Organization Membership -CREATE TABLE OrganizationMembership ( - membership_id INT NOT NULL AUTO_INCREMENT, - organization_id INT NOT NULL, - student_id INT NOT NULL, - PRIMARY KEY (membership_id), - FOREIGN KEY (organization_id) REFERENCES CampusOrganizations(organization_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 80. Campus Surveys -CREATE TABLE CampusSurveys ( - survey_id INT NOT NULL AUTO_INCREMENT, - survey_name VARCHAR(100) NOT NULL, - created_date DATE, - PRIMARY KEY (survey_id) -); - --- 81. Survey Responses -CREATE TABLE SurveyResponsesEdu ( - response_id INT NOT NULL AUTO_INCREMENT, - survey_id INT NOT NULL, - student_id INT NOT NULL, - response_text TEXT, - PRIMARY KEY (response_id), - FOREIGN KEY (survey_id) REFERENCES CampusSurveys(survey_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 82. Social Media Engagement -CREATE TABLE SocialMediaEngagement ( - engagement_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - platform VARCHAR(100) NOT NULL, - engagement_date DATE, - PRIMARY KEY (engagement_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 83. Transportation Services -CREATE TABLE TransportationServices ( - transport_service_id INT NOT NULL AUTO_INCREMENT, - service_name VARCHAR(100) NOT NULL, - description TEXT, - PRIMARY KEY (transport_service_id) -); - --- 84. Transportation Usage -CREATE TABLE TransportationUsage ( - usage_id INT NOT NULL AUTO_INCREMENT, - transport_service_id INT NOT NULL, - student_id INT NOT NULL, - usage_date DATE, - PRIMARY KEY (usage_id), - FOREIGN KEY (transport_service_id) REFERENCES TransportationServices(transport_service_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 85. Community Service -CREATE TABLE CommunityService ( - service_id INT NOT NULL AUTO_INCREMENT, - service_name VARCHAR(100) NOT NULL, - description TEXT, - PRIMARY KEY (service_id) -); - --- 86. Student Community Service -CREATE TABLE StudentCommunityService ( - student_service_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - service_id INT NOT NULL, - PRIMARY KEY (student_service_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id), - FOREIGN KEY (service_id) REFERENCES CommunityService(service_id) -); - --- 87. Student Health Services -CREATE TABLE StudentHealthServices ( - health_service_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - service_name VARCHAR(100) NOT NULL, - visit_date DATE, - PRIMARY KEY (health_service_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 88. Counseling Services -CREATE TABLE CounselingServices ( - counseling_service_id INT NOT NULL AUTO_INCREMENT, - service_name VARCHAR(100) NOT NULL, - description TEXT, - PRIMARY KEY (counseling_service_id) -); - --- 89. Student Counseling Services -CREATE TABLE StudentCounselingServices ( - student_counseling_service_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - counseling_service_id INT NOT NULL, - PRIMARY KEY (student_counseling_service_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id), - FOREIGN KEY (counseling_service_id) REFERENCES CounselingServices(counseling_service_id) -); - --- 90. Student Financial Services -CREATE TABLE StudentFinancialServices ( - financial_service_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - service_name VARCHAR(100) NOT NULL, - visit_date DATE, - PRIMARY KEY (financial_service_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 91. Academic Resources -CREATE TABLE AcademicResources ( - resource_id INT NOT NULL AUTO_INCREMENT, - resource_name VARCHAR(100) NOT NULL, - resource_description TEXT, - PRIMARY KEY (resource_id) -); - --- 92. Student Resource Usage -CREATE TABLE StudentResourceUsage ( - usage_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - resource_id INT NOT NULL, - usage_date DATE, - PRIMARY KEY (usage_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id), - FOREIGN KEY (resource_id) REFERENCES AcademicResources(resource_id) -); - --- 93. Course Libraries -CREATE TABLE CourseLibraries ( - library_id INT NOT NULL AUTO_INCREMENT, - course_id INT NOT NULL, - resource_id INT NOT NULL, - PRIMARY KEY (library_id), - FOREIGN KEY (course_id) REFERENCES Courses(course_id), - FOREIGN KEY (resource_id) REFERENCES AcademicResources(resource_id) -); - --- 94. Academic Integrity Policies -CREATE TABLE AcademicIntegrityPolicies ( - policy_id INT NOT NULL AUTO_INCREMENT, - policy_name VARCHAR(100) NOT NULL, - description TEXT, - PRIMARY KEY (policy_id) -); - --- 95. Integrity Violations -CREATE TABLE IntegrityViolations ( - violation_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - policy_id INT NOT NULL, - violation_date DATE, - PRIMARY KEY (violation_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id), - FOREIGN KEY (policy_id) REFERENCES AcademicIntegrityPolicies(policy_id) -); - --- 96. Financial Aid -CREATE TABLE FinancialAidEduTwo ( - aid_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - aid_amount DECIMAL(10, 2), - aid_date DATE, - PRIMARY KEY (aid_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 97. Student Job Opportunities -CREATE TABLE StudentJobOpportunities ( - job_opportunity_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - job_title VARCHAR(100), - application_date DATE, - PRIMARY KEY (job_opportunity_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 98. Campus News -CREATE TABLE CampusNews ( - news_id INT NOT NULL AUTO_INCREMENT, - title VARCHAR(100) NOT NULL, - content TEXT, - published_date DATE, - PRIMARY KEY (news_id) -); - --- 99. Emergency Contacts -CREATE TABLE EmergencyContacts ( - contact_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - contact_name VARCHAR(100), - contact_phone VARCHAR(15), - relationship VARCHAR(50), - PRIMARY KEY (contact_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 100. Student Feedback2 -CREATE TABLE StudentFeedback ( - feedback_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - feedback_text TEXT, - feedback_date DATE, - PRIMARY KEY (feedback_id), - FOREIGN KEY (student_id) REFERENCES Students(student_id) -); - --- 1. Campaigns -CREATE TABLE Campaigns ( - campaign_id INT NOT NULL AUTO_INCREMENT, - campaign_name VARCHAR(100), - start_date DATE, - end_date DATE, - budget DECIMAL(10, 2), - PRIMARY KEY (campaign_id) -); - --- 2. Campaign Channels -CREATE TABLE CampaignChannels ( - channel_id INT NOT NULL AUTO_INCREMENT, - campaign_id INT NOT NULL, - channel_name VARCHAR(100), - PRIMARY KEY (channel_id), - FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) -); - --- 3. Leads -CREATE TABLE Leads ( - lead_id INT NOT NULL AUTO_INCREMENT, - first_name VARCHAR(50), - last_name VARCHAR(50), - email VARCHAR(100) UNIQUE, - phone VARCHAR(15), - source VARCHAR(100), - status ENUM('New', 'Contacted', 'Qualified', 'Converted', 'Lost'), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (lead_id) -); - --- 4. Lead Assignments -CREATE TABLE LeadAssignments ( - assignment_id INT NOT NULL AUTO_INCREMENT, - lead_id INT NOT NULL, - user_id INT NOT NULL, - assigned_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (assignment_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id), - FOREIGN KEY (user_id) REFERENCES Users(user_id) -); - --- 5. Contacts -CREATE TABLE Contacts ( - contact_id INT NOT NULL AUTO_INCREMENT, - lead_id INT NOT NULL, - contact_method VARCHAR(50), - contact_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - notes TEXT, - PRIMARY KEY (contact_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 6. Opportunities -CREATE TABLE Opportunities ( - opportunity_id INT NOT NULL AUTO_INCREMENT, - lead_id INT NOT NULL, - opportunity_value DECIMAL(10, 2), - close_date DATE, - stage ENUM('Prospecting', 'Negotiation', 'Closed Won', 'Closed Lost'), - PRIMARY KEY (opportunity_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 7. Marketing Materials -CREATE TABLE MarketingMaterials ( - material_id INT NOT NULL AUTO_INCREMENT, - material_type VARCHAR(100), - title VARCHAR(100), - content TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (material_id) -); - --- 8. Material Usage -CREATE TABLE MaterialUsage ( - usage_id INT NOT NULL AUTO_INCREMENT, - material_id INT NOT NULL, - campaign_id INT NOT NULL, - PRIMARY KEY (usage_id), - FOREIGN KEY (material_id) REFERENCES MarketingMaterials(material_id), - FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) -); - --- 9. Email Campaigns -CREATE TABLE EmailCampaigns ( - email_campaign_id INT NOT NULL AUTO_INCREMENT, - campaign_id INT NOT NULL, - subject VARCHAR(100), - body TEXT, - sent_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (email_campaign_id), - FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) -); - --- 10. Email Opens -CREATE TABLE EmailOpens ( - open_id INT NOT NULL AUTO_INCREMENT, - email_campaign_id INT NOT NULL, - lead_id INT NOT NULL, - opened_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (open_id), - FOREIGN KEY (email_campaign_id) REFERENCES EmailCampaigns(email_campaign_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 11. Email Clicks -CREATE TABLE EmailClicks ( - click_id INT NOT NULL AUTO_INCREMENT, - email_campaign_id INT NOT NULL, - lead_id INT NOT NULL, - clicked_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (click_id), - FOREIGN KEY (email_campaign_id) REFERENCES EmailCampaigns(email_campaign_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 12. Social Media Campaigns -CREATE TABLE SocialMediaCampaigns ( - sm_campaign_id INT NOT NULL AUTO_INCREMENT, - campaign_id INT NOT NULL, - platform VARCHAR(100), - post_content TEXT, - scheduled_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (sm_campaign_id), - FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) -); - --- 13. Social Media Engagements -CREATE TABLE SocialMediaEngagements ( - engagement_id INT NOT NULL AUTO_INCREMENT, - sm_campaign_id INT NOT NULL, - engagement_type ENUM('Like', 'Share', 'Comment'), - engagement_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (engagement_id), - FOREIGN KEY (sm_campaign_id) REFERENCES SocialMediaCampaigns(sm_campaign_id) -); - --- 14. Surveys -CREATE TABLE Surveys ( - survey_id INT NOT NULL AUTO_INCREMENT, - survey_title VARCHAR(100), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (survey_id) -); - --- 15. Survey Questions -CREATE TABLE SurveyQuestions ( - question_id INT NOT NULL AUTO_INCREMENT, - survey_id INT NOT NULL, - question_text TEXT, - question_type ENUM('Multiple Choice', 'Open-Ended'), - PRIMARY KEY (question_id), - FOREIGN KEY (survey_id) REFERENCES Surveys(survey_id) -); - --- 16. Survey Responses -CREATE TABLE MarkSurveyResponses ( - response_id INT NOT NULL AUTO_INCREMENT, - question_id INT NOT NULL, - lead_id INT NOT NULL, - response_text TEXT, - submitted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (response_id), - FOREIGN KEY (question_id) REFERENCES SurveyQuestions(question_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 17. Market Research -CREATE TABLE MarkMarketResearch ( - research_id INT NOT NULL AUTO_INCREMENT, - research_topic VARCHAR(100), - findings TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (research_id) -); - --- 18. Competitor Analysis -CREATE TABLE CompetitorAnalysis ( - analysis_id INT NOT NULL AUTO_INCREMENT, - competitor_name VARCHAR(100), - strengths TEXT, - weaknesses TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (analysis_id) -); - --- 19. User Personas -CREATE TABLE UserPersonas ( - persona_id INT NOT NULL AUTO_INCREMENT, - persona_name VARCHAR(100), - demographics TEXT, - behaviors TEXT, - primary_goal TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (persona_id) -); - --- 20. Brand Guidelines -CREATE TABLE BrandGuidelines ( - guideline_id INT NOT NULL AUTO_INCREMENT, - guideline_name VARCHAR(100), - content TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (guideline_id) -); - --- 21. Marketing Budgets -CREATE TABLE MarketingBudgets ( - budget_id INT NOT NULL AUTO_INCREMENT, - campaign_id INT NOT NULL, - allocated_amount DECIMAL(10, 2), - spent_amount DECIMAL(10, 2) DEFAULT 0, - PRIMARY KEY (budget_id), - FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) -); - --- 22. Partnerships -CREATE TABLE Partnerships ( - partnership_id INT NOT NULL AUTO_INCREMENT, - partner_name VARCHAR(100), - partnership_type VARCHAR(100), - start_date DATE, - end_date DATE, - PRIMARY KEY (partnership_id) -); - --- 23. Partnership Activities -CREATE TABLE PartnershipActivities ( - activity_id INT NOT NULL AUTO_INCREMENT, - partnership_id INT NOT NULL, - activity_description TEXT, - activity_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (activity_id), - FOREIGN KEY (partnership_id) REFERENCES Partnerships(partnership_id) -); - --- 24. Affiliate Programs -CREATE TABLE AffiliatePrograms ( - program_id INT NOT NULL AUTO_INCREMENT, - program_name VARCHAR(100), - commission_rate DECIMAL(5, 2), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (program_id) -); - --- 25. Affiliates -CREATE TABLE Affiliates ( - affiliate_id INT NOT NULL AUTO_INCREMENT, - program_id INT NOT NULL, - affiliate_name VARCHAR(100), - contact_email VARCHAR(100) UNIQUE, - PRIMARY KEY (affiliate_id), - FOREIGN KEY (program_id) REFERENCES AffiliatePrograms(program_id) -); - --- 26. Affiliate Sales -CREATE TABLE AffiliateSales ( - sale_id INT NOT NULL AUTO_INCREMENT, - affiliate_id INT NOT NULL, - lead_id INT NOT NULL, - sale_value DECIMAL(10, 2), - sale_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (sale_id), - FOREIGN KEY (affiliate_id) REFERENCES Affiliates(affiliate_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 27. Event Marketing -CREATE TABLE EventMarketing ( - event_id INT NOT NULL AUTO_INCREMENT, - event_name VARCHAR(100), - event_date DATE, - location VARCHAR(100), - description TEXT, - PRIMARY KEY (event_id) -); - --- 28. Event Attendees -CREATE TABLE EventAttendees ( - attendee_id INT NOT NULL AUTO_INCREMENT, - event_id INT NOT NULL, - lead_id INT NOT NULL, - registered_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (attendee_id), - FOREIGN KEY (event_id) REFERENCES EventMarketing(event_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 29. Webinars -CREATE TABLE Webinars ( - webinar_id INT NOT NULL AUTO_INCREMENT, - title VARCHAR(100), - scheduled_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (webinar_id) -); - --- 30. Webinar Registrations -CREATE TABLE WebinarRegistrations ( - registration_id INT NOT NULL AUTO_INCREMENT, - webinar_id INT NOT NULL, - lead_id INT NOT NULL, - registered_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (registration_id), - FOREIGN KEY (webinar_id) REFERENCES Webinars(webinar_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 31. Marketing Automation -CREATE TABLE MarketingAutomation ( - automation_id INT NOT NULL AUTO_INCREMENT, - name VARCHAR(100), - trigger_event VARCHAR(100), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (automation_id) -); - --- 32. Automation Actions -CREATE TABLE AutomationActions ( - action_id INT NOT NULL AUTO_INCREMENT, - automation_id INT NOT NULL, - action_type VARCHAR(100), - action_details TEXT, - PRIMARY KEY (action_id), - FOREIGN KEY (automation_id) REFERENCES MarketingAutomation(automation_id) -); - --- 33. Ad Campaigns -CREATE TABLE AdCampaigns ( - ad_campaign_id INT NOT NULL AUTO_INCREMENT, - campaign_id INT NOT NULL, - ad_platform VARCHAR(100), - ad_content TEXT, - budget DECIMAL(10, 2), - start_date DATE, - end_date DATE, - PRIMARY KEY (ad_campaign_id), - FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) -); - --- 34. Ad Performance -CREATE TABLE AdPerformance ( - performance_id INT NOT NULL AUTO_INCREMENT, - ad_campaign_id INT NOT NULL, - impressions INT, - clicks INT, - conversions INT, - cost DECIMAL(10, 2), - PRIMARY KEY (performance_id), - FOREIGN KEY (ad_campaign_id) REFERENCES AdCampaigns(ad_campaign_id) -); - --- 35. Content Calendar -CREATE TABLE ContentCalendar ( - calendar_id INT NOT NULL AUTO_INCREMENT, - content_type VARCHAR(100), - scheduled_date DATE, - title VARCHAR(100), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (calendar_id) -); - --- 36. Content Pieces -CREATE TABLE ContentPieces ( - piece_id INT NOT NULL AUTO_INCREMENT, - calendar_id INT NOT NULL, - content_text TEXT, - PRIMARY KEY (piece_id), - FOREIGN KEY (calendar_id) REFERENCES ContentCalendar(calendar_id) -); - --- 37. Content Engagement -CREATE TABLE ContentEngagement ( - engagement_id INT NOT NULL AUTO_INCREMENT, - piece_id INT NOT NULL, - lead_id INT NOT NULL, - engagement_type ENUM('View', 'Share', 'Comment'), - engagement_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (engagement_id), - FOREIGN KEY (piece_id) REFERENCES ContentPieces(piece_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 38. Customer Feedback -CREATE TABLE MarkCustomerFeedback ( - feedback_id INT NOT NULL AUTO_INCREMENT, - lead_id INT NOT NULL, - feedback_text TEXT, - submitted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (feedback_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 39. Referral Programs -CREATE TABLE ReferralPrograms ( - referral_id INT NOT NULL AUTO_INCREMENT, - program_name VARCHAR(100), - reward_type VARCHAR(100), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (referral_id) -); - --- 40. Referrals -CREATE TABLE Referrals ( - referral_id INT NOT NULL AUTO_INCREMENT, - referral_program_id INT NOT NULL, - referrer_id INT NOT NULL, - referred_lead_id INT NOT NULL, - PRIMARY KEY (referral_id), - FOREIGN KEY (referral_program_id) REFERENCES ReferralPrograms(referral_id), - FOREIGN KEY (referrer_id) REFERENCES Leads(lead_id), - FOREIGN KEY (referred_lead_id) REFERENCES Leads(lead_id) -); - --- 41. Competitor Tracking -CREATE TABLE CompetitorTracking ( - tracking_id INT NOT NULL AUTO_INCREMENT, - competitor_name VARCHAR(100), - monitoring_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (tracking_id) -); - --- 42. Competitor Actions -CREATE TABLE CompetitorActions ( - action_id INT NOT NULL AUTO_INCREMENT, - tracking_id INT NOT NULL, - action_description TEXT, - PRIMARY KEY (action_id), - FOREIGN KEY (tracking_id) REFERENCES CompetitorTracking(tracking_id) -); - --- 43. Marketing Events -CREATE TABLE MarketingEvents ( - event_id INT NOT NULL AUTO_INCREMENT, - event_name VARCHAR(100), - event_type VARCHAR(100), - event_date DATE, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (event_id) -); - --- 44. Event Feedback -CREATE TABLE EventFeedback ( - feedback_id INT NOT NULL AUTO_INCREMENT, - event_id INT NOT NULL, - lead_id INT NOT NULL, - feedback_text TEXT, - submitted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (feedback_id), - FOREIGN KEY (event_id) REFERENCES MarketingEvents(event_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 45. Promotional Codes -CREATE TABLE PromotionalCodes ( - code_id INT NOT NULL AUTO_INCREMENT, - code_value VARCHAR(50) UNIQUE, - discount DECIMAL(5, 2), - expiration_date DATE, - PRIMARY KEY (code_id) -); - --- 46. Code Usage -CREATE TABLE CodeUsage ( - usage_id INT NOT NULL AUTO_INCREMENT, - code_id INT NOT NULL, - lead_id INT NOT NULL, - used_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (usage_id), - FOREIGN KEY (code_id) REFERENCES PromotionalCodes(code_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 47. Performance Metrics -CREATE TABLE PerformanceMetrics ( - metric_id INT NOT NULL AUTO_INCREMENT, - campaign_id INT NOT NULL, - leads_generated INT, - conversions INT, - revenue DECIMAL(10, 2), - PRIMARY KEY (metric_id), - FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) -); - --- 48. ROI Analysis -CREATE TABLE ROIAnalysis ( - roi_id INT NOT NULL AUTO_INCREMENT, - campaign_id INT NOT NULL, - investment DECIMAL(10, 2), - roi_percentage DECIMAL(5, 2), - PRIMARY KEY (roi_id), - FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) -); - --- 49. Budget Allocations -CREATE TABLE BudgetAllocations ( - allocation_id INT NOT NULL AUTO_INCREMENT, - campaign_id INT NOT NULL, - allocated_amount DECIMAL(10, 2), - PRIMARY KEY (allocation_id), - FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) -); - --- 50. Media Spend -CREATE TABLE MediaSpend ( - spend_id INT NOT NULL AUTO_INCREMENT, - campaign_id INT NOT NULL, - media_type VARCHAR(100), - amount DECIMAL(10, 2), - spend_date DATE, - PRIMARY KEY (spend_id), - FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) -); - --- 51. Target Audiences -CREATE TABLE TargetAudiences ( - audience_id INT NOT NULL AUTO_INCREMENT, - campaign_id INT NOT NULL, - demographic_details TEXT, - PRIMARY KEY (audience_id), - FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) -); - --- 52. Marketing Analytics -CREATE TABLE MarketingAnalytics ( - analytics_id INT NOT NULL AUTO_INCREMENT, - campaign_id INT NOT NULL, - analysis_date DATE, - insights TEXT, - PRIMARY KEY (analytics_id), - FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) -); - --- 53. Lead Sources -CREATE TABLE LeadSources ( - source_id INT NOT NULL AUTO_INCREMENT, - source_name VARCHAR(100), - PRIMARY KEY (source_id) -); - --- 54. Source Tracking -CREATE TABLE SourceTracking ( - tracking_id INT NOT NULL AUTO_INCREMENT, - source_id INT NOT NULL, - lead_id INT NOT NULL, - tracked_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (tracking_id), - FOREIGN KEY (source_id) REFERENCES LeadSources(source_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 55. Brand Awareness -CREATE TABLE BrandAwareness ( - awareness_id INT NOT NULL AUTO_INCREMENT, - campaign_id INT NOT NULL, - awareness_level ENUM('Low', 'Medium', 'High'), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (awareness_id), - FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) -); - --- 56. Brand Perception -CREATE TABLE BrandPerception ( - perception_id INT NOT NULL AUTO_INCREMENT, - lead_id INT NOT NULL, - perception_text TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (perception_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 57. Influencer Marketing -CREATE TABLE InfluencerMarketing ( - influencer_id INT NOT NULL AUTO_INCREMENT, - influencer_name VARCHAR(100), - platform VARCHAR(100), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (influencer_id) -); - --- 58. Influencer Collaborations -CREATE TABLE InfluencerCollaborations ( - collaboration_id INT NOT NULL AUTO_INCREMENT, - influencer_id INT NOT NULL, - campaign_id INT NOT NULL, - terms TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (collaboration_id), - FOREIGN KEY (influencer_id) REFERENCES InfluencerMarketing(influencer_id), - FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) -); - --- 59. Marketing Collateral -CREATE TABLE MarketingCollateral ( - collateral_id INT NOT NULL AUTO_INCREMENT, - collateral_type VARCHAR(100), - description TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (collateral_id) -); - --- 60. Collateral Usage -CREATE TABLE CollateralUsage ( - usage_id INT NOT NULL AUTO_INCREMENT, - collateral_id INT NOT NULL, - campaign_id INT NOT NULL, - PRIMARY KEY (usage_id), - FOREIGN KEY (collateral_id) REFERENCES MarketingCollateral(collateral_id), - FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) -); - --- 61. Customer Segmentation -CREATE TABLE CustomerSegmentation ( - segment_id INT NOT NULL AUTO_INCREMENT, - segment_name VARCHAR(100), - criteria TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (segment_id) -); - --- 62. Segment Members -CREATE TABLE SegmentMembers ( - member_id INT NOT NULL AUTO_INCREMENT, - segment_id INT NOT NULL, - lead_id INT NOT NULL, - PRIMARY KEY (member_id), - FOREIGN KEY (segment_id) REFERENCES CustomerSegmentation(segment_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 63. Customer Journey -CREATE TABLE CustomerJourney ( - journey_id INT NOT NULL AUTO_INCREMENT, - lead_id INT NOT NULL, - touchpoints TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (journey_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 64. Marketing Performance -CREATE TABLE MarketingPerformance ( - performance_id INT NOT NULL AUTO_INCREMENT, - campaign_id INT NOT NULL, - leads_generated INT, - conversions INT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (performance_id), - FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) -); - --- 65. Ad Spend Analysis -CREATE TABLE AdSpendAnalysis ( - analysis_id INT NOT NULL AUTO_INCREMENT, - ad_campaign_id INT NOT NULL, - total_spend DECIMAL(10, 2), - leads_generated INT, - conversions INT, - PRIMARY KEY (analysis_id), - FOREIGN KEY (ad_campaign_id) REFERENCES AdCampaigns(ad_campaign_id) -); - --- 66. Conversion Rates -CREATE TABLE ConversionRates ( - rate_id INT NOT NULL AUTO_INCREMENT, - campaign_id INT NOT NULL, - conversion_rate DECIMAL(5, 2), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (rate_id), - FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) -); - --- 67. Customer Retention -CREATE TABLE CustomerRetention ( - retention_id INT NOT NULL AUTO_INCREMENT, - lead_id INT NOT NULL, - retention_score DECIMAL(5, 2), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (retention_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 68. Churn Analysis -CREATE TABLE ChurnAnalysis ( - churn_id INT NOT NULL AUTO_INCREMENT, - lead_id INT NOT NULL, - churn_reason TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (churn_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 69. Customer Loyalty Programs -CREATE TABLE CustomerLoyaltyPrograms ( - program_id INT NOT NULL AUTO_INCREMENT, - program_name VARCHAR(100), - points_required INT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (program_id) -); - --- 70. Loyalty Program Members -CREATE TABLE LoyaltyProgramMembers ( - member_id INT NOT NULL AUTO_INCREMENT, - program_id INT NOT NULL, - lead_id INT NOT NULL, - points_earned INT DEFAULT 0, - PRIMARY KEY (member_id), - FOREIGN KEY (program_id) REFERENCES CustomerLoyaltyPrograms(program_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 71. Loyalty Redemptions -CREATE TABLE LoyaltyRedemptions ( - redemption_id INT NOT NULL AUTO_INCREMENT, - member_id INT NOT NULL, - redeemed_points INT, - redemption_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (redemption_id), - FOREIGN KEY (member_id) REFERENCES LoyaltyProgramMembers(member_id) -); - --- 72. Event Sponsorships -CREATE TABLE EventSponsorships ( - sponsorship_id INT NOT NULL AUTO_INCREMENT, - event_id INT NOT NULL, - sponsor_name VARCHAR(100), - sponsorship_amount DECIMAL(10, 2), - PRIMARY KEY (sponsorship_id), - FOREIGN KEY (event_id) REFERENCES EventMarketing(event_id) -); - --- 73. Customer Success Stories -CREATE TABLE CustomerSuccessStories ( - story_id INT NOT NULL AUTO_INCREMENT, - lead_id INT NOT NULL, - success_text TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (story_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 74. Marketing Technology Stack -CREATE TABLE MarketingTechStack ( - tech_id INT NOT NULL AUTO_INCREMENT, - tech_name VARCHAR(100), - usage_description TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (tech_id) -); - --- 75. Tech Stack Usage -CREATE TABLE TechStackUsage ( - usage_id INT NOT NULL AUTO_INCREMENT, - tech_id INT NOT NULL, - campaign_id INT NOT NULL, - PRIMARY KEY (usage_id), - FOREIGN KEY (tech_id) REFERENCES MarketingTechStack(tech_id), - FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) -); - --- 76. Social Media Analytics -CREATE TABLE SocialMediaAnalytics ( - analytics_id INT NOT NULL AUTO_INCREMENT, - campaign_id INT NOT NULL, - platform VARCHAR(100), - metrics TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (analytics_id), - FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) -); - --- 77. Content Performance -CREATE TABLE ContentPerformance ( - performance_id INT NOT NULL AUTO_INCREMENT, - piece_id INT NOT NULL, - metrics TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (performance_id), - FOREIGN KEY (piece_id) REFERENCES ContentPieces(piece_id) -); - --- 78. Lead Scoring -CREATE TABLE LeadScoring ( - score_id INT NOT NULL AUTO_INCREMENT, - lead_id INT NOT NULL, - score INT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (score_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 79. Account Based Marketing -CREATE TABLE AccountBasedMarketing ( - abm_id INT NOT NULL AUTO_INCREMENT, - account_name VARCHAR(100), - target_audience VARCHAR(100), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (abm_id) -); - --- 80. ABM Engagements -CREATE TABLE ABMEngagements ( - engagement_id INT NOT NULL AUTO_INCREMENT, - abm_id INT NOT NULL, - lead_id INT NOT NULL, - engagement_type VARCHAR(100), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (engagement_id), - FOREIGN KEY (abm_id) REFERENCES AccountBasedMarketing(abm_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 81. Marketing KPIs -CREATE TABLE MarketingKPIs ( - kpi_id INT NOT NULL AUTO_INCREMENT, - kpi_name VARCHAR(100), - target_value DECIMAL(10, 2), - actual_value DECIMAL(10, 2), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (kpi_id) -); - --- 82. KPI Tracking -CREATE TABLE KPITracking ( - tracking_id INT NOT NULL AUTO_INCREMENT, - kpi_id INT NOT NULL, - tracked_date DATE, - value DECIMAL(10, 2), - PRIMARY KEY (tracking_id), - FOREIGN KEY (kpi_id) REFERENCES MarketingKPIs(kpi_id) -); - --- 83. Digital Marketing Strategy -CREATE TABLE DigitalMarketingStrategy ( - strategy_id INT NOT NULL AUTO_INCREMENT, - strategy_name VARCHAR(100), - description TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (strategy_id) -); - --- 84. Strategy Implementation -CREATE TABLE VTStratImplement ( - implementation_id INT NOT NULL AUTO_INCREMENT, - strategy_id INT NOT NULL, - start_date DATE, - end_date DATE, - PRIMARY KEY (implementation_id), - FOREIGN KEY (strategy_id) REFERENCES DigitalMarketingStrategy(strategy_id) -); - --- 85. Customer Acquisition -CREATE TABLE CustomerAcquisition ( - acquisition_id INT NOT NULL AUTO_INCREMENT, - lead_id INT NOT NULL, - acquisition_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (acquisition_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 86. Customer Retention Programs -CREATE TABLE CustomerRetentionPrograms ( - retention_program_id INT NOT NULL AUTO_INCREMENT, - program_name VARCHAR(100), - description TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (retention_program_id) -); - --- 87. Retention Program Participation -CREATE TABLE RetentionProgramParticipation ( - participation_id INT NOT NULL AUTO_INCREMENT, - retention_program_id INT NOT NULL, - lead_id INT NOT NULL, - PRIMARY KEY (participation_id), - FOREIGN KEY (retention_program_id) REFERENCES CustomerRetentionPrograms(retention_program_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 88. Customer Segmentation Criteria -CREATE TABLE CustomerSegmentationCriteria ( - criteria_id INT NOT NULL AUTO_INCREMENT, - segment_id INT NOT NULL, - criteria_text TEXT, - PRIMARY KEY (criteria_id), - FOREIGN KEY (segment_id) REFERENCES CustomerSegmentation(segment_id) -); - --- 89. Audience Insights -CREATE TABLE AudienceInsights ( - insight_id INT NOT NULL AUTO_INCREMENT, - segment_id INT NOT NULL, - insight_text TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (insight_id), - FOREIGN KEY (segment_id) REFERENCES CustomerSegmentation(segment_id) -); - --- 90. Marketing Workshops -CREATE TABLE MarketingWorkshops ( - workshop_id INT NOT NULL AUTO_INCREMENT, - workshop_name VARCHAR(100), - date DATE, - description TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (workshop_id) -); - --- 91. Workshop Registrations -CREATE TABLE WorkshopRegistrations ( - registration_id INT NOT NULL AUTO_INCREMENT, - workshop_id INT NOT NULL, - lead_id INT NOT NULL, - registered_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (registration_id), - FOREIGN KEY (workshop_id) REFERENCES MarketingWorkshops(workshop_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 92. Marketing Training -CREATE TABLE MarketingTraining ( - training_id INT NOT NULL AUTO_INCREMENT, - training_name VARCHAR(100), - training_date DATE, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (training_id) -); - --- 93. Training Registrations -CREATE TABLE TrainingRegistrations ( - registration_id INT NOT NULL AUTO_INCREMENT, - training_id INT NOT NULL, - lead_id INT NOT NULL, - registered_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (registration_id), - FOREIGN KEY (training_id) REFERENCES MarketingTraining(training_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 94. Marketing Partnerships -CREATE TABLE MarketingPartnerships ( - partnership_id INT NOT NULL AUTO_INCREMENT, - partner_name VARCHAR(100), - collaboration_description TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (partnership_id) -); - --- 95. Partnership Engagements -CREATE TABLE PartnershipEngagements ( - engagement_id INT NOT NULL AUTO_INCREMENT, - partnership_id INT NOT NULL, - lead_id INT NOT NULL, - engagement_type VARCHAR(100), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (engagement_id), - FOREIGN KEY (partnership_id) REFERENCES MarketingPartnerships(partnership_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 96. Marketing Research -CREATE TABLE MarketingResearch ( - research_id INT NOT NULL AUTO_INCREMENT, - topic VARCHAR(100), - findings TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (research_id) -); - --- 97. Research Collaborations -CREATE TABLE ResearchCollaborations ( - collaboration_id INT NOT NULL AUTO_INCREMENT, - research_id INT NOT NULL, - partner_name VARCHAR(100), - PRIMARY KEY (collaboration_id), - FOREIGN KEY (research_id) REFERENCES MarketingResearch(research_id) -); - --- 98. Campaign Trends -CREATE TABLE CampaignTrends ( - trend_id INT NOT NULL AUTO_INCREMENT, - campaign_id INT NOT NULL, - trend_description TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (trend_id), - FOREIGN KEY (campaign_id) REFERENCES Campaigns(campaign_id) -); - --- 99. Marketing Events Feedback -CREATE TABLE MarketingEventsFeedback ( - feedback_id INT NOT NULL AUTO_INCREMENT, - event_id INT NOT NULL, - lead_id INT NOT NULL, - feedback_text TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (feedback_id), - FOREIGN KEY (event_id) REFERENCES MarketingEvents(event_id), - FOREIGN KEY (lead_id) REFERENCES Leads(lead_id) -); - --- 100. Marketing Goals -CREATE TABLE MarketingGoals ( - goal_id INT NOT NULL AUTO_INCREMENT, - goal_name VARCHAR(100), - target_value DECIMAL(10, 2), - actual_value DECIMAL(10, 2), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (goal_id) -); - --- 1. Tutors -CREATE TABLE Tutors ( - tutor_id INT NOT NULL AUTO_INCREMENT, - first_name VARCHAR(50), - last_name VARCHAR(50), - email VARCHAR(100) UNIQUE, - phone VARCHAR(15), - subject_specialty VARCHAR(100), - experience_years INT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (tutor_id) -); - --- 2. Tutor Profiles -CREATE TABLE TutorProfiles ( - profile_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - bio TEXT, - profile_picture VARCHAR(255), - PRIMARY KEY (profile_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 3. Subjects -CREATE TABLE Subjects ( - subject_id INT NOT NULL AUTO_INCREMENT, - subject_name VARCHAR(100), - PRIMARY KEY (subject_id) -); - --- 4. Tutor_Subjects -CREATE TABLE Tutor_Subjects ( - tutor_subject_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - subject_id INT NOT NULL, - PRIMARY KEY (tutor_subject_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), - FOREIGN KEY (subject_id) REFERENCES Subjects(subject_id) -); - --- 5. StudentsVT -CREATE TABLE StudentsVT ( - student_id INT NOT NULL AUTO_INCREMENT, - first_name VARCHAR(50), - last_name VARCHAR(50), - email VARCHAR(100) UNIQUE, - phone VARCHAR(15), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (student_id) -); - --- 6. Student_Enrollments -CREATE TABLE Student_Enrollments ( - enrollment_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - course_id INT NOT NULL, - enrollment_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (enrollment_id), - FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) -); - --- 7. VTCourses2 -CREATE TABLE VTCourses2 ( - course_id INT NOT NULL AUTO_INCREMENT, - course_name VARCHAR(100), - course_description TEXT, - PRIMARY KEY (course_id) -); - --- 8. Tutor_Schedules -CREATE TABLE Tutor_Schedules ( - schedule_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - available_day VARCHAR(10), - available_time TIME, - PRIMARY KEY (schedule_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 9. TutoringSessionsTwo -CREATE TABLE TutoringSessionsTwo ( - session_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - student_id INT NOT NULL, - course_id INT NOT NULL, - session_date TIMESTAMP, - session_duration INT, -- in minutes - PRIMARY KEY (session_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), - FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id), - FOREIGN KEY (course_id) REFERENCES VTCourses2(course_id) -); - --- 10. Session_Feedback -CREATE TABLE Session_Feedback ( - feedback_id INT NOT NULL AUTO_INCREMENT, - session_id INT NOT NULL, - rating INT CHECK (rating >= 1 AND rating <= 5), - comments TEXT, - PRIMARY KEY (feedback_id), - FOREIGN KEY (session_id) REFERENCES TutoringSessionsTwo(session_id) -); - --- 11. Tutor_Ratings -CREATE TABLE Tutor_Ratings ( - rating_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - student_id INT NOT NULL, - rating INT CHECK (rating >= 1 AND rating <= 5), - comments TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (rating_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), - FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) -); - --- 12. Tutor_Availability -CREATE TABLE Tutor_Availability ( - availability_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - date DATE, - available BOOLEAN, - PRIMARY KEY (availability_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 13. PaymentsVT -CREATE TABLE PaymentsVT ( - payment_id INT NOT NULL AUTO_INCREMENT, - student_id INT NOT NULL, - session_id INT NOT NULL, - amount DECIMAL(10, 2), - payment_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (payment_id), - FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id), - FOREIGN KEY (session_id) REFERENCES TutoringSessionsTwo(session_id) -); - --- 14. Discounts -CREATE TABLE Discounts ( - discount_id INT NOT NULL AUTO_INCREMENT, - discount_code VARCHAR(50), - discount_percentage DECIMAL(5, 2), - valid_until DATE, - PRIMARY KEY (discount_id) -); - --- 15. Tutor_Reviews -CREATE TABLE Tutor_Reviews ( - review_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - review_text TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (review_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 16. TutoringEvents -CREATE TABLE TutoringEvents ( - event_id INT NOT NULL AUTO_INCREMENT, - event_name VARCHAR(100), - event_date DATE, - event_location VARCHAR(255), - PRIMARY KEY (event_id) -); - --- 17. Event_Attendees -CREATE TABLE Event_Attendees ( - attendee_id INT NOT NULL AUTO_INCREMENT, - event_id INT NOT NULL, - student_id INT NOT NULL, - PRIMARY KEY (attendee_id), - FOREIGN KEY (event_id) REFERENCES TutoringEvents(event_id), - FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) -); - --- 18. TutoringNotify -CREATE TABLE TutoringNotify ( - notification_id INT NOT NULL AUTO_INCREMENT, - user_id INT NOT NULL, -- Can be student or tutor - notification_text TEXT, - is_read BOOLEAN DEFAULT FALSE, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (notification_id) -); - --- 19. Tutor_Qualifications -CREATE TABLE Tutor_Qualifications ( - qualification_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - qualification_name VARCHAR(100), - institution VARCHAR(100), - year_obtained INT, - PRIMARY KEY (qualification_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 20. Tutor_Experience -CREATE TABLE Tutor_Experience ( - experience_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - previous_employer VARCHAR(100), - position VARCHAR(100), - years_worked INT, - PRIMARY KEY (experience_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 21. Tutor_Specialties -CREATE TABLE Tutor_Specialties ( - specialty_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - specialty_name VARCHAR(100), - PRIMARY KEY (specialty_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 22. Tutor_Skills -CREATE TABLE Tutor_Skills ( - skill_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - skill_name VARCHAR(100), - PRIMARY KEY (skill_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 23. Tutor_Timings -CREATE TABLE Tutor_Timings ( - timing_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - timing_start TIME, - timing_end TIME, - PRIMARY KEY (timing_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 24. Tutor_Languages -CREATE TABLE Tutor_Languages ( - language_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - language_name VARCHAR(100), - PRIMARY KEY (language_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 25. Session_Notes -CREATE TABLE Session_Notes ( - note_id INT NOT NULL AUTO_INCREMENT, - session_id INT NOT NULL, - note_text TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (note_id), - FOREIGN KEY (session_id) REFERENCES TutoringSessionsTwo(session_id) -); - --- 26. Tutor_Certifications -CREATE TABLE Tutor_Certifications_Two ( - certification_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - certification_name VARCHAR(100), - issuing_organization VARCHAR(100), - year_obtained INT, - PRIMARY KEY (certification_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 27. Session_Reschedule -CREATE TABLE Session_Reschedule ( - reschedule_id INT NOT NULL AUTO_INCREMENT, - session_id INT NOT NULL, - new_session_date TIMESTAMP, - PRIMARY KEY (reschedule_id), - FOREIGN KEY (session_id) REFERENCES TutoringSessionsTwo(session_id) -); - --- 28. Tutor_SocialMedia -CREATE TABLE Tutor_SocialMedia ( - social_media_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - platform VARCHAR(50), - profile_url VARCHAR(255), - PRIMARY KEY (social_media_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 29. Tutor_Articles -CREATE TABLE Tutor_Articles ( - article_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - article_title VARCHAR(100), - article_content TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (article_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 30. Tutor_Blog -CREATE TABLE Tutor_Blog ( - blog_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - blog_title VARCHAR(100), - blog_content TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (blog_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 31. Tutor_Media -CREATE TABLE Tutor_Media ( - media_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - media_type VARCHAR(50), -- e.g., video, image - media_url VARCHAR(255), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (media_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 32. Tutor_Projects -CREATE TABLE Tutor_Projects ( - project_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - project_title VARCHAR(100), - project_description TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (project_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 33. Tutor_Events -CREATE TABLE Tutor_Events ( - tutor_event_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - event_id INT NOT NULL, - PRIMARY KEY (tutor_event_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), - FOREIGN KEY (event_id) REFERENCES TutoringEvents(event_id) -); - --- 34. Tutor_Connections -CREATE TABLE Tutor_Connections ( - connection_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - student_id INT NOT NULL, - connection_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (connection_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), - FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) -); - --- 35. Tutor_SuccessStories -CREATE TABLE Tutor_SuccessStories ( - story_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - student_id INT NOT NULL, - story_text TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (story_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), - FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) -); - --- 36. Tutor_Videos -CREATE TABLE Tutor_Videos ( - video_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - video_title VARCHAR(100), - video_url VARCHAR(255), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (video_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 37. Tutor_Questions -CREATE TABLE Tutor_Questions ( - question_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - question_text TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (question_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 38. Tutor_Answers -CREATE TABLE Tutor_Answers ( - answer_id INT NOT NULL AUTO_INCREMENT, - question_id INT NOT NULL, - answer_text TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (answer_id), - FOREIGN KEY (question_id) REFERENCES Tutor_Questions(question_id) -); - --- 39. Tutor_Categories -CREATE TABLE Tutor_Categories ( - category_id INT NOT NULL AUTO_INCREMENT, - category_name VARCHAR(100), - PRIMARY KEY (category_id) -); - --- 40. Tutor_Category_Assignment -CREATE TABLE Tutor_Category_Assignment ( - assignment_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - category_id INT NOT NULL, - PRIMARY KEY (assignment_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), - FOREIGN KEY (category_id) REFERENCES Tutor_Categories(category_id) -); - --- 41. Tutor_Articles_Comments -CREATE TABLE Tutor_Articles_Comments ( - comment_id INT NOT NULL AUTO_INCREMENT, - article_id INT NOT NULL, - student_id INT NOT NULL, - comment_text TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (comment_id), - FOREIGN KEY (article_id) REFERENCES Tutor_Articles(article_id), - FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) -); - --- 42. Tutor_Blog_Comments -CREATE TABLE Tutor_Blog_Comments ( - comment_id INT NOT NULL AUTO_INCREMENT, - blog_id INT NOT NULL, - student_id INT NOT NULL, - comment_text TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (comment_id), - FOREIGN KEY (blog_id) REFERENCES Tutor_Blog(blog_id), - FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) -); - --- 43. Tutor_Resources -CREATE TABLE Tutor_Resources ( - resource_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - resource_name VARCHAR(100), - resource_url VARCHAR(255), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (resource_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 44. Tutor_Galleries -CREATE TABLE Tutor_Galleries ( - gallery_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - gallery_title VARCHAR(100), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (gallery_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 45. Gallery_Images -CREATE TABLE Gallery_Images ( - image_id INT NOT NULL AUTO_INCREMENT, - gallery_id INT NOT NULL, - image_url VARCHAR(255), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (image_id), - FOREIGN KEY (gallery_id) REFERENCES Tutor_Galleries(gallery_id) -); - --- 46. Tutor_Policies -CREATE TABLE Tutor_Policies ( - policy_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - policy_text TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (policy_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 47. Tutor_Reports -CREATE TABLE Tutor_Reports ( - report_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - report_text TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (report_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 48. Tutor_Awards -CREATE TABLE Tutor_Awards ( - award_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - award_name VARCHAR(100), - award_year INT, - PRIMARY KEY (award_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 49. Tutor_Banners -CREATE TABLE Tutor_Banners ( - banner_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - banner_image VARCHAR(255), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (banner_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 50. Tutor_SuccessMetrics -CREATE TABLE Tutor_SuccessMetrics ( - metric_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - metric_name VARCHAR(100), - metric_value DECIMAL(10, 2), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (metric_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 51. Tutor_Projects_Comments -CREATE TABLE Tutor_Projects_Comments ( - comment_id INT NOT NULL AUTO_INCREMENT, - project_id INT NOT NULL, - student_id INT NOT NULL, - comment_text TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (comment_id), - FOREIGN KEY (project_id) REFERENCES Tutor_Projects(project_id), - FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) -); - --- 52. Tutor_Media_Comments -CREATE TABLE Tutor_Media_Comments ( - comment_id INT NOT NULL AUTO_INCREMENT, - media_id INT NOT NULL, - student_id INT NOT NULL, - comment_text TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (comment_id), - FOREIGN KEY (media_id) REFERENCES Tutor_Media(media_id), - FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) -); - --- 53. Tutor_Event_Comments -CREATE TABLE Tutor_Event_Comments ( - comment_id INT NOT NULL AUTO_INCREMENT, - event_id INT NOT NULL, - student_id INT NOT NULL, - comment_text TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (comment_id), - FOREIGN KEY (event_id) REFERENCES TutoringEvents(event_id), - FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) -); - --- 54. Tutor_Session_Tags -CREATE TABLE Tutor_Session_Tags ( - tag_id INT NOT NULL AUTO_INCREMENT, - session_id INT NOT NULL, - tag_name VARCHAR(100), - PRIMARY KEY (tag_id), - FOREIGN KEY (session_id) REFERENCES TutoringSessionsTwo(session_id) -); - --- 55. Tutor_Meeting -CREATE TABLE Tutor_Meeting ( - meeting_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - student_id INT NOT NULL, - meeting_date TIMESTAMP, - meeting_duration INT, - PRIMARY KEY (meeting_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), - FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) -); - --- 56. Tutor_Video_Sessions -CREATE TABLE Tutor_Video_Sessions ( - video_session_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - student_id INT NOT NULL, - session_date TIMESTAMP, - PRIMARY KEY (video_session_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), - FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) -); - --- 57. Tutor_Workshops -CREATE TABLE Tutor_Workshops ( - workshop_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - workshop_name VARCHAR(100), - workshop_description TEXT, - workshop_date TIMESTAMP, - PRIMARY KEY (workshop_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 58. Tutor_Forum -CREATE TABLE Tutor_Forum ( - forum_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - forum_topic VARCHAR(100), - forum_content TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (forum_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 59. Tutor_Forum_Comments -CREATE TABLE Tutor_Forum_Comments ( - comment_id INT NOT NULL AUTO_INCREMENT, - forum_id INT NOT NULL, - student_id INT NOT NULL, - comment_text TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (comment_id), - FOREIGN KEY (forum_id) REFERENCES Tutor_Forum(forum_id), - FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) -); - --- 60. Tutor_Notes -CREATE TABLE Tutor_Notes ( - note_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - note_text TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (note_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 61. Tutor_Articles_Likes -CREATE TABLE Tutor_Articles_Likes ( - like_id INT NOT NULL AUTO_INCREMENT, - article_id INT NOT NULL, - student_id INT NOT NULL, - PRIMARY KEY (like_id), - FOREIGN KEY (article_id) REFERENCES Tutor_Articles(article_id), - FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) -); - --- 62. Tutor_Blog_Likes -CREATE TABLE Tutor_Blog_Likes ( - like_id INT NOT NULL AUTO_INCREMENT, - blog_id INT NOT NULL, - student_id INT NOT NULL, - PRIMARY KEY (like_id), - FOREIGN KEY (blog_id) REFERENCES Tutor_Blog(blog_id), - FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) -); - --- 63. Tutor_Projects_Likes -CREATE TABLE Tutor_Projects_Likes ( - like_id INT NOT NULL AUTO_INCREMENT, - project_id INT NOT NULL, - student_id INT NOT NULL, - PRIMARY KEY (like_id), - FOREIGN KEY (project_id) REFERENCES Tutor_Projects(project_id), - FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) -); - --- 64. Tutor_Certifications_Comments -CREATE TABLE Tutor_Certifications_Comments ( - comment_id INT NOT NULL AUTO_INCREMENT, - certification_id INT NOT NULL, - student_id INT NOT NULL, - comment_text TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (comment_id), - FOREIGN KEY (certification_id) REFERENCES Tutor_Certifications_Two(certification_id), - FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) -); - --- 65. Tutor_Awards_Comments -CREATE TABLE Tutor_Awards_Comments ( - comment_id INT NOT NULL AUTO_INCREMENT, - award_id INT NOT NULL, - student_id INT NOT NULL, - comment_text TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (comment_id), - FOREIGN KEY (award_id) REFERENCES Tutor_Awards(award_id), - FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) -); - --- 66. Tutor_Galleries_Comments -CREATE TABLE Tutor_Galleries_Comments ( - comment_id INT NOT NULL AUTO_INCREMENT, - gallery_id INT NOT NULL, - student_id INT NOT NULL, - comment_text TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (comment_id), - FOREIGN KEY (gallery_id) REFERENCES Tutor_Galleries(gallery_id), - FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) -); - --- 67. Tutor_Resources_Comments -CREATE TABLE Tutor_Resources_Comments ( - comment_id INT NOT NULL AUTO_INCREMENT, - resource_id INT NOT NULL, - student_id INT NOT NULL, - comment_text TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (comment_id), - FOREIGN KEY (resource_id) REFERENCES Tutor_Resources(resource_id), - FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) -); - --- 68. Tutor_SocialMedia_Likes -CREATE TABLE Tutor_SocialMedia_Likes ( - like_id INT NOT NULL AUTO_INCREMENT, - social_media_id INT NOT NULL, - student_id INT NOT NULL, - PRIMARY KEY (like_id), - FOREIGN KEY (social_media_id) REFERENCES Tutor_SocialMedia(social_media_id), - FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) -); - --- 69. Tutor_Financials -CREATE TABLE Tutor_Financials ( - financial_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - income DECIMAL(10, 2), - expenses DECIMAL(10, 2), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (financial_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 70. Tutor_Statistics -CREATE TABLE Tutor_Statistics ( - statistic_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - session_count INT, - feedback_count INT, - success_rate DECIMAL(5, 2), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (statistic_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 71. Tutor_IndustryConnections -CREATE TABLE Tutor_IndustryConnections ( - connection_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - organization_name VARCHAR(100), - contact_person VARCHAR(100), - contact_info VARCHAR(100), - PRIMARY KEY (connection_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 72. Tutor_Referrals -CREATE TABLE Tutor_Referrals ( - referral_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - referred_student_id INT NOT NULL, - referral_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (referral_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), - FOREIGN KEY (referred_student_id) REFERENCES StudentsVT(student_id) -); - --- 73. Tutor_Meeting_Notes -CREATE TABLE Tutor_Meeting_Notes ( - meeting_note_id INT NOT NULL AUTO_INCREMENT, - meeting_id INT NOT NULL, - note_text TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (meeting_note_id), - FOREIGN KEY (meeting_id) REFERENCES Tutor_Meeting(meeting_id) -); - --- 74. Tutor_Languages_Spoken -CREATE TABLE Tutor_Languages_Spoken ( - spoken_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - language_name VARCHAR(100), - PRIMARY KEY (spoken_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 75. Tutor_Interactions -CREATE TABLE Tutor_Interactions ( - interaction_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - student_id INT NOT NULL, - interaction_type VARCHAR(100), -- e.g., call, email - interaction_date TIMESTAMP, - PRIMARY KEY (interaction_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), - FOREIGN KEY (student_id) REFERENCES StudentsVT(student_id) -); - --- 76. Tutor_Feedback -CREATE TABLE Tutor_Feedback ( - feedback_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - feedback_text TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (feedback_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 77. Tutor_Collaborations -CREATE TABLE Tutor_Collaborations ( - collaboration_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - project_name VARCHAR(100), - project_description TEXT, - PRIMARY KEY (collaboration_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 78. Tutor_Conferences -CREATE TABLE Tutor_Conferences ( - conference_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - conference_name VARCHAR(100), - conference_date DATE, - PRIMARY KEY (conference_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 79. Tutor_Podcasts -CREATE TABLE Tutor_Podcasts ( - podcast_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - podcast_title VARCHAR(100), - podcast_url VARCHAR(255), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (podcast_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 80. Tutor_Webinars -CREATE TABLE Tutor_Webinars ( - webinar_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - webinar_title VARCHAR(100), - webinar_date TIMESTAMP, - PRIMARY KEY (webinar_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 81. Tutor_Websites -CREATE TABLE Tutor_Websites ( - website_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - website_url VARCHAR(255), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (website_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 82. Tutor_SocialMediaMetrics -CREATE TABLE Tutor_SocialMediaMetrics ( - metric_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - platform VARCHAR(50), - followers_count INT, - engagement_rate DECIMAL(5, 2), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (metric_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 83. Tutor_Ads -CREATE TABLE Tutor_Ads ( - ad_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - ad_content TEXT, - ad_platform VARCHAR(100), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (ad_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 84. Tutor_AdMetrics -CREATE TABLE Tutor_AdMetrics ( - metric_id INT NOT NULL AUTO_INCREMENT, - ad_id INT NOT NULL, - clicks INT, - impressions INT, - PRIMARY KEY (metric_id), - FOREIGN KEY (ad_id) REFERENCES Tutor_Ads(ad_id) -); - --- 85. Tutor_Competitions -CREATE TABLE Tutor_Competitions ( - competition_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - competition_name VARCHAR(100), - competition_date DATE, - PRIMARY KEY (competition_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 86. Tutor_Networks -CREATE TABLE Tutor_Networks ( - network_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - network_name VARCHAR(100), - PRIMARY KEY (network_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 87. Tutor_Partnerships -CREATE TABLE Tutor_Partnerships ( - partnership_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - partner_name VARCHAR(100), - partnership_date TIMESTAMP, - PRIMARY KEY (partnership_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 88. Tutor_Certifications -CREATE TABLE Tutor_Certifications ( - certification_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - certification_name VARCHAR(100), - issued_date DATE, - expiration_date DATE, - PRIMARY KEY (certification_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 89. Tutor_TrainingPrograms -CREATE TABLE Tutor_TrainingPrograms ( - training_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - program_name VARCHAR(100), - program_description TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (training_id) -); - --- 90. Tutor_FeedbackResponses -CREATE TABLE Tutor_FeedbackResponses ( - response_id INT NOT NULL AUTO_INCREMENT, - feedback_id INT NOT NULL, - response_text TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (response_id), - FOREIGN KEY (feedback_id) REFERENCES Tutor_Feedback(feedback_id) -); - --- 91. Tutor_Mentorships -CREATE TABLE Tutor_Mentorships ( - mentorship_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - mentee_id INT NOT NULL, - start_date DATE, - end_date DATE, - PRIMARY KEY (mentorship_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id), - FOREIGN KEY (mentee_id) REFERENCES StudentsVT(student_id) -); - --- 92. Tutor_Resources -CREATE TABLE Tutor_Resources_Two ( - resource_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - resource_title VARCHAR(100), - resource_url VARCHAR(255), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (resource_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 93. Tutor_Articles -CREATE TABLE Tutor_Articles_Two ( - article_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - article_title VARCHAR(100), - article_content TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (article_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 94. Tutor_TrainingSessions -CREATE TABLE Tutor_TrainingSessions ( - session_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - session_date TIMESTAMP, - session_topic VARCHAR(100), - PRIMARY KEY (session_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 95. Tutor_Videos -CREATE TABLE Tutor_Videos_Two ( - video_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - video_title VARCHAR(100), - video_url VARCHAR(255), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (video_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 96. Tutor_AudioLectures -CREATE TABLE Tutor_AudioLectures ( - audio_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - audio_title VARCHAR(100), - audio_url VARCHAR(255), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (audio_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 97. Tutor_BookRecommendations -CREATE TABLE Tutor_BookRecommendations ( - recommendation_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - book_title VARCHAR(100), - author VARCHAR(100), - PRIMARY KEY (recommendation_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 98. Tutor_FeedbackSurveys -CREATE TABLE Tutor_FeedbackSurveys ( - survey_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - survey_title VARCHAR(100), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (survey_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 99. Tutor_EventParticipation -CREATE TABLE Tutor_EventParticipation ( - participation_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - event_name VARCHAR(100), - event_date DATE, - PRIMARY KEY (participation_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); - --- 100. Tutor_Goals -CREATE TABLE Tutor_Goals ( - goal_id INT NOT NULL AUTO_INCREMENT, - tutor_id INT NOT NULL, - goal_description TEXT, - target_date DATE, - PRIMARY KEY (goal_id), - FOREIGN KEY (tutor_id) REFERENCES Tutors(tutor_id) -); diff --git a/testing/schema-mapping/map-data.py b/testing/schema-mapping/map-data.py index d8aff12..01be250 100644 --- a/testing/schema-mapping/map-data.py +++ b/testing/schema-mapping/map-data.py @@ -2,7 +2,7 @@ import re import yaml -sql_file_name = "example-mysql-schema.sql" +sql_file_name = "ex-mysql-schema.sql" yaml_file_name = "../data/data.yaml" kafka_topic_file_name = "kafka_topics.txt" testing_var_file_name = "../testing_var.yaml" @@ -11,6 +11,7 @@ yaml_file_path = os.path.join(script_dir, yaml_file_name) kafka_file_path = os.path.join(script_dir, kafka_topic_file_name) testing_var_file_path = os.path.join(script_dir, testing_var_file_name) +RECORD_COUNT = 1000 def topic_config(table_names): return [{'name': table + '_topic', 'partitions': 4 } for table in table_names] @@ -81,7 +82,7 @@ def generate_attr_def(attr, attr_type): for name in table_names: streaming_list.append({ "topic_name": name + "_topic", - "record_count": 1000, + "record_count": RECORD_COUNT, "dataset": name, }) write_yaml({"streaming": streaming_list}, testing_var_file_path) From 6f2b0175418b34f6582b41d20d9c696598c19125 Mon Sep 17 00:00:00 2001 From: Kevin Tran Date: Thu, 26 Sep 2024 14:40:12 -0700 Subject: [PATCH 08/15] chore: aggregating into functions and creating TODOs --- README.md | 11 +++---- testing/schema-mapping/README.md | 21 +++++++++++--- testing/schema-mapping/map-data.py | 46 ++++++++++++++++++------------ testing/stream_kafka.py | 3 -- 4 files changed, 50 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 83b1b67..57b104e 100644 --- a/README.md +++ b/README.md @@ -81,8 +81,9 @@ Once you are finished using the project, delete the notebook and the associated ### Code Layout -| Path | Description | -| :--------- | :------------------------------------------------------------- | -| terraform/ | Terraform source code. | -| scripts/ | shell scripts to build, deploy, and interact with the project. | -| testing/ | Example kafka ingestion. | +| Path | Description | +| :---------------------- | :------------------------------------------------------------- | +| terraform/ | Terraform source code. | +| scripts/ | shell scripts to build, deploy, and interact with the project. | +| testing/ | Example kafka ingestion. | +| testing/schema_mapping/ | Mapping out MySQL table syntax to sample entries. | diff --git a/testing/schema-mapping/README.md b/testing/schema-mapping/README.md index e641700..2979edd 100644 --- a/testing/schema-mapping/README.md +++ b/testing/schema-mapping/README.md @@ -1,5 +1,18 @@ -# Reads +# Creating Sample Data from MySQL Syntax -Example file format: `example-mysql-schema.sql` -Running: `python3 testing/schema-mapping/map-data.py` -Output: `tables.yaml` +## MySQL Schema + +Input sample tables into the `testing/schema-mapping/ex-mysql-schema.sql` file. + +## Generate data and testing vars + +Run the following script. + +```bash +python testing/schema-mapping/map-data.py +``` + +Generates: + +- `testing/schema-mapping/kafka_topics.txt`: topics for provisioning deployment +- `testing/testing_var.yaml`: script for automatically loading topics using `testing/stream_kafka.py` diff --git a/testing/schema-mapping/map-data.py b/testing/schema-mapping/map-data.py index 01be250..0b31464 100644 --- a/testing/schema-mapping/map-data.py +++ b/testing/schema-mapping/map-data.py @@ -50,9 +50,27 @@ def generate_attr_def(attr, attr_type): definition["type"] = attr_type return definition +# TODO: Substitution of ' to " and removing initial " with ' +def generate_table_names(tables_dict): + table_names = tables_dict["data"].keys() + topics = topic_config(table_names) + with open(kafka_file_path, 'w') as file: + file.write("\"") + file.write(str(topics)) + file.write("\"") + return table_names -if __name__ == "__main__": - create_table_statements = extract_create_statements(sql_file_path) +def create_streaming_file(table_names): + streaming_list = [] + for name in table_names: + streaming_list.append({ + "topic_name": name + "_topic", + "record_count": RECORD_COUNT, + "dataset": name, + }) + write_yaml({"streaming": streaming_list}, testing_var_file_path) + +def write_tables_dict(create_table_statements): tables_dict = {"data": {}} for table_statement in create_table_statements: table_input = {} @@ -68,24 +86,14 @@ def generate_attr_def(attr, attr_type): tables_dict["data"][name] = table_input print("") write_yaml(tables_dict, yaml_file_path) + return tables_dict - # Generate table kafka loading - table_names = tables_dict["data"].keys() - topics = topic_config(table_names) - with open(kafka_file_path, 'w') as file: - file.write("\"") - file.write(str(topics)) - file.write("\"") - - # Streaming file - streaming_list = [] - for name in table_names: - streaming_list.append({ - "topic_name": name + "_topic", - "record_count": RECORD_COUNT, - "dataset": name, - }) - write_yaml({"streaming": streaming_list}, testing_var_file_path) + +if __name__ == "__main__": + create_table_statements = extract_create_statements(sql_file_path) + tables_dict = write_tables_dict(create_table_statements) + table_names = generate_table_names(tables_dict) + create_streaming_file(table_names) diff --git a/testing/stream_kafka.py b/testing/stream_kafka.py index 95e0048..75e0199 100644 --- a/testing/stream_kafka.py +++ b/testing/stream_kafka.py @@ -21,7 +21,6 @@ def create_kafka_topic(topic_name, num_partitions=1, replication_factor=1): topic_list = [NewTopic(topic_name, num_partitions, replication_factor)] fs = admin_client.create_topics(topic_list) - for topic, f in fs.items(): try: f.result() # The result itself is None @@ -39,14 +38,12 @@ def produce_event_logs_to_kafka(num_records, topic_name, dataset_num): for log in event_logs: producer.produce(topic_name, value=json.dumps(log)) producer.poll(0) # Polls the producer for message delivery events - # Optional: Sleep for a small amount of time to allow the queue to clear time.sleep(0.0001) # Adjust this value as needed print(f"Sent: {log}") # Wait up to 5 seconds for messages to be sent producer.flush(timeout=5) -# Example usage if __name__ == "__main__": file_path = os.getcwd() + "/testing/testing_var.yaml" if os.path.exists(file_path): From 3da144b231baf7284c1472703c225a61424d50f8 Mon Sep 17 00:00:00 2001 From: Kevin Tran Date: Thu, 26 Sep 2024 14:40:45 -0700 Subject: [PATCH 09/15] chore: rewriting to old data.yaml --- testing/data/data.yaml | 8753 +--------------------------------------- 1 file changed, 59 insertions(+), 8694 deletions(-) diff --git a/testing/data/data.yaml b/testing/data/data.yaml index a746af8..e807fae 100644 --- a/testing/data/data.yaml +++ b/testing/data/data.yaml @@ -1,8721 +1,86 @@ data: - abmengagements: - abm_id: - max: 100 - min: 1 - type: int - created_at: - type: timestamp - engagement_id: - max: 100 - min: 1 - type: int - engagement_type: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - lead_id: - max: 100 - min: 1 - type: int - academicadvising: - advising_date: - type: date - advising_id: - max: 100 - min: 1 - type: int - advisor_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - academiccalendar: - end_date: - type: date - semester: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - start_date: - type: date - year: - max: 100 - min: 1 - type: int - academichonors: - criteria: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - honor_id: - max: 100 - min: 1 - type: int - honor_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - academicintegritypolicies: - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - policy_id: - max: 100 - min: 1 - type: int - policy_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - academicpolicies: - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - policy_id: - max: 100 - min: 1 - type: int - policy_title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - academicresources: - resource_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - resource_id: - max: 100 - min: 1 - type: int - resource_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - accountbasedmarketing: - abm_id: - max: 100 - min: 1 - type: int - account_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - target_audience: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - adcampaigns: - ad_campaign_id: - max: 100 - min: 1 - type: int - ad_content: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - ad_platform: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - budget: - max: 100 - min: 1 - type: int - campaign_id: - max: 100 - min: 1 - type: int - end_date: - type: date - start_date: - type: date - adperformance: - ad_campaign_id: - max: 100 - min: 1 - type: int - clicks: - max: 100 - min: 1 - type: int - conversions: - max: 100 - min: 1 - type: int - cost: - max: 100 - min: 1 - type: int - impressions: - max: 100 - min: 1 - type: int - performance_id: - max: 100 - min: 1 - type: int - adspendanalysis: - ad_campaign_id: - max: 100 - min: 1 - type: int - analysis_id: - max: 100 - min: 1 - type: int - conversions: - max: 100 - min: 1 - type: int - leads_generated: - max: 100 - min: 1 - type: int - total_spend: - max: 100 - min: 1 - type: int - affiliateprograms: - commission_rate: - max: 100 - min: 1 - type: int - created_at: - type: timestamp - program_id: - max: 100 - min: 1 - type: int - program_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - affiliates: - affiliate_id: - max: 100 - min: 1 - type: int - affiliate_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - contact_email: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - program_id: - max: 100 - min: 1 - type: int - affiliatesales: - affiliate_id: - max: 100 - min: 1 - type: int - lead_id: - max: 100 - min: 1 - type: int - sale_date: - type: timestamp - sale_id: - max: 100 - min: 1 - type: int - sale_value: - max: 100 - min: 1 - type: int - alumni: - alumni_id: - max: 100 - min: 1 - type: int - first_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - graduation_year: - max: 100 - min: 1 - type: int - last_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - alumniactivities: - activity_date: - type: date - activity_id: - max: 100 - min: 1 - type: int - activity_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - alumni_id: - max: 100 - min: 1 - type: int - analytics: - analytics_id: - max: 100 - min: 1 - type: int - experiment_id: - max: 100 - min: 1 - type: int - metric_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - metric_value: - max: 100 - min: 1 - type: int - recorded_at: - type: timestamp - annotations: - annotation_id: - max: 100 - min: 1 - type: int - created_at: - type: timestamp - experiment_id: - max: 100 - min: 1 - type: int - note: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - apiendpoints: - endpoint_id: - max: 100 - min: 1 - type: int - endpoint_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - method: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - apikeys: - api_key_id: - max: 100 - min: 1 - type: int - created_at: - type: timestamp - key_value: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - user_id: - max: 100 - min: 1 - type: int - apilogs: - endpoint_id: - max: 100 - min: 1 - type: int - log_id: - max: 100 - min: 1 - type: int - request_timestamp: - type: timestamp - response_status: - max: 100 - min: 1 - type: int - architecturereviews: - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - review_id: - max: 100 - min: 1 - type: int - reviewed_at: - type: timestamp - articlefeedback: - article_id: - max: 100 - min: 1 - type: int - feedback_id: - max: 100 - min: 1 - type: int - feedback_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - submitted_at: - type: timestamp - user_id: - max: 100 - min: 1 - type: int - assetallocation: - allocation_date: - type: date - allocation_id: - max: 100 - min: 1 - type: int - asset_id: - max: 100 - min: 1 - type: int - employee_id: - max: 100 - min: 1 - type: int - assignments: - assignment_id: - max: 100 - min: 1 - type: int - assignment_title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - class_id: - max: 100 - min: 1 - type: int - due_date: - type: date - attendance: - attendance_date: - type: date - attendance_id: - max: 100 - min: 1 - type: int - employee_id: - max: 100 - min: 1 - type: int - status: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - attendancevt: - AttendanceVT_date: - type: date - AttendanceVT_id: - max: 100 - min: 1 - type: int - class_id: - max: 100 - min: 1 - type: int - status: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - student_id: - max: 100 - min: 1 - type: int - audienceinsights: - created_at: - type: timestamp - insight_id: - max: 100 - min: 1 - type: int - insight_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - segment_id: - max: 100 - min: 1 - type: int - auditlogs: - action: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - employee_id: - max: 100 - min: 1 - type: int - log_id: - max: 100 - min: 1 - type: int - timestamp: - type: date - auditrecommendations: - audit_id: - max: 100 - min: 1 - type: int - recommendation_id: - max: 100 - min: 1 - type: int - recommendation_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - audittrails: - action: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - performed_at: - type: timestamp - performed_by: - max: 100 - min: 1 - type: int - trail_id: - max: 100 - min: 1 - type: int - automationactions: - action_details: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - action_id: - max: 100 - min: 1 - type: int - action_type: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - automation_id: - max: 100 - min: 1 - type: int - awards: - award_id: - max: 100 - min: 1 - type: int - award_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - backlogrefinements: - backlog_id: - max: 100 - min: 1 - type: int - refined_at: - type: timestamp - refinement_id: - max: 100 - min: 1 - type: int - backlogs: - backlog_id: - max: 100 - min: 1 - type: int - sprint_id: - max: 100 - min: 1 - type: int - task_id: - max: 100 - min: 1 - type: int - bookloans: - book_id: - max: 100 - min: 1 - type: int - loan_date: - type: date - loan_id: - max: 100 - min: 1 - type: int - return_date: - type: date - student_id: - max: 100 - min: 1 - type: int - brandawareness: - awareness_id: - max: 100 - min: 1 - type: int - awareness_level: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - campaign_id: - max: 100 - min: 1 - type: int - created_at: - type: timestamp - brandguidelines: - content: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - guideline_id: - max: 100 - min: 1 - type: int - guideline_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - brandperception: - created_at: - type: timestamp - lead_id: - max: 100 - min: 1 - type: int - perception_id: - max: 100 - min: 1 - type: int - perception_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - budgetallocations: - allocated_amount: - max: 100 - min: 1 - type: int - allocation_id: - max: 100 - min: 1 - type: int - campaign_id: - max: 100 - min: 1 - type: int - businesscontinuityplans: - created_date: - type: date - plan_id: - max: 100 - min: 1 - type: int - plan_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - businessgoals: - goal_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - goal_id: - max: 100 - min: 1 - type: int - target_date: - type: date - businessunits: - unit_id: - max: 100 - min: 1 - type: int - unit_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - campaignchannels: - campaign_id: - max: 100 - min: 1 - type: int - channel_id: - max: 100 - min: 1 - type: int - channel_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - campaignperformance: - campaign_id: - max: 100 - min: 1 - type: int - performance_id: - max: 100 - min: 1 - type: int - performance_metric: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - value: - max: 100 - min: 1 - type: int - campaigns: - budget: - max: 100 - min: 1 - type: int - campaign_id: - max: 100 - min: 1 - type: int - campaign_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - end_date: - type: date - start_date: - type: date - campaigntrends: - campaign_id: - max: 100 - min: 1 - type: int - created_at: - type: timestamp - trend_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - trend_id: - max: 100 - min: 1 - type: int - campusfacilities: - facility_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - facility_id: - max: 100 - min: 1 - type: int - facility_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - campusnews: - content: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - news_id: - max: 100 - min: 1 - type: int - published_date: - type: date - title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - campusorganizations: - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - organization_id: - max: 100 - min: 1 - type: int - organization_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - campussurveys: - created_date: - type: date - survey_id: - max: 100 - min: 1 - type: int - survey_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - campusvtevents: - campus_event_id: - max: 100 - min: 1 - type: int - event_date: - type: date - event_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - careerappointments: - appointment_date: - type: date - appointment_id: - max: 100 - min: 1 - type: int - service_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - careerservices: - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - service_id: - max: 100 - min: 1 - type: int - service_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - changerequestapprovals: - approval_id: - max: 100 - min: 1 - type: int - approved_at: - type: timestamp - approved_by: - max: 100 - min: 1 - type: int - request_id: - max: 100 - min: 1 - type: int - changerequests: - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - request_id: - max: 100 - min: 1 - type: int - requested_at: - type: timestamp - status: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - checklistitems: - checklist_id: - max: 100 - min: 1 - type: int - completed: - max: 1 - min: 0 - type: int - item_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - item_id: - max: 100 - min: 1 - type: int - churnanalysis: - churn_id: - max: 100 - min: 1 - type: int - churn_reason: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - lead_id: - max: 100 - min: 1 - type: int - classes: - class_id: - max: 100 - min: 1 - type: int - course_id: - max: 100 - min: 1 - type: int - instructor_id: - max: 100 - min: 1 - type: int - semester: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - year: - max: 100 - min: 1 - type: int - classroomresources: - class_id: - max: 100 - min: 1 - type: int - resource_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - resource_id: - max: 100 - min: 1 - type: int - resource_type: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - clicks: - click_id: - max: 100 - min: 1 - type: int - click_time: - type: timestamp - event_id: - max: 100 - min: 1 - type: int - user_id: - max: 100 - min: 1 - type: int - clients: - client_id: - max: 100 - min: 1 - type: int - client_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - contact_person: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - email: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - phone: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - codereviews: - review_date: - type: timestamp - review_id: - max: 100 - min: 1 - type: int - reviewer_id: - max: 100 - min: 1 - type: int - status: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - task_id: - max: 100 - min: 1 - type: int - codeusage: - code_id: - max: 100 - min: 1 - type: int - lead_id: - max: 100 - min: 1 - type: int - usage_id: - max: 100 - min: 1 - type: int - used_at: - type: timestamp - cohortmembers: - cohort_id: - max: 100 - min: 1 - type: int - joined_at: - type: timestamp - member_id: - max: 100 - min: 1 - type: int - user_id: - max: 100 - min: 1 - type: int - cohorts: - cohort_id: - max: 100 - min: 1 - type: int - cohort_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - collaborationnotes: - collaboration_id: - max: 100 - min: 1 - type: int - created_at: - type: timestamp - note_id: - max: 100 - min: 1 - type: int - note_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - collaborationtools: - tool_id: - max: 100 - min: 1 - type: int - tool_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - collateralusage: - campaign_id: - max: 100 - min: 1 - type: int - collateral_id: - max: 100 - min: 1 - type: int - usage_id: - max: 100 - min: 1 - type: int - communicationlogs: - communication_type: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - log_date: - type: timestamp - log_id: - max: 100 - min: 1 - type: int - user_id: - max: 100 - min: 1 - type: int - communityengagement: - engagement_date: - type: date - engagement_id: - max: 100 - min: 1 - type: int - engagement_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - communityservice: - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - service_id: - max: 100 - min: 1 - type: int - service_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - companyassets: - asset_id: - max: 100 - min: 1 - type: int - asset_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - purchase_date: - type: date - value: - max: 100 - min: 1 - type: int - companyeventsvt: - event_date: - type: date - event_id: - max: 100 - min: 1 - type: int - event_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - companypolicies: - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - policy_id: - max: 100 - min: 1 - type: int - policy_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - companyvehicles: - purchase_date: - type: date - value: - max: 100 - min: 1 - type: int - vehicle_id: - max: 100 - min: 1 - type: int - vehicle_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - competitoractions: - action_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - action_id: - max: 100 - min: 1 - type: int - tracking_id: - max: 100 - min: 1 - type: int - competitoranalysis: - analysis_id: - max: 100 - min: 1 - type: int - competitor_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - strengths: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - weaknesses: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - competitortracking: - competitor_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - monitoring_date: - type: timestamp - tracking_id: - max: 100 - min: 1 - type: int - complianceaudits: - audit_date: - type: date - audit_id: - max: 100 - min: 1 - type: int - findings: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - compliancechecklists: - checklist_id: - max: 100 - min: 1 - type: int - checklist_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - conferenceparticipation: - conference_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - date_of_conference: - type: date - participation_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - contacts: - contact_date: - type: timestamp - contact_id: - max: 100 - min: 1 - type: int - contact_method: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - lead_id: - max: 100 - min: 1 - type: int - notes: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - contentcalendar: - calendar_id: - max: 100 - min: 1 - type: int - content_type: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - scheduled_date: - type: date - title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - contentengagement: - engagement_date: - type: timestamp - engagement_id: - max: 100 - min: 1 - type: int - engagement_type: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - lead_id: - max: 100 - min: 1 - type: int - piece_id: - max: 100 - min: 1 - type: int - contentperformance: - created_at: - type: timestamp - metrics: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - performance_id: - max: 100 - min: 1 - type: int - piece_id: - max: 100 - min: 1 - type: int - contentpieces: - calendar_id: - max: 100 - min: 1 - type: int - content_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - piece_id: - max: 100 - min: 1 - type: int - contracts: - client_id: - max: 100 - min: 1 - type: int - contract_id: - max: 100 - min: 1 - type: int - contract_value: - max: 100 - min: 1 - type: int - end_date: - type: date - start_date: - type: date - conversionrates: - campaign_id: - max: 100 - min: 1 - type: int - conversion_rate: - max: 100 - min: 1 - type: int - created_at: - type: timestamp - rate_id: - max: 100 - min: 1 - type: int - counselingservices: - counseling_service_id: - max: 100 - min: 1 - type: int - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - service_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - counselingsessions: - counselor_id: - max: 100 - min: 1 - type: int - notes: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - session_date: - type: date - session_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - courseannouncements: - announcement_date: - type: date - announcement_id: - max: 100 - min: 1 - type: int - announcement_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - course_id: - max: 100 - min: 1 - type: int - courseevaluations: - comments: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - course_id: - max: 100 - min: 1 - type: int - evaluation_id: - max: 100 - min: 1 - type: int - rating: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - coursefeedback: - course_feedback_id: - max: 100 - min: 1 - type: int - course_id: - max: 100 - min: 1 - type: int - feedback_date: - type: date - feedback_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - student_id: - max: 100 - min: 1 - type: int - courseforums: - course_id: - max: 100 - min: 1 - type: int - created_date: - type: date - forum_id: - max: 100 - min: 1 - type: int - title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - courselibraries: - course_id: - max: 100 - min: 1 - type: int - library_id: - max: 100 - min: 1 - type: int - resource_id: - max: 100 - min: 1 - type: int - coursematerials: - course_id: - max: 100 - min: 1 - type: int - material_id: - max: 100 - min: 1 - type: int - material_link: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - material_type: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - courseprerequisites: - course_id: - max: 100 - min: 1 - type: int - prerequisite_course_id: - max: 100 - min: 1 - type: int - courses: - course_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - course_id: - max: 100 - min: 1 - type: int - course_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - credits: - max: 100 - min: 1 - type: int - courseschedules: - class_id: - max: 100 - min: 1 - type: int - course_id: - max: 100 - min: 1 - type: int - end_time: - type: timestamp - schedule_date: - type: date - schedule_id: - max: 100 - min: 1 - type: int - start_time: - type: timestamp - coursesubscriptions: - course_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - subscription_date: - type: date - subscription_id: - max: 100 - min: 1 - type: int - crisismanagement: - crisis_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - crisis_id: - max: 100 - min: 1 - type: int - response_plan: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - crisisresponse: - crisis_id: - max: 100 - min: 1 - type: int - response_date: - type: date - response_id: - max: 100 - min: 1 - type: int - customeracquisition: - acquisition_date: - type: timestamp - acquisition_id: - max: 100 - min: 1 - type: int - lead_id: - max: 100 - min: 1 - type: int - customerfeedback: - client_id: - max: 100 - min: 1 - type: int - feedback_date: - type: date - feedback_id: - max: 100 - min: 1 - type: int - feedback_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - customerjourney: - created_at: - type: timestamp - journey_id: - max: 100 - min: 1 - type: int - lead_id: - max: 100 - min: 1 - type: int - touchpoints: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - customerloyaltyprograms: - created_at: - type: timestamp - points_required: - max: 100 - min: 1 - type: int - program_id: - max: 100 - min: 1 - type: int - program_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - customerretention: - created_at: - type: timestamp - lead_id: - max: 100 - min: 1 - type: int - retention_id: - max: 100 - min: 1 - type: int - retention_score: - max: 100 - min: 1 - type: int - customerretentionprograms: - created_at: - type: timestamp - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - program_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - retention_program_id: - max: 100 - min: 1 - type: int - customersegmentation: - created_at: - type: timestamp - criteria: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - segment_id: - max: 100 - min: 1 - type: int - segment_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - customersegmentationcriteria: - criteria_id: - max: 100 - min: 1 - type: int - criteria_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - segment_id: - max: 100 - min: 1 - type: int - customersuccessstories: - created_at: - type: timestamp - lead_id: - max: 100 - min: 1 - type: int - story_id: - max: 100 - min: 1 - type: int - success_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - dataprivacyagreements: - agreement_id: - max: 100 - min: 1 - type: int - agreement_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - signed_at: - type: timestamp - user_id: - max: 100 - min: 1 - type: int - debtresolutions: - debt_id: - max: 100 - min: 1 - type: int - resolution_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - resolution_id: - max: 100 - min: 1 - type: int - resolved_at: - type: timestamp - departments: - department_id: - max: 100 - min: 1 - type: int - department_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - location: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - deploymentlogs: - deployment_date: - type: timestamp - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - log_id: - max: 100 - min: 1 - type: int - dept: - department_id: - max: 100 - min: 1 - type: int - department_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - developmenttasks: - assigned_to: - max: 100 - min: 1 - type: int - created_at: - type: timestamp - status: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - task_id: - max: 100 - min: 1 - type: int - task_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - digitalmarketingstrategy: - created_at: - type: timestamp - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - strategy_id: - max: 100 - min: 1 - type: int - strategy_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - disasterrecoveryplans: - created_date: - type: date - plan_id: - max: 100 - min: 1 - type: int - plan_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - discounts: - discount_code: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - discount_id: - max: 100 - min: 1 - type: int - discount_percentage: - max: 100 - min: 1 - type: int - valid_until: - type: date - discussionboards: - board_id: - max: 100 - min: 1 - type: int - course_id: - max: 100 - min: 1 - type: int - created_date: - type: date - title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - discussionposts: - board_id: - max: 100 - min: 1 - type: int - content: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - post_date: - type: date - post_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - documentation: - content: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - doc_id: - max: 100 - min: 1 - type: int - title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - documentmanagement: - document_id: - max: 100 - min: 1 - type: int - document_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - employee_id: - max: 100 - min: 1 - type: int - upload_date: - type: date - emailcampaigns: - body: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - campaign_id: - max: 100 - min: 1 - type: int - email_campaign_id: - max: 100 - min: 1 - type: int - sent_at: - type: timestamp - subject: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - emailclicks: - click_id: - max: 100 - min: 1 - type: int - clicked_at: - type: timestamp - email_campaign_id: - max: 100 - min: 1 - type: int - lead_id: - max: 100 - min: 1 - type: int - emailopens: - email_campaign_id: - max: 100 - min: 1 - type: int - lead_id: - max: 100 - min: 1 - type: int - open_id: - max: 100 - min: 1 - type: int - opened_at: - type: timestamp - emergencycontacts: - contact_id: - max: 100 - min: 1 - type: int - contact_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - contact_phone: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - relationship: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - student_id: - max: 100 - min: 1 - type: int - employeebenefits: - benefit_id: - max: 100 - min: 1 - type: int - benefit_type: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - employee_id: - max: 100 - min: 1 - type: int - employeecomplaints: - complaint_date: - type: date - complaint_id: - max: 100 - min: 1 - type: int - complaint_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - employee_id: - max: 100 - min: 1 - type: int - employeedepartments: - department_id: - max: 100 - min: 1 - type: int - emp_dept_id: - max: 100 - min: 1 - type: int - employee_id: - max: 100 - min: 1 - type: int - end_date: - type: date - start_date: - type: date - employeeoffboarding: - employee_id: - max: 100 - min: 1 - type: int - offboarding_date: - type: date - offboarding_id: - max: 100 - min: 1 - type: int - employeeonboarding: - employee_id: - max: 100 - min: 1 - type: int - onboarding_date: - type: date - onboarding_id: - max: 100 - min: 1 - type: int - employeerelocation: - employee_id: - max: 100 - min: 1 - type: int - new_location_id: - max: 100 - min: 1 - type: int - relocation_date: - type: date - relocation_id: - max: 100 - min: 1 - type: int - employees: - email: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - employee_id: - max: 100 - min: 1 - type: int - first_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - hire_date: - type: date - job_title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - last_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - phone: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - salary: - max: 100 - min: 1 - type: int - employeesurveys: - submission_date: - type: date - survey_id: - max: 100 - min: 1 - type: int - survey_title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - employeetraining: - employee_id: - max: 100 - min: 1 - type: int - training_id: - max: 100 - min: 1 - type: int - training_participation_id: - max: 100 - min: 1 - type: int - enrollments: - course_id: - max: 100 - min: 1 - type: int - enrollment_date: - type: date - enrollment_id: - max: 100 - min: 1 - type: int - grade: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - event_attendees: - attendee_id: - max: 100 - min: 1 - type: int - event_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - eventattendees: - attendee_id: - max: 100 - min: 1 - type: int - event_id: - max: 100 - min: 1 - type: int - lead_id: - max: 100 - min: 1 - type: int - registered_at: - type: timestamp - eventcoordination: - coordination_id: - max: 100 - min: 1 - type: int - employee_id: - max: 100 - min: 1 - type: int - event_id: - max: 100 - min: 1 - type: int - eventcoordinationtwo: - coordination_id: - max: 100 - min: 1 - type: int - event_id: - max: 100 - min: 1 - type: int - staff_id: - max: 100 - min: 1 - type: int - eventfeedback: - event_id: - max: 100 - min: 1 - type: int - feedback_id: - max: 100 - min: 1 - type: int - feedback_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - lead_id: - max: 100 - min: 1 - type: int - submitted_at: - type: timestamp - eventmarketing: - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - event_date: - type: date - event_id: - max: 100 - min: 1 - type: int - event_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - location: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - eventparticipants: - employee_id: - max: 100 - min: 1 - type: int - event_id: - max: 100 - min: 1 - type: int - participant_id: - max: 100 - min: 1 - type: int - eventparticipation: - event_id: - max: 100 - min: 1 - type: int - participation_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - events: - event_id: - max: 100 - min: 1 - type: int - event_timestamp: - type: timestamp - event_type: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - experiment_id: - max: 100 - min: 1 - type: int - user_id: - max: 100 - min: 1 - type: int - eventsponsorships: - event_id: - max: 100 - min: 1 - type: int - sponsor_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - sponsorship_amount: - max: 100 - min: 1 - type: int - sponsorship_id: - max: 100 - min: 1 - type: int - eventsvt: - event_date: - type: date - event_id: - max: 100 - min: 1 - type: int - event_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - location: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - expenses: - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - employee_id: - max: 100 - min: 1 - type: int - expense_amount: - max: 100 - min: 1 - type: int - expense_date: - type: date - expense_id: - max: 100 - min: 1 - type: int - experiments: - end_date: - type: date - experiment_id: - max: 100 - min: 1 - type: int - experiment_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - start_date: - type: date - status: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - externalcollaborations: - collaboration_id: - max: 100 - min: 1 - type: int - company_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - contact_person: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - extracurriculars: - activity_id: - max: 100 - min: 1 - type: int - activity_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - facilityreservations: - facility_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - reservation_date: - type: date - reservation_id: - max: 100 - min: 1 - type: int - reserved_by: - max: 100 - min: 1 - type: int - facilityusage: - facility_id: - max: 100 - min: 1 - type: int - usage_date: - type: date - usage_id: - max: 100 - min: 1 - type: int - facultymeetings: - agenda: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - meeting_date: - type: date - meeting_id: - max: 100 - min: 1 - type: int - featureflags: - flag_id: - max: 100 - min: 1 - type: int - flag_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - is_active: - max: 1 - min: 0 - type: int - feedback: - experiment_id: - max: 100 - min: 1 - type: int - feedback_id: - max: 100 - min: 1 - type: int - feedback_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - submitted_at: - type: timestamp - user_id: - max: 100 - min: 1 - type: int - feedback2: - feedback_date: - type: date - feedback_id: - max: 100 - min: 1 - type: int - feedback_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - student_id: - max: 100 - min: 1 - type: int - feedbackforms: - form_id: - max: 100 - min: 1 - type: int - form_title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - submission_date: - type: date - feedbackresponses: - employee_id: - max: 100 - min: 1 - type: int - form_id: - max: 100 - min: 1 - type: int - response_id: - max: 100 - min: 1 - type: int - response_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - financialaidedu: - aid_amount: - max: 100 - min: 1 - type: int - aid_id: - max: 100 - min: 1 - type: int - aid_type: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - awarded_date: - type: date - student_id: - max: 100 - min: 1 - type: int - financialaidedutwo: - aid_amount: - max: 100 - min: 1 - type: int - aid_date: - type: date - aid_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - financialreports: - net_profit: - max: 100 - min: 1 - type: int - report_date: - type: date - report_id: - max: 100 - min: 1 - type: int - total_expenses: - max: 100 - min: 1 - type: int - total_revenue: - max: 100 - min: 1 - type: int - flagassignments: - assigned_at: - type: timestamp - assignment_id: - max: 100 - min: 1 - type: int - flag_id: - max: 100 - min: 1 - type: int - user_id: - max: 100 - min: 1 - type: int - forumresponses: - content: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - forum_id: - max: 100 - min: 1 - type: int - response_date: - type: date - response_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - gallery_images: - created_at: - type: timestamp - gallery_id: - max: 100 - min: 1 - type: int - image_id: - max: 100 - min: 1 - type: int - image_url: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - goalmetrics: - conversion_count: - max: 100 - min: 1 - type: int - goal_id: - max: 100 - min: 1 - type: int - metric_id: - max: 100 - min: 1 - type: int - variant_id: - max: 100 - min: 1 - type: int - goalprogress: - goal_id: - max: 100 - min: 1 - type: int - progress_id: - max: 100 - min: 1 - type: int - progress_percentage: - max: 100 - min: 1 - type: int - goals: - experiment_id: - max: 100 - min: 1 - type: int - goal_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - goal_id: - max: 100 - min: 1 - type: int - grades: - assignment_id: - max: 100 - min: 1 - type: int - enrollment_id: - max: 100 - min: 1 - type: int - grade_id: - max: 100 - min: 1 - type: int - score: - max: 100 - min: 1 - type: int - groupmembers: - group_id: - max: 100 - min: 1 - type: int - group_member_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - groupmemberships: - group_id: - max: 100 - min: 1 - type: int - membership_id: - max: 100 - min: 1 - type: int - user_id: - max: 100 - min: 1 - type: int - healthandsafety: - inspection_date: - type: date - safety_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - safety_id: - max: 100 - min: 1 - type: int - healthrecords: - details: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - record_date: - type: date - record_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - incidentreports: - incident_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - report_id: - max: 100 - min: 1 - type: int - reported_at: - type: timestamp - incidentresolutions: - report_id: - max: 100 - min: 1 - type: int - resolution_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - resolution_id: - max: 100 - min: 1 - type: int - resolved_at: - type: timestamp - increpo: - incident_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - report_date: - type: date - report_id: - max: 100 - min: 1 - type: int - influencercollaborations: - campaign_id: - max: 100 - min: 1 - type: int - collaboration_id: - max: 100 - min: 1 - type: int - created_at: - type: timestamp - influencer_id: - max: 100 - min: 1 - type: int - terms: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - influencermarketing: - created_at: - type: timestamp - influencer_id: - max: 100 - min: 1 - type: int - influencer_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - platform: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - initiativeprogress: - initiative_id: - max: 100 - min: 1 - type: int - progress_id: - max: 100 - min: 1 - type: int - progress_percentage: - max: 100 - min: 1 - type: int - instructors: - email: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - first_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - hire_date: - type: date - instructor_id: - max: 100 - min: 1 - type: int - last_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - integrationresults: - executed_at: - type: timestamp - result_id: - max: 100 - min: 1 - type: int - status: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - test_id: - max: 100 - min: 1 - type: int - integrationtests: - expected_outcome: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - test_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - test_id: - max: 100 - min: 1 - type: int - integrityviolations: - policy_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - violation_date: - type: date - violation_id: - max: 100 - min: 1 - type: int - internationalstudents: - country_of_origin: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - international_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - visa_status: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - internships: - application_deadline: - type: date - company_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - internship_id: - max: 100 - min: 1 - type: int - position: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - inventory: - inventory_id: - max: 100 - min: 1 - type: int - last_updated: - type: date - product_id: - max: 100 - min: 1 - type: int - stock_level: - max: 100 - min: 1 - type: int - invoices: - amount: - max: 100 - min: 1 - type: int - client_id: - max: 100 - min: 1 - type: int - invoice_date: - type: date - invoice_id: - max: 100 - min: 1 - type: int - status: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - itassets: - asset_id: - max: 100 - min: 1 - type: int - asset_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - purchase_date: - type: date - value: - max: 100 - min: 1 - type: int - itsupporttickets: - employee_id: - max: 100 - min: 1 - type: int - issue_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - status: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - submission_date: - type: date - ticket_id: - max: 100 - min: 1 - type: int - knowledgebasearticles: - article_id: - max: 100 - min: 1 - type: int - content: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - kpitracking: - kpi_id: - max: 100 - min: 1 - type: int - tracked_date: - type: date - tracking_id: - max: 100 - min: 1 - type: int - value: - max: 100 - min: 1 - type: int - laboratoryequipment: - available_units: - max: 100 - min: 1 - type: int - equipment_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - equipment_id: - max: 100 - min: 1 - type: int - equipment_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - labreservations: - equipment_id: - max: 100 - min: 1 - type: int - reservation_date: - type: date - reservation_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - leadassignments: - assigned_at: - type: timestamp - assignment_id: - max: 100 - min: 1 - type: int - lead_id: - max: 100 - min: 1 - type: int - user_id: - max: 100 - min: 1 - type: int - leads: - created_at: - type: timestamp - email: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - first_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - last_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - lead_id: - max: 100 - min: 1 - type: int - phone: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - source: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - status: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - leadscoring: - created_at: - type: timestamp - lead_id: - max: 100 - min: 1 - type: int - score: - max: 100 - min: 1 - type: int - score_id: - max: 100 - min: 1 - type: int - leadsources: - source_id: - max: 100 - min: 1 - type: int - source_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - legaldocuments: - document_id: - max: 100 - min: 1 - type: int - document_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - upload_date: - type: date - library: - author: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - available_copies: - max: 100 - min: 1 - type: int - book_id: - max: 100 - min: 1 - type: int - published_year: - max: 100 - min: 1 - type: int - title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - lmsaccounts: - lms_account_id: - max: 100 - min: 1 - type: int - password_hash: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - student_id: - max: 100 - min: 1 - type: int - username: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - loadtestresults: - executed_at: - type: timestamp - load_test_id: - max: 100 - min: 1 - type: int - result_id: - max: 100 - min: 1 - type: int - status: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - loadtests: - expected_load: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - load_test_id: - max: 100 - min: 1 - type: int - test_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - loyaltyprogrammembers: - lead_id: - max: 100 - min: 1 - type: int - member_id: - max: 100 - min: 1 - type: int - points_earned: - max: 100 - min: 1 - type: int - program_id: - max: 100 - min: 1 - type: int - loyaltyredemptions: - member_id: - max: 100 - min: 1 - type: int - redeemed_points: - max: 100 - min: 1 - type: int - redemption_date: - type: timestamp - redemption_id: - max: 100 - min: 1 - type: int - markcustomerfeedback: - feedback_id: - max: 100 - min: 1 - type: int - feedback_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - lead_id: - max: 100 - min: 1 - type: int - submitted_at: - type: timestamp - marketinganalytics: - analysis_date: - type: date - analytics_id: - max: 100 - min: 1 - type: int - campaign_id: - max: 100 - min: 1 - type: int - insights: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - marketingautomation: - automation_id: - max: 100 - min: 1 - type: int - created_at: - type: timestamp - name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - trigger_event: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - marketingbudgets: - allocated_amount: - max: 100 - min: 1 - type: int - budget_id: - max: 100 - min: 1 - type: int - campaign_id: - max: 100 - min: 1 - type: int - spent_amount: - max: 100 - min: 1 - type: int - marketingcampaigns: - budget: - max: 100 - min: 1 - type: int - campaign_id: - max: 100 - min: 1 - type: int - campaign_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - end_date: - type: date - start_date: - type: date - marketingcollateral: - collateral_id: - max: 100 - min: 1 - type: int - collateral_type: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - marketingevents: - created_at: - type: timestamp - event_date: - type: date - event_id: - max: 100 - min: 1 - type: int - event_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - event_type: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - marketingeventsfeedback: - created_at: - type: timestamp - event_id: - max: 100 - min: 1 - type: int - feedback_id: - max: 100 - min: 1 - type: int - feedback_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - lead_id: - max: 100 - min: 1 - type: int - marketinggoals: - actual_value: - max: 100 - min: 1 - type: int - created_at: - type: timestamp - goal_id: - max: 100 - min: 1 - type: int - goal_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - target_value: - max: 100 - min: 1 - type: int - marketingkpis: - actual_value: - max: 100 - min: 1 - type: int - created_at: - type: timestamp - kpi_id: - max: 100 - min: 1 - type: int - kpi_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - target_value: - max: 100 - min: 1 - type: int - marketingmaterials: - content: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - material_id: - max: 100 - min: 1 - type: int - material_type: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - marketingpartnerships: - collaboration_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - partner_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - partnership_id: - max: 100 - min: 1 - type: int - marketingperformance: - campaign_id: - max: 100 - min: 1 - type: int - conversions: - max: 100 - min: 1 - type: int - created_at: - type: timestamp - leads_generated: - max: 100 - min: 1 - type: int - performance_id: - max: 100 - min: 1 - type: int - marketingresearch: - created_at: - type: timestamp - findings: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - research_id: - max: 100 - min: 1 - type: int - topic: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - marketingtechstack: - created_at: - type: timestamp - tech_id: - max: 100 - min: 1 - type: int - tech_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - usage_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - marketingtraining: - created_at: - type: timestamp - training_date: - type: date - training_id: - max: 100 - min: 1 - type: int - training_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - marketingworkshops: - created_at: - type: timestamp - date: - type: date - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - workshop_id: - max: 100 - min: 1 - type: int - workshop_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - marketresearch: - findings: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - research_date: - type: date - research_id: - max: 100 - min: 1 - type: int - research_topic: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - markmarketresearch: - created_at: - type: timestamp - findings: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - research_id: - max: 100 - min: 1 - type: int - research_topic: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - marksurveyresponses: - lead_id: - max: 100 - min: 1 - type: int - question_id: - max: 100 - min: 1 - type: int - response_id: - max: 100 - min: 1 - type: int - response_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - submitted_at: - type: timestamp - materialusage: - campaign_id: - max: 100 - min: 1 - type: int - material_id: - max: 100 - min: 1 - type: int - usage_id: - max: 100 - min: 1 - type: int - mediaeventsvt: - event_date: - type: date - event_id: - max: 100 - min: 1 - type: int - event_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - media_id: - max: 100 - min: 1 - type: int - mediarelations: - contact_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - email: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - media_id: - max: 100 - min: 1 - type: int - phone: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - mediaspend: - amount: - max: 100 - min: 1 - type: int - campaign_id: - max: 100 - min: 1 - type: int - media_type: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - spend_date: - type: date - spend_id: - max: 100 - min: 1 - type: int - meetingattendancevt: - AttendanceVT_id: - max: 100 - min: 1 - type: int - instructor_id: - max: 100 - min: 1 - type: int - meeting_id: - max: 100 - min: 1 - type: int - meetingnotes: - meeting_date: - type: timestamp - note_id: - max: 100 - min: 1 - type: int - notes: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - meetingparticipants: - employee_id: - max: 100 - min: 1 - type: int - meeting_id: - max: 100 - min: 1 - type: int - participant_id: - max: 100 - min: 1 - type: int - meetings: - agenda: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - meeting_date: - type: date - meeting_id: - max: 100 - min: 1 - type: int - mentormentee: - mentee_id: - max: 100 - min: 1 - type: int - mentor_id: - max: 100 - min: 1 - type: int - relationship_id: - max: 100 - min: 1 - type: int - start_date: - type: date - metrics: - experiment_id: - max: 100 - min: 1 - type: int - metric_id: - max: 100 - min: 1 - type: int - metric_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - metric_value: - max: 100 - min: 1 - type: int - recorded_at: - type: timestamp - milestones: - milestone_date: - type: date - milestone_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - milestone_id: - max: 100 - min: 1 - type: int - timeline_id: - max: 100 - min: 1 - type: int - notifications: - message: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - notification_id: - max: 100 - min: 1 - type: int - sent_at: - type: timestamp - user_id: - max: 100 - min: 1 - type: int - notify: - message: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - notification_date: - type: date - notification_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - officelocations: - address: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - city: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - location_id: - max: 100 - min: 1 - type: int - state: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - zip: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - officeresources: - location_id: - max: 100 - min: 1 - type: int - quantity: - max: 100 - min: 1 - type: int - resource_id: - max: 100 - min: 1 - type: int - resource_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - onlineresources: - course_id: - max: 100 - min: 1 - type: int - resource_id: - max: 100 - min: 1 - type: int - resource_link: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - operationalmetrics: - measurement_date: - type: date - metric_id: - max: 100 - min: 1 - type: int - metric_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - value: - max: 100 - min: 1 - type: int - opportunities: - close_date: - type: date - lead_id: - max: 100 - min: 1 - type: int - opportunity_id: - max: 100 - min: 1 - type: int - opportunity_value: - max: 100 - min: 1 - type: int - stage: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - organizationmembership: - membership_id: - max: 100 - min: 1 - type: int - organization_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - pageviews: - page_url: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - session_id: - max: 100 - min: 1 - type: int - user_id: - max: 100 - min: 1 - type: int - view_id: - max: 100 - min: 1 - type: int - view_time: - type: timestamp - parents: - email: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - first_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - last_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - parent_id: - max: 100 - min: 1 - type: int - phone: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - partnershipactivities: - activity_date: - type: timestamp - activity_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - activity_id: - max: 100 - min: 1 - type: int - partnership_id: - max: 100 - min: 1 - type: int - partnershipengagements: - created_at: - type: timestamp - engagement_id: - max: 100 - min: 1 - type: int - engagement_type: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - lead_id: - max: 100 - min: 1 - type: int - partnership_id: - max: 100 - min: 1 - type: int - partnerships: - end_date: - type: date - partner_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - partnership_id: - max: 100 - min: 1 - type: int - partnership_type: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - start_date: - type: date - passwordresets: - reset_date: - type: date - reset_id: - max: 100 - min: 1 - type: int - user_id: - max: 100 - min: 1 - type: int - paymentmethods: - method_id: - max: 100 - min: 1 - type: int - method_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - payments: - amount: - max: 100 - min: 1 - type: int - invoice_id: - max: 100 - min: 1 - type: int - payment_date: - type: date - payment_id: - max: 100 - min: 1 - type: int - paymentsvt: - amount: - max: 100 - min: 1 - type: int - payment_date: - type: timestamp - payment_id: - max: 100 - min: 1 - type: int - session_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - paymenttransactions: - amount: - max: 100 - min: 1 - type: int - method_id: - max: 100 - min: 1 - type: int - transaction_date: - type: date - transaction_id: - max: 100 - min: 1 - type: int - performancemetrics: - campaign_id: - max: 100 - min: 1 - type: int - conversions: - max: 100 - min: 1 - type: int - leads_generated: - max: 100 - min: 1 - type: int - metric_id: - max: 100 - min: 1 - type: int - revenue: - max: 100 - min: 1 - type: int - performanceresults: - executed_at: - type: timestamp - performance_test_id: - max: 100 - min: 1 - type: int - result_id: - max: 100 - min: 1 - type: int - status: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - performancereviews: - comments: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - employee_id: - max: 100 - min: 1 - type: int - review_date: - type: date - review_id: - max: 100 - min: 1 - type: int - score: - max: 100 - min: 1 - type: int - performancereviews2: - comments: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - review_id: - max: 100 - min: 1 - type: int - review_period: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - user_id: - max: 100 - min: 1 - type: int - performancetests: - expected_performance: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - performance_test_id: - max: 100 - min: 1 - type: int - test_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - planimplementation: - implementation_date: - type: date - implementation_id: - max: 100 - min: 1 - type: int - plan_id: - max: 100 - min: 1 - type: int - plantesting: - plan_id: - max: 100 - min: 1 - type: int - results: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - test_date: - type: date - test_id: - max: 100 - min: 1 - type: int - policies: - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - policy_id: - max: 100 - min: 1 - type: int - policy_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - policyacknowledgments: - acknowledgment_date: - type: date - acknowledgment_id: - max: 100 - min: 1 - type: int - employee_id: - max: 100 - min: 1 - type: int - policy_id: - max: 100 - min: 1 - type: int - policyupdates: - policy_id: - max: 100 - min: 1 - type: int - update_date: - type: date - update_id: - max: 100 - min: 1 - type: int - procurement: - procurement_date: - type: date - procurement_id: - max: 100 - min: 1 - type: int - supplier_id: - max: 100 - min: 1 - type: int - total_amount: - max: 100 - min: 1 - type: int - productbacklog: - backlog_id: - max: 100 - min: 1 - type: int - created_at: - type: timestamp - item_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - priority: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - productroadmaps: - created_at: - type: timestamp - roadmap_id: - max: 100 - min: 1 - type: int - title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - products: - price: - max: 100 - min: 1 - type: int - product_id: - max: 100 - min: 1 - type: int - product_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - quantity: - max: 100 - min: 1 - type: int - projectassignments: - assignment_id: - max: 100 - min: 1 - type: int - employee_id: - max: 100 - min: 1 - type: int - project_id: - max: 100 - min: 1 - type: int - role: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - projectparticipants: - participant_id: - max: 100 - min: 1 - type: int - project_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - projects: - budget: - max: 100 - min: 1 - type: int - end_date: - type: date - project_id: - max: 100 - min: 1 - type: int - project_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - start_date: - type: date - projectstatus: - last_updated: - type: timestamp - project_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - status: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - status_id: - max: 100 - min: 1 - type: int - projecttimelines: - end_date: - type: date - project_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - start_date: - type: date - timeline_id: - max: 100 - min: 1 - type: int - promotionalcodes: - code_id: - max: 100 - min: 1 - type: int - code_value: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - discount: - max: 100 - min: 1 - type: int - expiration_date: - type: date - purchaseorders: - order_date: - type: date - order_id: - max: 100 - min: 1 - type: int - supplier_id: - max: 100 - min: 1 - type: int - total_amount: - max: 100 - min: 1 - type: int - purchases: - purchase_date: - type: date - purchase_id: - max: 100 - min: 1 - type: int - supplier_id: - max: 100 - min: 1 - type: int - total_amount: - max: 100 - min: 1 - type: int - qaassignments: - qa_assignment_id: - max: 100 - min: 1 - type: int - qa_team_id: - max: 100 - min: 1 - type: int - user_id: - max: 100 - min: 1 - type: int - qareports: - qa_assignment_id: - max: 100 - min: 1 - type: int - report_id: - max: 100 - min: 1 - type: int - report_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - submitted_at: - type: timestamp - qateams: - qa_team_id: - max: 100 - min: 1 - type: int - team_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - referralprograms: - created_at: - type: timestamp - program_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - referral_id: - max: 100 - min: 1 - type: int - reward_type: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - referrals: - referral_id: - max: 100 - min: 1 - type: int - referral_program_id: - max: 100 - min: 1 - type: int - referred_lead_id: - max: 100 - min: 1 - type: int - referrer_id: - max: 100 - min: 1 - type: int - releasenotes: - note: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - note_id: - max: 100 - min: 1 - type: int - release_id: - max: 100 - min: 1 - type: int - releases: - release_date: - type: date - release_id: - max: 100 - min: 1 - type: int - version: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - researchcollaborations: - collaboration_id: - max: 100 - min: 1 - type: int - partner_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - research_id: - max: 100 - min: 1 - type: int - researchprojects: - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - faculty_id: - max: 100 - min: 1 - type: int - project_id: - max: 100 - min: 1 - type: int - project_title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - results: - conversion_rate: - max: 100 - min: 1 - type: int - experiment_id: - max: 100 - min: 1 - type: int - result_id: - max: 100 - min: 1 - type: int - total_users: - max: 100 - min: 1 - type: int - variant_id: - max: 100 - min: 1 - type: int - retentionprogramparticipation: - lead_id: - max: 100 - min: 1 - type: int - participation_id: - max: 100 - min: 1 - type: int - retention_program_id: - max: 100 - min: 1 - type: int - retrospectives: - created_at: - type: timestamp - notes: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - retrospective_id: - max: 100 - min: 1 - type: int - session_id: - max: 100 - min: 1 - type: int - riskassessments: - assessed_at: - type: timestamp - assessment_id: - max: 100 - min: 1 - type: int - mitigation_strategy: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - risk_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - riskmanagement: - assessment_date: - type: date - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - risk_id: - max: 100 - min: 1 - type: int - risk_level: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - riskmitigation: - action_taken: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - implementation_date: - type: date - mitigation_id: - max: 100 - min: 1 - type: int - risk_id: - max: 100 - min: 1 - type: int - riskmitigationplans: - mitigation_strategy: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - plan_id: - max: 100 - min: 1 - type: int - risk_id: - max: 100 - min: 1 - type: int - roadmapfeedback: - feedback_id: - max: 100 - min: 1 - type: int - feedback_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - roadmap_id: - max: 100 - min: 1 - type: int - submitted_at: - type: timestamp - user_id: - max: 100 - min: 1 - type: int - roadmapitems: - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - due_date: - type: date - item_id: - max: 100 - min: 1 - type: int - roadmap_id: - max: 100 - min: 1 - type: int - roianalysis: - campaign_id: - max: 100 - min: 1 - type: int - investment: - max: 100 - min: 1 - type: int - roi_id: - max: 100 - min: 1 - type: int - roi_percentage: - max: 100 - min: 1 - type: int - roleassignments: - assignment_id: - max: 100 - min: 1 - type: int - role_id: - max: 100 - min: 1 - type: int - user_id: - max: 100 - min: 1 - type: int - rollouts: - feature_id: - max: 100 - min: 1 - type: int - rollout_date: - type: date - rollout_id: - max: 100 - min: 1 - type: int - rollout_percentage: - max: 100 - min: 1 - type: int - salaries: - employee_id: - max: 100 - min: 1 - type: int - pay_date: - type: date - salary_amount: - max: 100 - min: 1 - type: int - salary_id: - max: 100 - min: 1 - type: int - sales: - product_id: - max: 100 - min: 1 - type: int - quantity: - max: 100 - min: 1 - type: int - sale_date: - type: date - sale_id: - max: 100 - min: 1 - type: int - total_amount: - max: 100 - min: 1 - type: int - salesreports: - report_date: - type: date - report_id: - max: 100 - min: 1 - type: int - total_sales: - max: 100 - min: 1 - type: int - salesstrategies: - strategy_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - strategy_id: - max: 100 - min: 1 - type: int - scholarships: - amount: - max: 100 - min: 1 - type: int - eligibility_criteria: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - scholarship_id: - max: 100 - min: 1 - type: int - scholarship_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - scholarshipsoffered: - department_id: - max: 100 - min: 1 - type: int - scholarship_id: - max: 100 - min: 1 - type: int - scholarship_offered_id: - max: 100 - min: 1 - type: int - securityincidents: - incident_date: - type: date - incident_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - incident_id: - max: 100 - min: 1 - type: int - securitytestresults: - executed_at: - type: timestamp - result_id: - max: 100 - min: 1 - type: int - security_test_id: - max: 100 - min: 1 - type: int - status: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - securitytests: - expected_outcome: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - security_test_id: - max: 100 - min: 1 - type: int - test_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - segmentmembers: - lead_id: - max: 100 - min: 1 - type: int - member_id: - max: 100 - min: 1 - type: int - segment_id: - max: 100 - min: 1 - type: int - segmentmemberships: - membership_id: - max: 100 - min: 1 - type: int - segment_id: - max: 100 - min: 1 - type: int - user_id: - max: 100 - min: 1 - type: int - session_feedback: - comments: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - feedback_id: - max: 100 - min: 1 - type: int - rating: - max: 100 - min: 1 - type: int - session_id: - max: 100 - min: 1 - type: int - session_notes: - created_at: - type: timestamp - note_id: - max: 100 - min: 1 - type: int - note_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - session_id: - max: 100 - min: 1 - type: int - session_reschedule: - new_session_date: - type: timestamp - reschedule_id: - max: 100 - min: 1 - type: int - session_id: - max: 100 - min: 1 - type: int - sessions: - end_time: - type: timestamp - session_id: - max: 100 - min: 1 - type: int - start_time: - type: timestamp - user_id: - max: 100 - min: 1 - type: int - socialmediaaccounts: - account_id: - max: 100 - min: 1 - type: int - handle: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - platform: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - socialmediaanalytics: - analytics_id: - max: 100 - min: 1 - type: int - campaign_id: - max: 100 - min: 1 - type: int - created_at: - type: timestamp - metrics: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - platform: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - socialmediacampaigns: - campaign_id: - max: 100 - min: 1 - type: int - platform: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - post_content: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - scheduled_at: - type: timestamp - sm_campaign_id: - max: 100 - min: 1 - type: int - socialmediaengagement: - engagement_date: - type: date - engagement_id: - max: 100 - min: 1 - type: int - platform: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - student_id: - max: 100 - min: 1 - type: int - socialmediaengagements: - engagement_date: - type: timestamp - engagement_id: - max: 100 - min: 1 - type: int - engagement_type: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - sm_campaign_id: - max: 100 - min: 1 - type: int - socialmediaposts: - account_id: - max: 100 - min: 1 - type: int - content: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - post_date: - type: date - post_id: - max: 100 - min: 1 - type: int - sourcetracking: - lead_id: - max: 100 - min: 1 - type: int - source_id: - max: 100 - min: 1 - type: int - tracked_at: - type: timestamp - tracking_id: - max: 100 - min: 1 - type: int - sponsorships: - amount: - max: 100 - min: 1 - type: int - engagement_id: - max: 100 - min: 1 - type: int - sponsorship_id: - max: 100 - min: 1 - type: int - sprints: - end_date: - type: date - sprint_id: - max: 100 - min: 1 - type: int - sprint_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - start_date: - type: date - sprinttasks: - sprint_id: - max: 100 - min: 1 - type: int - sprint_task_id: - max: 100 - min: 1 - type: int - task_id: - max: 100 - min: 1 - type: int - stackcomponents: - component_id: - max: 100 - min: 1 - type: int - component_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - stack_id: - max: 100 - min: 1 - type: int - staff: - email: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - first_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - hire_date: - type: date - last_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - staff_id: - max: 100 - min: 1 - type: int - staffassignments: - assigned_date: - type: date - assignment_id: - max: 100 - min: 1 - type: int - role_id: - max: 100 - min: 1 - type: int - staff_id: - max: 100 - min: 1 - type: int - staffroles: - role_id: - max: 100 - min: 1 - type: int - role_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - stakeholderengagement: - engagement_date: - type: date - engagement_id: - max: 100 - min: 1 - type: int - stakeholder_id: - max: 100 - min: 1 - type: int - stakeholderfeedback: - feedback_id: - max: 100 - min: 1 - type: int - feedback_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - stakeholder_id: - max: 100 - min: 1 - type: int - submitted_at: - type: timestamp - stakeholders: - email: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - stakeholder_id: - max: 100 - min: 1 - type: int - stakeholdersvt: - contact_person: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - email: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - phone: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - stakeholder_id: - max: 100 - min: 1 - type: int - stakeholder_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - storyassignments: - assignment_id: - max: 100 - min: 1 - type: int - story_id: - max: 100 - min: 1 - type: int - user_id: - max: 100 - min: 1 - type: int - strategicinitiatives: - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - initiative_id: - max: 100 - min: 1 - type: int - initiative_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - strategyimplementation: - implementation_date: - type: date - implementation_id: - max: 100 - min: 1 - type: int - strategy_id: - max: 100 - min: 1 - type: int - student_enrollments: - course_id: - max: 100 - min: 1 - type: int - enrollment_date: - type: timestamp - enrollment_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - studentactivities: - activity_id: - max: 100 - min: 1 - type: int - position: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - student_activity_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - studentawards: - award_id: - max: 100 - min: 1 - type: int - awarded_date: - type: date - student_award_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - studentcommunityservice: - service_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - student_service_id: - max: 100 - min: 1 - type: int - studentcounselingservices: - counseling_service_id: - max: 100 - min: 1 - type: int - student_counseling_service_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - studentfeedback: - feedback_date: - type: date - feedback_id: - max: 100 - min: 1 - type: int - feedback_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - student_id: - max: 100 - min: 1 - type: int - studentfinancialservices: - financial_service_id: - max: 100 - min: 1 - type: int - service_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - student_id: - max: 100 - min: 1 - type: int - visit_date: - type: date - studenthealthservices: - health_service_id: - max: 100 - min: 1 - type: int - service_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - student_id: - max: 100 - min: 1 - type: int - visit_date: - type: date - studenthonors: - awarded_date: - type: date - honor_id: - max: 100 - min: 1 - type: int - student_honor_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - studentinternships: - internship_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - student_internship_id: - max: 100 - min: 1 - type: int - studentjobopportunities: - application_date: - type: date - job_opportunity_id: - max: 100 - min: 1 - type: int - job_title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - student_id: - max: 100 - min: 1 - type: int - studentparents: - parent_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - student_parent_id: - max: 100 - min: 1 - type: int - studentresourceusage: - resource_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - usage_date: - type: date - usage_id: - max: 100 - min: 1 - type: int - studentrights: - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - right_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - students: - date_of_birth: - type: date - email: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - enrollment_date: - type: date - first_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - last_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - student_id: - max: 100 - min: 1 - type: int - studentscholarships: - awarded_date: - type: date - scholarship_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - student_scholarship_id: - max: 100 - min: 1 - type: int - studentsvt: - created_at: - type: timestamp - email: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - first_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - last_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - phone: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - student_id: - max: 100 - min: 1 - type: int - studentvolunteers: - opportunity_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - student_volunteer_id: - max: 100 - min: 1 - type: int - studygroups: - created_date: - type: date - group_id: - max: 100 - min: 1 - type: int - group_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - subjects: - subject_id: - max: 100 - min: 1 - type: int - subject_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - suppliercontracts: - contract_id: - max: 100 - min: 1 - type: int - contract_value: - max: 100 - min: 1 - type: int - end_date: - type: date - start_date: - type: date - supplier_id: - max: 100 - min: 1 - type: int - supplierratings: - comments: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - rating: - max: 100 - min: 1 - type: int - rating_id: - max: 100 - min: 1 - type: int - supplier_id: - max: 100 - min: 1 - type: int - suppliers: - contact_person: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - email: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - phone: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - supplier_id: - max: 100 - min: 1 - type: int - supplier_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - surveyquestions: - question_id: - max: 100 - min: 1 - type: int - question_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - question_type: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - survey_id: - max: 100 - min: 1 - type: int - surveyres: - employee_id: - max: 100 - min: 1 - type: int - response_id: - max: 100 - min: 1 - type: int - response_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - survey_id: - max: 100 - min: 1 - type: int - surveyresponses: - response_id: - max: 100 - min: 1 - type: int - response_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - survey_id: - max: 100 - min: 1 - type: int - user_id: - max: 100 - min: 1 - type: int - surveyresponsesedu: - response_id: - max: 100 - min: 1 - type: int - response_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - student_id: - max: 100 - min: 1 - type: int - survey_id: - max: 100 - min: 1 - type: int - surveys: - created_at: - type: timestamp - survey_id: - max: 100 - min: 1 - type: int - survey_title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - systemmetrics: - metric_id: - max: 100 - min: 1 - type: int - metric_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - metric_value: - max: 100 - min: 1 - type: int - recorded_at: - type: timestamp - targetaudiences: - audience_id: - max: 100 - min: 1 - type: int - campaign_id: - max: 100 - min: 1 - type: int - demographic_details: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - taskcomments: - comment_id: - max: 100 - min: 1 - type: int - comment_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - commented_at: - type: timestamp - task_id: - max: 100 - min: 1 - type: int - user_id: - max: 100 - min: 1 - type: int - taxfilings: - amount: - max: 100 - min: 1 - type: int - filing_date: - type: date - filing_id: - max: 100 - min: 1 - type: int - filing_year: - max: 100 - min: 1 - type: int - technicaldebt: - created_at: - type: timestamp - debt_id: - max: 100 - min: 1 - type: int - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - technicalspecifications: - created_at: - type: timestamp - project_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - spec_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - spec_id: - max: 100 - min: 1 - type: int - technologystack: - stack_id: - max: 100 - min: 1 - type: int - technology_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - technologyupdates: - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tech_id: - max: 100 - min: 1 - type: int - update_date: - type: date - update_id: - max: 100 - min: 1 - type: int - technologyusage: - employee_id: - max: 100 - min: 1 - type: int - tech_id: - max: 100 - min: 1 - type: int - usage_date: - type: date - usage_id: - max: 100 - min: 1 - type: int - techstack: - tech_id: - max: 100 - min: 1 - type: int - tech_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - techstackusage: - campaign_id: - max: 100 - min: 1 - type: int - tech_id: - max: 100 - min: 1 - type: int - usage_id: - max: 100 - min: 1 - type: int - testcases: - expected_result: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - task_id: - max: 100 - min: 1 - type: int - test_case_id: - max: 100 - min: 1 - type: int - test_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - testplans: - created_at: - type: timestamp - experiment_id: - max: 100 - min: 1 - type: int - plan_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - plan_id: - max: 100 - min: 1 - type: int - testresults: - executed_at: - type: timestamp - result_id: - max: 100 - min: 1 - type: int - status: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - test_case_id: - max: 100 - min: 1 - type: int - toolintegrations: - integration_id: - max: 100 - min: 1 - type: int - tool_id: - max: 100 - min: 1 - type: int - user_id: - max: 100 - min: 1 - type: int - trainingattendance: - attendance_id: - max: 100 - min: 1 - type: int - attended: - max: 1 - min: 0 - type: int - session_id: - max: 100 - min: 1 - type: int - user_id: - max: 100 - min: 1 - type: int - trainingprograms: - end_date: - type: date - program_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - start_date: - type: date - training_id: - max: 100 - min: 1 - type: int - trainingregistrations: - lead_id: - max: 100 - min: 1 - type: int - registered_at: - type: timestamp - registration_id: - max: 100 - min: 1 - type: int - training_id: - max: 100 - min: 1 - type: int - trainingsessions: - scheduled_at: - type: timestamp - session_id: - max: 100 - min: 1 - type: int - topic: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - transportationservices: - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - service_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - transport_service_id: - max: 100 - min: 1 - type: int - transportationusage: - student_id: - max: 100 - min: 1 - type: int - transport_service_id: - max: 100 - min: 1 - type: int - usage_date: - type: date - usage_id: - max: 100 - min: 1 - type: int - tuitionfees: - amount: - max: 100 - min: 1 - type: int - due_date: - type: date - fee_id: - max: 100 - min: 1 - type: int - paid_date: - type: date - student_id: - max: 100 - min: 1 - type: int - tutor_admetrics: - ad_id: - max: 100 - min: 1 - type: int - clicks: - max: 100 - min: 1 - type: int - impressions: - max: 100 - min: 1 - type: int - metric_id: - max: 100 - min: 1 - type: int - tutor_ads: - ad_content: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - ad_id: - max: 100 - min: 1 - type: int - ad_platform: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - tutor_id: - max: 100 - min: 1 - type: int - tutor_answers: - answer_id: - max: 100 - min: 1 - type: int - answer_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - question_id: - max: 100 - min: 1 - type: int - tutor_articles: - article_content: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - article_id: - max: 100 - min: 1 - type: int - article_title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - tutor_id: - max: 100 - min: 1 - type: int - tutor_articles_comments: - article_id: - max: 100 - min: 1 - type: int - comment_id: - max: 100 - min: 1 - type: int - comment_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - student_id: - max: 100 - min: 1 - type: int - tutor_articles_likes: - article_id: - max: 100 - min: 1 - type: int - like_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - tutor_articles_two: - article_content: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - article_id: - max: 100 - min: 1 - type: int - article_title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - tutor_id: - max: 100 - min: 1 - type: int - tutor_audiolectures: - audio_id: - max: 100 - min: 1 - type: int - audio_title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - audio_url: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - tutor_id: - max: 100 - min: 1 - type: int - tutor_availability: - availability_id: - max: 100 - min: 1 - type: int - available: - max: 1 - min: 0 - type: int - date: - type: date - tutor_id: - max: 100 - min: 1 - type: int - tutor_awards: - award_id: - max: 100 - min: 1 - type: int - award_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - award_year: - max: 100 - min: 1 - type: int - tutor_id: - max: 100 - min: 1 - type: int - tutor_awards_comments: - award_id: - max: 100 - min: 1 - type: int - comment_id: - max: 100 - min: 1 - type: int - comment_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - student_id: - max: 100 - min: 1 - type: int - tutor_banners: - banner_id: - max: 100 - min: 1 - type: int - banner_image: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - tutor_id: - max: 100 - min: 1 - type: int - tutor_blog: - blog_content: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - blog_id: - max: 100 - min: 1 - type: int - blog_title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - tutor_id: - max: 100 - min: 1 - type: int - tutor_blog_comments: - blog_id: - max: 100 - min: 1 - type: int - comment_id: - max: 100 - min: 1 - type: int - comment_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - student_id: - max: 100 - min: 1 - type: int - tutor_blog_likes: - blog_id: - max: 100 - min: 1 - type: int - like_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - tutor_bookrecommendations: - author: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - book_title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - recommendation_id: - max: 100 - min: 1 - type: int - tutor_id: - max: 100 - min: 1 - type: int - tutor_categories: - category_id: - max: 100 - min: 1 - type: int - category_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_category_assignment: - assignment_id: - max: 100 - min: 1 - type: int - category_id: - max: 100 - min: 1 - type: int - tutor_id: - max: 100 - min: 1 - type: int - tutor_certifications: - certification_id: - max: 100 - min: 1 - type: int - certification_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - expiration_date: - type: date - issued_date: - type: date - tutor_id: - max: 100 - min: 1 - type: int - tutor_certifications_comments: - certification_id: - max: 100 - min: 1 - type: int - comment_id: - max: 100 - min: 1 - type: int - comment_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - student_id: - max: 100 - min: 1 - type: int - tutor_certifications_two: - certification_id: - max: 100 - min: 1 - type: int - certification_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - issuing_organization: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - year_obtained: - max: 100 - min: 1 - type: int - tutor_collaborations: - collaboration_id: - max: 100 - min: 1 - type: int - project_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - project_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - tutor_competitions: - competition_date: - type: date - competition_id: - max: 100 - min: 1 - type: int - competition_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - tutor_conferences: - conference_date: - type: date - conference_id: - max: 100 - min: 1 - type: int - conference_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - tutor_connections: - connection_date: - type: timestamp - connection_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - tutor_id: - max: 100 - min: 1 - type: int - tutor_event_comments: - comment_id: - max: 100 - min: 1 - type: int - comment_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - event_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - tutor_eventparticipation: - event_date: - type: date - event_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - participation_id: - max: 100 - min: 1 - type: int - tutor_id: - max: 100 - min: 1 - type: int - tutor_events: - event_id: - max: 100 - min: 1 - type: int - tutor_event_id: - max: 100 - min: 1 - type: int - tutor_id: - max: 100 - min: 1 - type: int - tutor_experience: - experience_id: - max: 100 - min: 1 - type: int - position: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - previous_employer: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - years_worked: - max: 100 - min: 1 - type: int - tutor_feedback: - created_at: - type: timestamp - feedback_id: - max: 100 - min: 1 - type: int - feedback_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - tutor_feedbackresponses: - created_at: - type: timestamp - feedback_id: - max: 100 - min: 1 - type: int - response_id: - max: 100 - min: 1 - type: int - response_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_feedbacksurveys: - created_at: - type: timestamp - survey_id: - max: 100 - min: 1 - type: int - survey_title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - tutor_financials: - created_at: - type: timestamp - expenses: - max: 100 - min: 1 - type: int - financial_id: - max: 100 - min: 1 - type: int - income: - max: 100 - min: 1 - type: int - tutor_id: - max: 100 - min: 1 - type: int - tutor_forum: - created_at: - type: timestamp - forum_content: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - forum_id: - max: 100 - min: 1 - type: int - forum_topic: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - tutor_forum_comments: - comment_id: - max: 100 - min: 1 - type: int - comment_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - forum_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - tutor_galleries: - created_at: - type: timestamp - gallery_id: - max: 100 - min: 1 - type: int - gallery_title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - tutor_galleries_comments: - comment_id: - max: 100 - min: 1 - type: int - comment_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - gallery_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - tutor_goals: - goal_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - goal_id: - max: 100 - min: 1 - type: int - target_date: - type: date - tutor_id: - max: 100 - min: 1 - type: int - tutor_industryconnections: - connection_id: - max: 100 - min: 1 - type: int - contact_info: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - contact_person: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - organization_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - tutor_interactions: - interaction_date: - type: timestamp - interaction_id: - max: 100 - min: 1 - type: int - interaction_type: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - student_id: - max: 100 - min: 1 - type: int - tutor_id: - max: 100 - min: 1 - type: int - tutor_languages: - language_id: - max: 100 - min: 1 - type: int - language_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - tutor_languages_spoken: - language_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - spoken_id: - max: 100 - min: 1 - type: int - tutor_id: - max: 100 - min: 1 - type: int - tutor_media: - created_at: - type: timestamp - media_id: - max: 100 - min: 1 - type: int - media_type: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - media_url: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - tutor_media_comments: - comment_id: - max: 100 - min: 1 - type: int - comment_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - media_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - tutor_meeting: - meeting_date: - type: timestamp - meeting_duration: - max: 100 - min: 1 - type: int - meeting_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - tutor_id: - max: 100 - min: 1 - type: int - tutor_meeting_notes: - created_at: - type: timestamp - meeting_id: - max: 100 - min: 1 - type: int - meeting_note_id: - max: 100 - min: 1 - type: int - note_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_mentorships: - end_date: - type: date - mentee_id: - max: 100 - min: 1 - type: int - mentorship_id: - max: 100 - min: 1 - type: int - start_date: - type: date - tutor_id: - max: 100 - min: 1 - type: int - tutor_networks: - network_id: - max: 100 - min: 1 - type: int - network_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - tutor_notes: - created_at: - type: timestamp - note_id: - max: 100 - min: 1 - type: int - note_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - tutor_partnerships: - partner_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - partnership_date: - type: timestamp - partnership_id: - max: 100 - min: 1 - type: int - tutor_id: - max: 100 - min: 1 - type: int - tutor_podcasts: - created_at: - type: timestamp - podcast_id: - max: 100 - min: 1 - type: int - podcast_title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - podcast_url: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - tutor_policies: - created_at: - type: timestamp - policy_id: - max: 100 - min: 1 - type: int - policy_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - tutor_projects: - created_at: - type: timestamp - project_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - project_id: - max: 100 - min: 1 - type: int - project_title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - tutor_projects_comments: - comment_id: - max: 100 - min: 1 - type: int - comment_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - project_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - tutor_projects_likes: - like_id: - max: 100 - min: 1 - type: int - project_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - tutor_qualifications: - institution: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - qualification_id: - max: 100 - min: 1 - type: int - qualification_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - year_obtained: - max: 100 - min: 1 - type: int - tutor_questions: - created_at: - type: timestamp - question_id: - max: 100 - min: 1 - type: int - question_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - tutor_ratings: - comments: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - rating: - max: 100 - min: 1 - type: int - rating_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - tutor_id: - max: 100 - min: 1 - type: int - tutor_referrals: - referral_date: - type: timestamp - referral_id: - max: 100 - min: 1 - type: int - referred_student_id: - max: 100 - min: 1 - type: int - tutor_id: - max: 100 - min: 1 - type: int - tutor_reports: - created_at: - type: timestamp - report_id: - max: 100 - min: 1 - type: int - report_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - tutor_resources: - created_at: - type: timestamp - resource_id: - max: 100 - min: 1 - type: int - resource_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - resource_url: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - tutor_resources_comments: - comment_id: - max: 100 - min: 1 - type: int - comment_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: - type: timestamp - resource_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - tutor_resources_two: - created_at: - type: timestamp - resource_id: - max: 100 - min: 1 - type: int - resource_title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - resource_url: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - tutor_reviews: - created_at: - type: timestamp - review_id: - max: 100 - min: 1 - type: int - review_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - tutor_schedules: - available_day: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - available_time: - type: timestamp - schedule_id: - max: 100 - min: 1 - type: int - tutor_id: - max: 100 - min: 1 - type: int - tutor_session_tags: - session_id: - max: 100 - min: 1 - type: int - tag_id: - max: 100 - min: 1 - type: int - tag_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_skills: - skill_id: - max: 100 - min: 1 - type: int - skill_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - tutor_socialmedia: - platform: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - profile_url: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - social_media_id: - max: 100 - min: 1 - type: int - tutor_id: - max: 100 - min: 1 - type: int - tutor_socialmedia_likes: - like_id: - max: 100 - min: 1 - type: int - social_media_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - tutor_socialmediametrics: - created_at: - type: timestamp - engagement_rate: - max: 100 - min: 1 - type: int - followers_count: - max: 100 - min: 1 - type: int - metric_id: - max: 100 - min: 1 - type: int - platform: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - tutor_specialties: - specialty_id: - max: 100 - min: 1 - type: int - specialty_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - tutor_statistics: - created_at: - type: timestamp - feedback_count: - max: 100 - min: 1 - type: int - session_count: - max: 100 - min: 1 - type: int - statistic_id: - max: 100 - min: 1 - type: int - success_rate: - max: 100 - min: 1 - type: int - tutor_id: - max: 100 - min: 1 - type: int - tutor_subjects: - subject_id: - max: 100 - min: 1 - type: int - tutor_id: - max: 100 - min: 1 - type: int - tutor_subject_id: - max: 100 - min: 1 - type: int - tutor_successmetrics: - created_at: - type: timestamp - metric_id: - max: 100 - min: 1 - type: int - metric_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - metric_value: - max: 100 - min: 1 - type: int - tutor_id: - max: 100 - min: 1 - type: int - tutor_successstories: - created_at: - type: timestamp - story_id: - max: 100 - min: 1 - type: int - story_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - student_id: - max: 100 - min: 1 - type: int - tutor_id: - max: 100 - min: 1 - type: int - tutor_timings: - timing_end: - type: timestamp - timing_id: - max: 100 - min: 1 - type: int - timing_start: - type: timestamp - tutor_id: - max: 100 - min: 1 - type: int - tutor_trainingprograms: - created_at: - type: timestamp - program_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - program_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - training_id: - max: 100 - min: 1 - type: int - tutor_id: - max: 100 - min: 1 - type: int - tutor_trainingsessions: - session_date: - type: timestamp - session_id: - max: 100 - min: 1 - type: int - session_topic: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - tutor_video_sessions: - session_date: - type: timestamp - student_id: - max: 100 - min: 1 - type: int - tutor_id: - max: 100 - min: 1 - type: int - video_session_id: - max: 100 - min: 1 - type: int - tutor_videos: - created_at: - type: timestamp - tutor_id: - max: 100 - min: 1 - type: int - video_id: - max: 100 - min: 1 - type: int - video_title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - video_url: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_videos_two: - created_at: - type: timestamp - tutor_id: - max: 100 - min: 1 - type: int - video_id: - max: 100 - min: 1 - type: int - video_title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - video_url: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_webinars: - tutor_id: - max: 100 - min: 1 - type: int - webinar_date: - type: timestamp - webinar_id: - max: 100 - min: 1 - type: int - webinar_title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_websites: - created_at: - type: timestamp - tutor_id: - max: 100 - min: 1 - type: int - website_id: - max: 100 - min: 1 - type: int - website_url: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_workshops: - tutor_id: - max: 100 - min: 1 - type: int - workshop_date: - type: timestamp - workshop_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - workshop_id: - max: 100 - min: 1 - type: int - workshop_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutoringevents: - event_date: - type: date - event_id: - max: 100 - min: 1 - type: int - event_location: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - event_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutoringnotify: - created_at: - type: timestamp - is_read: - max: 1 - min: 0 - type: int - notification_id: - max: 100 - min: 1 - type: int - notification_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - user_id: - max: 100 - min: 1 - type: int - tutoringsessions: - session_date: - type: date - session_id: - max: 100 - min: 1 - type: int - session_time: - type: timestamp - student_id: - max: 100 - min: 1 - type: int - tutor_id: - max: 100 - min: 1 - type: int - tutoringsessionstwo: - course_id: - max: 100 - min: 1 - type: int - session_date: - type: timestamp - session_duration: - max: 100 - min: 1 - type: int - session_id: - max: 100 - min: 1 - type: int - student_id: - max: 100 - min: 1 - type: int - tutor_id: - max: 100 - min: 1 - type: int - tutorprofiles: - bio: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - profile_id: - max: 100 - min: 1 - type: int - profile_picture: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - tutors: - created_at: + vehicle_data: + event_id: + prefix: event_ + type: uuid + timestamp: type: timestamp - email: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - experience_years: - max: 100 - min: 1 - type: int - first_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - last_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - phone: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - subject_specialty: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - tutor_id: - max: 100 - min: 1 - type: int - unitbudgets: - budget_amount: - max: 100 - min: 1 - type: int - budget_id: - max: 100 - min: 1 - type: int - unit_id: - max: 100 - min: 1 - type: int - useraccounts: - employee_id: - max: 100 - min: 1 - type: int - password_hash: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - user_id: - max: 100 - min: 1 - type: int - username: + event_type: type: choice values: - - choice 1 - - choice 2 - - choice 3 - userassignments: - assigned_at: - type: timestamp - assignment_id: - max: 100 - min: 1 - type: int - user_id: - max: 100 - min: 1 - type: int - variant_id: - max: 100 - min: 1 - type: int - userengagements: - engagement_date: - type: timestamp - engagement_id: - max: 100 - min: 1 - type: int - engagement_type: + - accident + - maintenance + - other + description: type: choice values: - - choice 1 - - choice 2 - - choice 3 - user_id: - max: 100 - min: 1 - type: int - usergroups: - group_id: - max: 100 - min: 1 + - Minor accident + - Scheduled maintenance + - Unscheduled maintenance + - Other event + related_vehicle_id: type: int - group_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - usernotifications: - notification_id: - max: 100 min: 1 - type: int - notification_text: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - sent_at: - type: timestamp - user_id: max: 100 - min: 1 - type: int - userpersonas: - behaviors: - type: choice + prefix: vehicle_ + additional_info: + type: JSON values: - - choice 1 - - choice 2 - - choice 3 - created_at: + info: "Additional event details" + log_data: + event_id: + type: uuid + prefix: event_ + timestamp: type: timestamp - demographics: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - persona_id: - max: 100 - min: 1 - type: int - persona_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - primary_goal: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - userpreferences: - preference_id: - max: 100 - min: 1 - type: int - preference_key: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - preference_value: + event_type: type: choice values: - - choice 1 - - choice 2 - - choice 3 - user_id: - max: 100 - min: 1 - type: int - userroleassignments: - assigned_at: - type: timestamp - assignment_id: - max: 100 - min: 1 - type: int - role_id: - max: 100 - min: 1 - type: int - user_id: - max: 100 - min: 1 - type: int - userroles: - role_id: - max: 100 - min: 1 - type: int - role_name: + - button_click + - click + - scroll + page: type: choice values: - - choice 1 - - choice 2 - - choice 3 - userrolesvt: - role_id: - max: 100 - min: 1 - type: int - role_name: + - Home + - About + - Contact Me + - SingleStore Portal + - Docs + browser: type: choice values: - - choice 1 - - choice 2 - - choice 3 - users: - created_at: - type: timestamp - email: - type: choice + - Firefox + - Chrome + - Internet Explore + - Microsoft Edge + metadata: + type: JSON values: - - choice 1 - - choice 2 - - choice 3 + utm_medium: email + utm_source: outreach + utm_term: s2 + user_data: user_id: - max: 100 - min: 1 - type: int - username: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - usersatisfactionsurveys: - submission_date: - type: timestamp - survey_id: - max: 100 - min: 1 - type: int - survey_title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - usersegments: - criteria: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - segment_id: - max: 100 - min: 1 - type: int - segment_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - userstories: - acceptance_criteria: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - created_at: + type: uuid + prefix: user_ + sign_up: type: timestamp - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - story_id: - max: 100 - min: 1 - type: int - variants: - experiment_id: - max: 100 - min: 1 - type: int - variant_id: - max: 100 - min: 1 - type: int - variant_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - vehiclemaintenance: - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - maintenance_date: - type: date - maintenance_id: - max: 100 - min: 1 - type: int - vehicle_id: - max: 100 - min: 1 - type: int - vendormanagement: - contact_person: + user_type: type: choice values: - - choice 1 - - choice 2 - - choice 3 + - Admin + - User + - Moderator email: type: choice values: - - choice 1 - - choice 2 - - choice 3 - phone: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - vendor_id: - max: 100 - min: 1 - type: int - vendor_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - volunteeropportunities: - description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - opportunity_id: - max: 100 - min: 1 - type: int - opportunity_title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - vtcourses2: - course_description: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - course_id: - max: 100 - min: 1 - type: int - course_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - vtevents: - event_date: - type: date - event_id: - max: 100 - min: 1 - type: int - event_name: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - location: + - example@gmail.com + - example@hotmail.com + - example@yahoo.com + phone_number: type: choice values: - - choice 1 - - choice 2 - - choice 3 - vtstratimplement: - end_date: - type: date - implementation_id: - max: 100 - min: 1 - type: int - start_date: - type: date - strategy_id: - max: 100 - min: 1 - type: int - webinarregistrations: - lead_id: - max: 100 - min: 1 - type: int - registered_at: - type: timestamp - registration_id: - max: 100 - min: 1 - type: int - webinar_id: - max: 100 - min: 1 - type: int - webinars: - scheduled_at: - type: timestamp - title: - type: choice - values: - - choice 1 - - choice 2 - - choice 3 - webinar_id: - max: 100 - min: 1 - type: int - workshopregistrations: - lead_id: - max: 100 - min: 1 - type: int - registered_at: - type: timestamp - registration_id: - max: 100 - min: 1 - type: int - workshop_id: - max: 100 - min: 1 - type: int + - 415-XXX-XXXX + - 206-XXX-XXXX + - 212-XXX-XXXX From da6f564c2d3d049059d5cb9413bd636c9805e5bb Mon Sep 17 00:00:00 2001 From: Kevin Tran Date: Thu, 26 Sep 2024 14:43:28 -0700 Subject: [PATCH 10/15] chore: README.md correction --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 57b104e..161c1ea 100644 --- a/README.md +++ b/README.md @@ -44,19 +44,19 @@ export EC2_PUBLIC_IP="" bash scripts/load_kafka.sh ``` -If you would like to automate the Kafka data loading, create a `data/testing_var.sh` with the following format: +If you would like to automate the Kafka data loading, create a `testing/testing_var.sh` with the following format: ```yaml streaming: - topic_name: "topic_2" record_count: 1000 - dataset: 1 + dataset: vehicle_data - topic_name: "topic_2" record_count: 500 - dataset: 2 + dataset: log_data - topic_name: "topic_3" record_count: 2000 - dataset: 0 + dataset: user_data ``` ### SingleStore Ingestion From ef27bb150c1d843d9ed0e6c7bdb6187ce6a0a4f1 Mon Sep 17 00:00:00 2001 From: Kevin Tran Date: Thu, 26 Sep 2024 15:32:32 -0700 Subject: [PATCH 11/15] refact: moving around documents to support schema mapping --- .gitignore | 2 +- README.md | 14 +- .../README.md | 4 +- .../map-data.py | 10 +- .../mysql-schema.sql | 0 testing/stream_kafka.py | 2 +- testing/testing_var.yaml | 1501 +++++++++++++++++ 7 files changed, 1517 insertions(+), 16 deletions(-) rename {testing/schema-mapping => schema-mapping}/README.md (59%) rename {testing/schema-mapping => schema-mapping}/map-data.py (92%) rename testing/schema-mapping/ex-mysql-schema.sql => schema-mapping/mysql-schema.sql (100%) create mode 100644 testing/testing_var.yaml diff --git a/.gitignore b/.gitignore index e7cbbeb..fded777 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,6 @@ terraform/teardown_details.txt testing/data/__pycache__/* testing/data/__pycache__/generate_data.cpython-312.pyc -testing/testing_var.yaml +testing/load_data.yaml testing/schema-mapping/tables.yaml kafka_topics.txt \ No newline at end of file diff --git a/README.md b/README.md index 161c1ea..26dd2fa 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ export EC2_PUBLIC_IP="" bash scripts/load_kafka.sh ``` -If you would like to automate the Kafka data loading, create a `testing/testing_var.sh` with the following format: +If you would like to automate the Kafka data loading, create a `testing/load_data.sh` with the following format: ```yaml streaming: @@ -81,9 +81,9 @@ Once you are finished using the project, delete the notebook and the associated ### Code Layout -| Path | Description | -| :---------------------- | :------------------------------------------------------------- | -| terraform/ | Terraform source code. | -| scripts/ | shell scripts to build, deploy, and interact with the project. | -| testing/ | Example kafka ingestion. | -| testing/schema_mapping/ | Mapping out MySQL table syntax to sample entries. | +| Path | Description | +| :-------------- | :------------------------------------------------------------- | +| terraform/ | Terraform source code. | +| scripts/ | shell scripts to build, deploy, and interact with the project. | +| testing/ | Example kafka ingestion. | +| schema_mapping/ | Mapping out table syntax to sample entries. | diff --git a/testing/schema-mapping/README.md b/schema-mapping/README.md similarity index 59% rename from testing/schema-mapping/README.md rename to schema-mapping/README.md index 2979edd..c949bee 100644 --- a/testing/schema-mapping/README.md +++ b/schema-mapping/README.md @@ -2,7 +2,7 @@ ## MySQL Schema -Input sample tables into the `testing/schema-mapping/ex-mysql-schema.sql` file. +Input sample tables into the `testing/schema-mapping/mysql-schema.sql` file. ## Generate data and testing vars @@ -15,4 +15,4 @@ python testing/schema-mapping/map-data.py Generates: - `testing/schema-mapping/kafka_topics.txt`: topics for provisioning deployment -- `testing/testing_var.yaml`: script for automatically loading topics using `testing/stream_kafka.py` +- `testing/load_data.yaml`: script for automatically loading topics using `testing/stream_kafka.py` diff --git a/testing/schema-mapping/map-data.py b/schema-mapping/map-data.py similarity index 92% rename from testing/schema-mapping/map-data.py rename to schema-mapping/map-data.py index 0b31464..6cb4489 100644 --- a/testing/schema-mapping/map-data.py +++ b/schema-mapping/map-data.py @@ -2,15 +2,15 @@ import re import yaml -sql_file_name = "ex-mysql-schema.sql" -yaml_file_name = "../data/data.yaml" +sql_file_name = "mysql-schema.sql" +yaml_file_name = "../testing/data/data.yaml" kafka_topic_file_name = "kafka_topics.txt" -testing_var_file_name = "../testing_var.yaml" +load_data_file_name = "../testing/load_data.yaml" script_dir = os.path.dirname(os.path.abspath(__file__)) sql_file_path = os.path.join(script_dir, sql_file_name) yaml_file_path = os.path.join(script_dir, yaml_file_name) kafka_file_path = os.path.join(script_dir, kafka_topic_file_name) -testing_var_file_path = os.path.join(script_dir, testing_var_file_name) +load_data_file_path = os.path.join(script_dir, load_data_file_name) RECORD_COUNT = 1000 def topic_config(table_names): @@ -68,7 +68,7 @@ def create_streaming_file(table_names): "record_count": RECORD_COUNT, "dataset": name, }) - write_yaml({"streaming": streaming_list}, testing_var_file_path) + write_yaml({"streaming": streaming_list}, load_data_file_path) def write_tables_dict(create_table_statements): tables_dict = {"data": {}} diff --git a/testing/schema-mapping/ex-mysql-schema.sql b/schema-mapping/mysql-schema.sql similarity index 100% rename from testing/schema-mapping/ex-mysql-schema.sql rename to schema-mapping/mysql-schema.sql diff --git a/testing/stream_kafka.py b/testing/stream_kafka.py index 75e0199..a3b3fb1 100644 --- a/testing/stream_kafka.py +++ b/testing/stream_kafka.py @@ -45,7 +45,7 @@ def produce_event_logs_to_kafka(num_records, topic_name, dataset_num): if __name__ == "__main__": - file_path = os.getcwd() + "/testing/testing_var.yaml" + file_path = os.getcwd() + "/testing/load_data.yaml" if os.path.exists(file_path): streaming = read_yaml(file_path)['streaming'] for stream in streaming: diff --git a/testing/testing_var.yaml b/testing/testing_var.yaml new file mode 100644 index 0000000..ca0d419 --- /dev/null +++ b/testing/testing_var.yaml @@ -0,0 +1,1501 @@ +streaming: +- dataset: users + record_count: 1000 + topic_name: users_topic +- dataset: experiments + record_count: 1000 + topic_name: experiments_topic +- dataset: variants + record_count: 1000 + topic_name: variants_topic +- dataset: userassignments + record_count: 1000 + topic_name: userassignments_topic +- dataset: events + record_count: 1000 + topic_name: events_topic +- dataset: goals + record_count: 1000 + topic_name: goals_topic +- dataset: goalmetrics + record_count: 1000 + topic_name: goalmetrics_topic +- dataset: feedback + record_count: 1000 + topic_name: feedback_topic +- dataset: featureflags + record_count: 1000 + topic_name: featureflags_topic +- dataset: flagassignments + record_count: 1000 + topic_name: flagassignments_topic +- dataset: sessions + record_count: 1000 + topic_name: sessions_topic +- dataset: pageviews + record_count: 1000 + topic_name: pageviews_topic +- dataset: clicks + record_count: 1000 + topic_name: clicks_topic +- dataset: annotations + record_count: 1000 + topic_name: annotations_topic +- dataset: metrics + record_count: 1000 + topic_name: metrics_topic +- dataset: cohorts + record_count: 1000 + topic_name: cohorts_topic +- dataset: cohortmembers + record_count: 1000 + topic_name: cohortmembers_topic +- dataset: usersegments + record_count: 1000 + topic_name: usersegments_topic +- dataset: segmentmemberships + record_count: 1000 + topic_name: segmentmemberships_topic +- dataset: notifications + record_count: 1000 + topic_name: notifications_topic +- dataset: testplans + record_count: 1000 + topic_name: testplans_topic +- dataset: results + record_count: 1000 + topic_name: results_topic +- dataset: rollouts + record_count: 1000 + topic_name: rollouts_topic +- dataset: developmenttasks + record_count: 1000 + topic_name: developmenttasks_topic +- dataset: taskcomments + record_count: 1000 + topic_name: taskcomments_topic +- dataset: codereviews + record_count: 1000 + topic_name: codereviews_topic +- dataset: testcases + record_count: 1000 + topic_name: testcases_topic +- dataset: testresults + record_count: 1000 + topic_name: testresults_topic +- dataset: releases + record_count: 1000 + topic_name: releases_topic +- dataset: releasenotes + record_count: 1000 + topic_name: releasenotes_topic +- dataset: userstories + record_count: 1000 + topic_name: userstories_topic +- dataset: storyassignments + record_count: 1000 + topic_name: storyassignments_topic +- dataset: sprints + record_count: 1000 + topic_name: sprints_topic +- dataset: sprinttasks + record_count: 1000 + topic_name: sprinttasks_topic +- dataset: backlogs + record_count: 1000 + topic_name: backlogs_topic +- dataset: qateams + record_count: 1000 + topic_name: qateams_topic +- dataset: qaassignments + record_count: 1000 + topic_name: qaassignments_topic +- dataset: qareports + record_count: 1000 + topic_name: qareports_topic +- dataset: integrationtests + record_count: 1000 + topic_name: integrationtests_topic +- dataset: integrationresults + record_count: 1000 + topic_name: integrationresults_topic +- dataset: performancetests + record_count: 1000 + topic_name: performancetests_topic +- dataset: performanceresults + record_count: 1000 + topic_name: performanceresults_topic +- dataset: documentation + record_count: 1000 + topic_name: documentation_topic +- dataset: apiendpoints + record_count: 1000 + topic_name: apiendpoints_topic +- dataset: apilogs + record_count: 1000 + topic_name: apilogs_topic +- dataset: systemmetrics + record_count: 1000 + topic_name: systemmetrics_topic +- dataset: loadtests + record_count: 1000 + topic_name: loadtests_topic +- dataset: loadtestresults + record_count: 1000 + topic_name: loadtestresults_topic +- dataset: securitytests + record_count: 1000 + topic_name: securitytests_topic +- dataset: securitytestresults + record_count: 1000 + topic_name: securitytestresults_topic +- dataset: riskassessments + record_count: 1000 + topic_name: riskassessments_topic +- dataset: audittrails + record_count: 1000 + topic_name: audittrails_topic +- dataset: collaborationtools + record_count: 1000 + topic_name: collaborationtools_topic +- dataset: toolintegrations + record_count: 1000 + topic_name: toolintegrations_topic +- dataset: userengagements + record_count: 1000 + topic_name: userengagements_topic +- dataset: changerequests + record_count: 1000 + topic_name: changerequests_topic +- dataset: changerequestapprovals + record_count: 1000 + topic_name: changerequestapprovals_topic +- dataset: trainingsessions + record_count: 1000 + topic_name: trainingsessions_topic +- dataset: trainingattendance + record_count: 1000 + topic_name: trainingattendance_topic +- dataset: usersatisfactionsurveys + record_count: 1000 + topic_name: usersatisfactionsurveys_topic +- dataset: surveyresponses + record_count: 1000 + topic_name: surveyresponses_topic +- dataset: analytics + record_count: 1000 + topic_name: analytics_topic +- dataset: productbacklog + record_count: 1000 + topic_name: productbacklog_topic +- dataset: backlogrefinements + record_count: 1000 + topic_name: backlogrefinements_topic +- dataset: productroadmaps + record_count: 1000 + topic_name: productroadmaps_topic +- dataset: roadmapitems + record_count: 1000 + topic_name: roadmapitems_topic +- dataset: incidentreports + record_count: 1000 + topic_name: incidentreports_topic +- dataset: incidentresolutions + record_count: 1000 + topic_name: incidentresolutions_topic +- dataset: communicationlogs + record_count: 1000 + topic_name: communicationlogs_topic +- dataset: externalcollaborations + record_count: 1000 + topic_name: externalcollaborations_topic +- dataset: collaborationnotes + record_count: 1000 + topic_name: collaborationnotes_topic +- dataset: retrospectives + record_count: 1000 + topic_name: retrospectives_topic +- dataset: performancereviews2 + record_count: 1000 + topic_name: performancereviews2_topic +- dataset: userroles + record_count: 1000 + topic_name: userroles_topic +- dataset: userroleassignments + record_count: 1000 + topic_name: userroleassignments_topic +- dataset: apikeys + record_count: 1000 + topic_name: apikeys_topic +- dataset: deploymentlogs + record_count: 1000 + topic_name: deploymentlogs_topic +- dataset: technicaldebt + record_count: 1000 + topic_name: technicaldebt_topic +- dataset: debtresolutions + record_count: 1000 + topic_name: debtresolutions_topic +- dataset: architecturereviews + record_count: 1000 + topic_name: architecturereviews_topic +- dataset: technicalspecifications + record_count: 1000 + topic_name: technicalspecifications_topic +- dataset: technologystack + record_count: 1000 + topic_name: technologystack_topic +- dataset: stackcomponents + record_count: 1000 + topic_name: stackcomponents_topic +- dataset: stakeholders + record_count: 1000 + topic_name: stakeholders_topic +- dataset: stakeholderfeedback + record_count: 1000 + topic_name: stakeholderfeedback_topic +- dataset: meetingnotes + record_count: 1000 + topic_name: meetingnotes_topic +- dataset: projecttimelines + record_count: 1000 + topic_name: projecttimelines_topic +- dataset: milestones + record_count: 1000 + topic_name: milestones_topic +- dataset: riskmitigationplans + record_count: 1000 + topic_name: riskmitigationplans_topic +- dataset: usergroups + record_count: 1000 + topic_name: usergroups_topic +- dataset: groupmemberships + record_count: 1000 + topic_name: groupmemberships_topic +- dataset: usernotifications + record_count: 1000 + topic_name: usernotifications_topic +- dataset: userpreferences + record_count: 1000 + topic_name: userpreferences_topic +- dataset: dataprivacyagreements + record_count: 1000 + topic_name: dataprivacyagreements_topic +- dataset: compliancechecklists + record_count: 1000 + topic_name: compliancechecklists_topic +- dataset: checklistitems + record_count: 1000 + topic_name: checklistitems_topic +- dataset: knowledgebasearticles + record_count: 1000 + topic_name: knowledgebasearticles_topic +- dataset: articlefeedback + record_count: 1000 + topic_name: articlefeedback_topic +- dataset: roadmapfeedback + record_count: 1000 + topic_name: roadmapfeedback_topic +- dataset: projectstatus + record_count: 1000 + topic_name: projectstatus_topic +- dataset: employees + record_count: 1000 + topic_name: employees_topic +- dataset: departments + record_count: 1000 + topic_name: departments_topic +- dataset: projects + record_count: 1000 + topic_name: projects_topic +- dataset: employeedepartments + record_count: 1000 + topic_name: employeedepartments_topic +- dataset: projectassignments + record_count: 1000 + topic_name: projectassignments_topic +- dataset: salaries + record_count: 1000 + topic_name: salaries_topic +- dataset: performancereviews + record_count: 1000 + topic_name: performancereviews_topic +- dataset: attendance + record_count: 1000 + topic_name: attendance_topic +- dataset: expenses + record_count: 1000 + topic_name: expenses_topic +- dataset: clients + record_count: 1000 + topic_name: clients_topic +- dataset: invoices + record_count: 1000 + topic_name: invoices_topic +- dataset: payments + record_count: 1000 + topic_name: payments_topic +- dataset: suppliers + record_count: 1000 + topic_name: suppliers_topic +- dataset: purchases + record_count: 1000 + topic_name: purchases_topic +- dataset: products + record_count: 1000 + topic_name: products_topic +- dataset: inventory + record_count: 1000 + topic_name: inventory_topic +- dataset: meetings + record_count: 1000 + topic_name: meetings_topic +- dataset: meetingparticipants + record_count: 1000 + topic_name: meetingparticipants_topic +- dataset: trainingprograms + record_count: 1000 + topic_name: trainingprograms_topic +- dataset: employeetraining + record_count: 1000 + topic_name: employeetraining_topic +- dataset: policies + record_count: 1000 + topic_name: policies_topic +- dataset: policyacknowledgments + record_count: 1000 + topic_name: policyacknowledgments_topic +- dataset: companyassets + record_count: 1000 + topic_name: companyassets_topic +- dataset: assetallocation + record_count: 1000 + topic_name: assetallocation_topic +- dataset: customerfeedback + record_count: 1000 + topic_name: customerfeedback_topic +- dataset: marketingcampaigns + record_count: 1000 + topic_name: marketingcampaigns_topic +- dataset: campaignperformance + record_count: 1000 + topic_name: campaignperformance_topic +- dataset: contracts + record_count: 1000 + topic_name: contracts_topic +- dataset: auditlogs + record_count: 1000 + topic_name: auditlogs_topic +- dataset: riskmanagement + record_count: 1000 + topic_name: riskmanagement_topic +- dataset: riskmitigation + record_count: 1000 + topic_name: riskmitigation_topic +- dataset: businesscontinuityplans + record_count: 1000 + topic_name: businesscontinuityplans_topic +- dataset: plantesting + record_count: 1000 + topic_name: plantesting_topic +- dataset: socialmediaaccounts + record_count: 1000 + topic_name: socialmediaaccounts_topic +- dataset: socialmediaposts + record_count: 1000 + topic_name: socialmediaposts_topic +- dataset: suppliercontracts + record_count: 1000 + topic_name: suppliercontracts_topic +- dataset: eventsvt + record_count: 1000 + topic_name: eventsvt_topic +- dataset: eventparticipants + record_count: 1000 + topic_name: eventparticipants_topic +- dataset: marketresearch + record_count: 1000 + topic_name: marketresearch_topic +- dataset: companypolicies + record_count: 1000 + topic_name: companypolicies_topic +- dataset: employeecomplaints + record_count: 1000 + topic_name: employeecomplaints_topic +- dataset: employeebenefits + record_count: 1000 + topic_name: employeebenefits_topic +- dataset: useraccounts + record_count: 1000 + topic_name: useraccounts_topic +- dataset: passwordresets + record_count: 1000 + topic_name: passwordresets_topic +- dataset: itassets + record_count: 1000 + topic_name: itassets_topic +- dataset: itsupporttickets + record_count: 1000 + topic_name: itsupporttickets_topic +- dataset: vendormanagement + record_count: 1000 + topic_name: vendormanagement_topic +- dataset: purchaseorders + record_count: 1000 + topic_name: purchaseorders_topic +- dataset: sales + record_count: 1000 + topic_name: sales_topic +- dataset: salesreports + record_count: 1000 + topic_name: salesreports_topic +- dataset: financialreports + record_count: 1000 + topic_name: financialreports_topic +- dataset: businessgoals + record_count: 1000 + topic_name: businessgoals_topic +- dataset: goalprogress + record_count: 1000 + topic_name: goalprogress_topic +- dataset: userrolesvt + record_count: 1000 + topic_name: userrolesvt_topic +- dataset: roleassignments + record_count: 1000 + topic_name: roleassignments_topic +- dataset: feedbackforms + record_count: 1000 + topic_name: feedbackforms_topic +- dataset: feedbackresponses + record_count: 1000 + topic_name: feedbackresponses_topic +- dataset: documentmanagement + record_count: 1000 + topic_name: documentmanagement_topic +- dataset: legaldocuments + record_count: 1000 + topic_name: legaldocuments_topic +- dataset: complianceaudits + record_count: 1000 + topic_name: complianceaudits_topic +- dataset: auditrecommendations + record_count: 1000 + topic_name: auditrecommendations_topic +- dataset: taxfilings + record_count: 1000 + topic_name: taxfilings_topic +- dataset: paymentmethods + record_count: 1000 + topic_name: paymentmethods_topic +- dataset: paymenttransactions + record_count: 1000 + topic_name: paymenttransactions_topic +- dataset: businessunits + record_count: 1000 + topic_name: businessunits_topic +- dataset: unitbudgets + record_count: 1000 + topic_name: unitbudgets_topic +- dataset: strategicinitiatives + record_count: 1000 + topic_name: strategicinitiatives_topic +- dataset: initiativeprogress + record_count: 1000 + topic_name: initiativeprogress_topic +- dataset: mediarelations + record_count: 1000 + topic_name: mediarelations_topic +- dataset: mediaeventsvt + record_count: 1000 + topic_name: mediaeventsvt_topic +- dataset: stakeholdersvt + record_count: 1000 + topic_name: stakeholdersvt_topic +- dataset: stakeholderengagement + record_count: 1000 + topic_name: stakeholderengagement_topic +- dataset: procurement + record_count: 1000 + topic_name: procurement_topic +- dataset: supplierratings + record_count: 1000 + topic_name: supplierratings_topic +- dataset: companyvehicles + record_count: 1000 + topic_name: companyvehicles_topic +- dataset: vehiclemaintenance + record_count: 1000 + topic_name: vehiclemaintenance_topic +- dataset: officelocations + record_count: 1000 + topic_name: officelocations_topic +- dataset: officeresources + record_count: 1000 + topic_name: officeresources_topic +- dataset: employeerelocation + record_count: 1000 + topic_name: employeerelocation_topic +- dataset: techstack + record_count: 1000 + topic_name: techstack_topic +- dataset: technologyusage + record_count: 1000 + topic_name: technologyusage_topic +- dataset: communityengagement + record_count: 1000 + topic_name: communityengagement_topic +- dataset: sponsorships + record_count: 1000 + topic_name: sponsorships_topic +- dataset: employeesurveys + record_count: 1000 + topic_name: employeesurveys_topic +- dataset: surveyres + record_count: 1000 + topic_name: surveyres_topic +- dataset: disasterrecoveryplans + record_count: 1000 + topic_name: disasterrecoveryplans_topic +- dataset: planimplementation + record_count: 1000 + topic_name: planimplementation_topic +- dataset: operationalmetrics + record_count: 1000 + topic_name: operationalmetrics_topic +- dataset: technologyupdates + record_count: 1000 + topic_name: technologyupdates_topic +- dataset: crisismanagement + record_count: 1000 + topic_name: crisismanagement_topic +- dataset: crisisresponse + record_count: 1000 + topic_name: crisisresponse_topic +- dataset: companyeventsvt + record_count: 1000 + topic_name: companyeventsvt_topic +- dataset: eventcoordination + record_count: 1000 + topic_name: eventcoordination_topic +- dataset: salesstrategies + record_count: 1000 + topic_name: salesstrategies_topic +- dataset: strategyimplementation + record_count: 1000 + topic_name: strategyimplementation_topic +- dataset: employeeonboarding + record_count: 1000 + topic_name: employeeonboarding_topic +- dataset: employeeoffboarding + record_count: 1000 + topic_name: employeeoffboarding_topic +- dataset: healthandsafety + record_count: 1000 + topic_name: healthandsafety_topic +- dataset: increpo + record_count: 1000 + topic_name: increpo_topic +- dataset: securityincidents + record_count: 1000 + topic_name: securityincidents_topic +- dataset: students + record_count: 1000 + topic_name: students_topic +- dataset: courses + record_count: 1000 + topic_name: courses_topic +- dataset: instructors + record_count: 1000 + topic_name: instructors_topic +- dataset: dept + record_count: 1000 + topic_name: dept_topic +- dataset: enrollments + record_count: 1000 + topic_name: enrollments_topic +- dataset: classes + record_count: 1000 + topic_name: classes_topic +- dataset: assignments + record_count: 1000 + topic_name: assignments_topic +- dataset: grades + record_count: 1000 + topic_name: grades_topic +- dataset: attendancevt + record_count: 1000 + topic_name: attendancevt_topic +- dataset: extracurriculars + record_count: 1000 + topic_name: extracurriculars_topic +- dataset: studentactivities + record_count: 1000 + topic_name: studentactivities_topic +- dataset: courseprerequisites + record_count: 1000 + topic_name: courseprerequisites_topic +- dataset: coursematerials + record_count: 1000 + topic_name: coursematerials_topic +- dataset: vtevents + record_count: 1000 + topic_name: vtevents_topic +- dataset: eventparticipation + record_count: 1000 + topic_name: eventparticipation_topic +- dataset: library + record_count: 1000 + topic_name: library_topic +- dataset: bookloans + record_count: 1000 + topic_name: bookloans_topic +- dataset: scholarships + record_count: 1000 + topic_name: scholarships_topic +- dataset: studentscholarships + record_count: 1000 + topic_name: studentscholarships_topic +- dataset: financialaidedu + record_count: 1000 + topic_name: financialaidedu_topic +- dataset: tuitionfees + record_count: 1000 + topic_name: tuitionfees_topic +- dataset: staff + record_count: 1000 + topic_name: staff_topic +- dataset: staffroles + record_count: 1000 + topic_name: staffroles_topic +- dataset: staffassignments + record_count: 1000 + topic_name: staffassignments_topic +- dataset: feedback2 + record_count: 1000 + topic_name: feedback2_topic +- dataset: coursefeedback + record_count: 1000 + topic_name: coursefeedback_topic +- dataset: studygroups + record_count: 1000 + topic_name: studygroups_topic +- dataset: groupmembers + record_count: 1000 + topic_name: groupmembers_topic +- dataset: tutoringsessions + record_count: 1000 + topic_name: tutoringsessions_topic +- dataset: facultymeetings + record_count: 1000 + topic_name: facultymeetings_topic +- dataset: meetingattendancevt + record_count: 1000 + topic_name: meetingattendancevt_topic +- dataset: scholarshipsoffered + record_count: 1000 + topic_name: scholarshipsoffered_topic +- dataset: internships + record_count: 1000 + topic_name: internships_topic +- dataset: studentinternships + record_count: 1000 + topic_name: studentinternships_topic +- dataset: eventcoordinationtwo + record_count: 1000 + topic_name: eventcoordinationtwo_topic +- dataset: awards + record_count: 1000 + topic_name: awards_topic +- dataset: studentawards + record_count: 1000 + topic_name: studentawards_topic +- dataset: researchprojects + record_count: 1000 + topic_name: researchprojects_topic +- dataset: projectparticipants + record_count: 1000 + topic_name: projectparticipants_topic +- dataset: courseschedules + record_count: 1000 + topic_name: courseschedules_topic +- dataset: classroomresources + record_count: 1000 + topic_name: classroomresources_topic +- dataset: academiccalendar + record_count: 1000 + topic_name: academiccalendar_topic +- dataset: academicpolicies + record_count: 1000 + topic_name: academicpolicies_topic +- dataset: policyupdates + record_count: 1000 + topic_name: policyupdates_topic +- dataset: notify + record_count: 1000 + topic_name: notify_topic +- dataset: parents + record_count: 1000 + topic_name: parents_topic +- dataset: studentparents + record_count: 1000 + topic_name: studentparents_topic +- dataset: healthrecords + record_count: 1000 + topic_name: healthrecords_topic +- dataset: studentrights + record_count: 1000 + topic_name: studentrights_topic +- dataset: counselingsessions + record_count: 1000 + topic_name: counselingsessions_topic +- dataset: academicadvising + record_count: 1000 + topic_name: academicadvising_topic +- dataset: courseevaluations + record_count: 1000 + topic_name: courseevaluations_topic +- dataset: academichonors + record_count: 1000 + topic_name: academichonors_topic +- dataset: studenthonors + record_count: 1000 + topic_name: studenthonors_topic +- dataset: lmsaccounts + record_count: 1000 + topic_name: lmsaccounts_topic +- dataset: discussionboards + record_count: 1000 + topic_name: discussionboards_topic +- dataset: discussionposts + record_count: 1000 + topic_name: discussionposts_topic +- dataset: courseforums + record_count: 1000 + topic_name: courseforums_topic +- dataset: forumresponses + record_count: 1000 + topic_name: forumresponses_topic +- dataset: onlineresources + record_count: 1000 + topic_name: onlineresources_topic +- dataset: laboratoryequipment + record_count: 1000 + topic_name: laboratoryequipment_topic +- dataset: labreservations + record_count: 1000 + topic_name: labreservations_topic +- dataset: courseannouncements + record_count: 1000 + topic_name: courseannouncements_topic +- dataset: coursesubscriptions + record_count: 1000 + topic_name: coursesubscriptions_topic +- dataset: volunteeropportunities + record_count: 1000 + topic_name: volunteeropportunities_topic +- dataset: studentvolunteers + record_count: 1000 + topic_name: studentvolunteers_topic +- dataset: facilityreservations + record_count: 1000 + topic_name: facilityreservations_topic +- dataset: conferenceparticipation + record_count: 1000 + topic_name: conferenceparticipation_topic +- dataset: internationalstudents + record_count: 1000 + topic_name: internationalstudents_topic +- dataset: mentormentee + record_count: 1000 + topic_name: mentormentee_topic +- dataset: careerservices + record_count: 1000 + topic_name: careerservices_topic +- dataset: careerappointments + record_count: 1000 + topic_name: careerappointments_topic +- dataset: alumni + record_count: 1000 + topic_name: alumni_topic +- dataset: alumniactivities + record_count: 1000 + topic_name: alumniactivities_topic +- dataset: campusfacilities + record_count: 1000 + topic_name: campusfacilities_topic +- dataset: facilityusage + record_count: 1000 + topic_name: facilityusage_topic +- dataset: campusvtevents + record_count: 1000 + topic_name: campusvtevents_topic +- dataset: campusorganizations + record_count: 1000 + topic_name: campusorganizations_topic +- dataset: organizationmembership + record_count: 1000 + topic_name: organizationmembership_topic +- dataset: campussurveys + record_count: 1000 + topic_name: campussurveys_topic +- dataset: surveyresponsesedu + record_count: 1000 + topic_name: surveyresponsesedu_topic +- dataset: socialmediaengagement + record_count: 1000 + topic_name: socialmediaengagement_topic +- dataset: transportationservices + record_count: 1000 + topic_name: transportationservices_topic +- dataset: transportationusage + record_count: 1000 + topic_name: transportationusage_topic +- dataset: communityservice + record_count: 1000 + topic_name: communityservice_topic +- dataset: studentcommunityservice + record_count: 1000 + topic_name: studentcommunityservice_topic +- dataset: studenthealthservices + record_count: 1000 + topic_name: studenthealthservices_topic +- dataset: counselingservices + record_count: 1000 + topic_name: counselingservices_topic +- dataset: studentcounselingservices + record_count: 1000 + topic_name: studentcounselingservices_topic +- dataset: studentfinancialservices + record_count: 1000 + topic_name: studentfinancialservices_topic +- dataset: academicresources + record_count: 1000 + topic_name: academicresources_topic +- dataset: studentresourceusage + record_count: 1000 + topic_name: studentresourceusage_topic +- dataset: courselibraries + record_count: 1000 + topic_name: courselibraries_topic +- dataset: academicintegritypolicies + record_count: 1000 + topic_name: academicintegritypolicies_topic +- dataset: integrityviolations + record_count: 1000 + topic_name: integrityviolations_topic +- dataset: financialaidedutwo + record_count: 1000 + topic_name: financialaidedutwo_topic +- dataset: studentjobopportunities + record_count: 1000 + topic_name: studentjobopportunities_topic +- dataset: campusnews + record_count: 1000 + topic_name: campusnews_topic +- dataset: emergencycontacts + record_count: 1000 + topic_name: emergencycontacts_topic +- dataset: studentfeedback + record_count: 1000 + topic_name: studentfeedback_topic +- dataset: campaigns + record_count: 1000 + topic_name: campaigns_topic +- dataset: campaignchannels + record_count: 1000 + topic_name: campaignchannels_topic +- dataset: leads + record_count: 1000 + topic_name: leads_topic +- dataset: leadassignments + record_count: 1000 + topic_name: leadassignments_topic +- dataset: contacts + record_count: 1000 + topic_name: contacts_topic +- dataset: opportunities + record_count: 1000 + topic_name: opportunities_topic +- dataset: marketingmaterials + record_count: 1000 + topic_name: marketingmaterials_topic +- dataset: materialusage + record_count: 1000 + topic_name: materialusage_topic +- dataset: emailcampaigns + record_count: 1000 + topic_name: emailcampaigns_topic +- dataset: emailopens + record_count: 1000 + topic_name: emailopens_topic +- dataset: emailclicks + record_count: 1000 + topic_name: emailclicks_topic +- dataset: socialmediacampaigns + record_count: 1000 + topic_name: socialmediacampaigns_topic +- dataset: socialmediaengagements + record_count: 1000 + topic_name: socialmediaengagements_topic +- dataset: surveys + record_count: 1000 + topic_name: surveys_topic +- dataset: surveyquestions + record_count: 1000 + topic_name: surveyquestions_topic +- dataset: marksurveyresponses + record_count: 1000 + topic_name: marksurveyresponses_topic +- dataset: markmarketresearch + record_count: 1000 + topic_name: markmarketresearch_topic +- dataset: competitoranalysis + record_count: 1000 + topic_name: competitoranalysis_topic +- dataset: userpersonas + record_count: 1000 + topic_name: userpersonas_topic +- dataset: brandguidelines + record_count: 1000 + topic_name: brandguidelines_topic +- dataset: marketingbudgets + record_count: 1000 + topic_name: marketingbudgets_topic +- dataset: partnerships + record_count: 1000 + topic_name: partnerships_topic +- dataset: partnershipactivities + record_count: 1000 + topic_name: partnershipactivities_topic +- dataset: affiliateprograms + record_count: 1000 + topic_name: affiliateprograms_topic +- dataset: affiliates + record_count: 1000 + topic_name: affiliates_topic +- dataset: affiliatesales + record_count: 1000 + topic_name: affiliatesales_topic +- dataset: eventmarketing + record_count: 1000 + topic_name: eventmarketing_topic +- dataset: eventattendees + record_count: 1000 + topic_name: eventattendees_topic +- dataset: webinars + record_count: 1000 + topic_name: webinars_topic +- dataset: webinarregistrations + record_count: 1000 + topic_name: webinarregistrations_topic +- dataset: marketingautomation + record_count: 1000 + topic_name: marketingautomation_topic +- dataset: automationactions + record_count: 1000 + topic_name: automationactions_topic +- dataset: adcampaigns + record_count: 1000 + topic_name: adcampaigns_topic +- dataset: adperformance + record_count: 1000 + topic_name: adperformance_topic +- dataset: contentcalendar + record_count: 1000 + topic_name: contentcalendar_topic +- dataset: contentpieces + record_count: 1000 + topic_name: contentpieces_topic +- dataset: contentengagement + record_count: 1000 + topic_name: contentengagement_topic +- dataset: markcustomerfeedback + record_count: 1000 + topic_name: markcustomerfeedback_topic +- dataset: referralprograms + record_count: 1000 + topic_name: referralprograms_topic +- dataset: referrals + record_count: 1000 + topic_name: referrals_topic +- dataset: competitortracking + record_count: 1000 + topic_name: competitortracking_topic +- dataset: competitoractions + record_count: 1000 + topic_name: competitoractions_topic +- dataset: marketingevents + record_count: 1000 + topic_name: marketingevents_topic +- dataset: eventfeedback + record_count: 1000 + topic_name: eventfeedback_topic +- dataset: promotionalcodes + record_count: 1000 + topic_name: promotionalcodes_topic +- dataset: codeusage + record_count: 1000 + topic_name: codeusage_topic +- dataset: performancemetrics + record_count: 1000 + topic_name: performancemetrics_topic +- dataset: roianalysis + record_count: 1000 + topic_name: roianalysis_topic +- dataset: budgetallocations + record_count: 1000 + topic_name: budgetallocations_topic +- dataset: mediaspend + record_count: 1000 + topic_name: mediaspend_topic +- dataset: targetaudiences + record_count: 1000 + topic_name: targetaudiences_topic +- dataset: marketinganalytics + record_count: 1000 + topic_name: marketinganalytics_topic +- dataset: leadsources + record_count: 1000 + topic_name: leadsources_topic +- dataset: sourcetracking + record_count: 1000 + topic_name: sourcetracking_topic +- dataset: brandawareness + record_count: 1000 + topic_name: brandawareness_topic +- dataset: brandperception + record_count: 1000 + topic_name: brandperception_topic +- dataset: influencermarketing + record_count: 1000 + topic_name: influencermarketing_topic +- dataset: influencercollaborations + record_count: 1000 + topic_name: influencercollaborations_topic +- dataset: marketingcollateral + record_count: 1000 + topic_name: marketingcollateral_topic +- dataset: collateralusage + record_count: 1000 + topic_name: collateralusage_topic +- dataset: customersegmentation + record_count: 1000 + topic_name: customersegmentation_topic +- dataset: segmentmembers + record_count: 1000 + topic_name: segmentmembers_topic +- dataset: customerjourney + record_count: 1000 + topic_name: customerjourney_topic +- dataset: marketingperformance + record_count: 1000 + topic_name: marketingperformance_topic +- dataset: adspendanalysis + record_count: 1000 + topic_name: adspendanalysis_topic +- dataset: conversionrates + record_count: 1000 + topic_name: conversionrates_topic +- dataset: customerretention + record_count: 1000 + topic_name: customerretention_topic +- dataset: churnanalysis + record_count: 1000 + topic_name: churnanalysis_topic +- dataset: customerloyaltyprograms + record_count: 1000 + topic_name: customerloyaltyprograms_topic +- dataset: loyaltyprogrammembers + record_count: 1000 + topic_name: loyaltyprogrammembers_topic +- dataset: loyaltyredemptions + record_count: 1000 + topic_name: loyaltyredemptions_topic +- dataset: eventsponsorships + record_count: 1000 + topic_name: eventsponsorships_topic +- dataset: customersuccessstories + record_count: 1000 + topic_name: customersuccessstories_topic +- dataset: marketingtechstack + record_count: 1000 + topic_name: marketingtechstack_topic +- dataset: techstackusage + record_count: 1000 + topic_name: techstackusage_topic +- dataset: socialmediaanalytics + record_count: 1000 + topic_name: socialmediaanalytics_topic +- dataset: contentperformance + record_count: 1000 + topic_name: contentperformance_topic +- dataset: leadscoring + record_count: 1000 + topic_name: leadscoring_topic +- dataset: accountbasedmarketing + record_count: 1000 + topic_name: accountbasedmarketing_topic +- dataset: abmengagements + record_count: 1000 + topic_name: abmengagements_topic +- dataset: marketingkpis + record_count: 1000 + topic_name: marketingkpis_topic +- dataset: kpitracking + record_count: 1000 + topic_name: kpitracking_topic +- dataset: digitalmarketingstrategy + record_count: 1000 + topic_name: digitalmarketingstrategy_topic +- dataset: vtstratimplement + record_count: 1000 + topic_name: vtstratimplement_topic +- dataset: customeracquisition + record_count: 1000 + topic_name: customeracquisition_topic +- dataset: customerretentionprograms + record_count: 1000 + topic_name: customerretentionprograms_topic +- dataset: retentionprogramparticipation + record_count: 1000 + topic_name: retentionprogramparticipation_topic +- dataset: customersegmentationcriteria + record_count: 1000 + topic_name: customersegmentationcriteria_topic +- dataset: audienceinsights + record_count: 1000 + topic_name: audienceinsights_topic +- dataset: marketingworkshops + record_count: 1000 + topic_name: marketingworkshops_topic +- dataset: workshopregistrations + record_count: 1000 + topic_name: workshopregistrations_topic +- dataset: marketingtraining + record_count: 1000 + topic_name: marketingtraining_topic +- dataset: trainingregistrations + record_count: 1000 + topic_name: trainingregistrations_topic +- dataset: marketingpartnerships + record_count: 1000 + topic_name: marketingpartnerships_topic +- dataset: partnershipengagements + record_count: 1000 + topic_name: partnershipengagements_topic +- dataset: marketingresearch + record_count: 1000 + topic_name: marketingresearch_topic +- dataset: researchcollaborations + record_count: 1000 + topic_name: researchcollaborations_topic +- dataset: campaigntrends + record_count: 1000 + topic_name: campaigntrends_topic +- dataset: marketingeventsfeedback + record_count: 1000 + topic_name: marketingeventsfeedback_topic +- dataset: marketinggoals + record_count: 1000 + topic_name: marketinggoals_topic +- dataset: tutors + record_count: 1000 + topic_name: tutors_topic +- dataset: tutorprofiles + record_count: 1000 + topic_name: tutorprofiles_topic +- dataset: subjects + record_count: 1000 + topic_name: subjects_topic +- dataset: tutor_subjects + record_count: 1000 + topic_name: tutor_subjects_topic +- dataset: studentsvt + record_count: 1000 + topic_name: studentsvt_topic +- dataset: student_enrollments + record_count: 1000 + topic_name: student_enrollments_topic +- dataset: vtcourses2 + record_count: 1000 + topic_name: vtcourses2_topic +- dataset: tutor_schedules + record_count: 1000 + topic_name: tutor_schedules_topic +- dataset: tutoringsessionstwo + record_count: 1000 + topic_name: tutoringsessionstwo_topic +- dataset: session_feedback + record_count: 1000 + topic_name: session_feedback_topic +- dataset: tutor_ratings + record_count: 1000 + topic_name: tutor_ratings_topic +- dataset: tutor_availability + record_count: 1000 + topic_name: tutor_availability_topic +- dataset: paymentsvt + record_count: 1000 + topic_name: paymentsvt_topic +- dataset: discounts + record_count: 1000 + topic_name: discounts_topic +- dataset: tutor_reviews + record_count: 1000 + topic_name: tutor_reviews_topic +- dataset: tutoringevents + record_count: 1000 + topic_name: tutoringevents_topic +- dataset: event_attendees + record_count: 1000 + topic_name: event_attendees_topic +- dataset: tutoringnotify + record_count: 1000 + topic_name: tutoringnotify_topic +- dataset: tutor_qualifications + record_count: 1000 + topic_name: tutor_qualifications_topic +- dataset: tutor_experience + record_count: 1000 + topic_name: tutor_experience_topic +- dataset: tutor_specialties + record_count: 1000 + topic_name: tutor_specialties_topic +- dataset: tutor_skills + record_count: 1000 + topic_name: tutor_skills_topic +- dataset: tutor_timings + record_count: 1000 + topic_name: tutor_timings_topic +- dataset: tutor_languages + record_count: 1000 + topic_name: tutor_languages_topic +- dataset: session_notes + record_count: 1000 + topic_name: session_notes_topic +- dataset: tutor_certifications_two + record_count: 1000 + topic_name: tutor_certifications_two_topic +- dataset: session_reschedule + record_count: 1000 + topic_name: session_reschedule_topic +- dataset: tutor_socialmedia + record_count: 1000 + topic_name: tutor_socialmedia_topic +- dataset: tutor_articles + record_count: 1000 + topic_name: tutor_articles_topic +- dataset: tutor_blog + record_count: 1000 + topic_name: tutor_blog_topic +- dataset: tutor_media + record_count: 1000 + topic_name: tutor_media_topic +- dataset: tutor_projects + record_count: 1000 + topic_name: tutor_projects_topic +- dataset: tutor_events + record_count: 1000 + topic_name: tutor_events_topic +- dataset: tutor_connections + record_count: 1000 + topic_name: tutor_connections_topic +- dataset: tutor_successstories + record_count: 1000 + topic_name: tutor_successstories_topic +- dataset: tutor_videos + record_count: 1000 + topic_name: tutor_videos_topic +- dataset: tutor_questions + record_count: 1000 + topic_name: tutor_questions_topic +- dataset: tutor_answers + record_count: 1000 + topic_name: tutor_answers_topic +- dataset: tutor_categories + record_count: 1000 + topic_name: tutor_categories_topic +- dataset: tutor_category_assignment + record_count: 1000 + topic_name: tutor_category_assignment_topic +- dataset: tutor_articles_comments + record_count: 1000 + topic_name: tutor_articles_comments_topic +- dataset: tutor_blog_comments + record_count: 1000 + topic_name: tutor_blog_comments_topic +- dataset: tutor_resources + record_count: 1000 + topic_name: tutor_resources_topic +- dataset: tutor_galleries + record_count: 1000 + topic_name: tutor_galleries_topic +- dataset: gallery_images + record_count: 1000 + topic_name: gallery_images_topic +- dataset: tutor_policies + record_count: 1000 + topic_name: tutor_policies_topic +- dataset: tutor_reports + record_count: 1000 + topic_name: tutor_reports_topic +- dataset: tutor_awards + record_count: 1000 + topic_name: tutor_awards_topic +- dataset: tutor_banners + record_count: 1000 + topic_name: tutor_banners_topic +- dataset: tutor_successmetrics + record_count: 1000 + topic_name: tutor_successmetrics_topic +- dataset: tutor_projects_comments + record_count: 1000 + topic_name: tutor_projects_comments_topic +- dataset: tutor_media_comments + record_count: 1000 + topic_name: tutor_media_comments_topic +- dataset: tutor_event_comments + record_count: 1000 + topic_name: tutor_event_comments_topic +- dataset: tutor_session_tags + record_count: 1000 + topic_name: tutor_session_tags_topic +- dataset: tutor_meeting + record_count: 1000 + topic_name: tutor_meeting_topic +- dataset: tutor_video_sessions + record_count: 1000 + topic_name: tutor_video_sessions_topic +- dataset: tutor_workshops + record_count: 1000 + topic_name: tutor_workshops_topic +- dataset: tutor_forum + record_count: 1000 + topic_name: tutor_forum_topic +- dataset: tutor_forum_comments + record_count: 1000 + topic_name: tutor_forum_comments_topic +- dataset: tutor_notes + record_count: 1000 + topic_name: tutor_notes_topic +- dataset: tutor_articles_likes + record_count: 1000 + topic_name: tutor_articles_likes_topic +- dataset: tutor_blog_likes + record_count: 1000 + topic_name: tutor_blog_likes_topic +- dataset: tutor_projects_likes + record_count: 1000 + topic_name: tutor_projects_likes_topic +- dataset: tutor_certifications_comments + record_count: 1000 + topic_name: tutor_certifications_comments_topic +- dataset: tutor_awards_comments + record_count: 1000 + topic_name: tutor_awards_comments_topic +- dataset: tutor_galleries_comments + record_count: 1000 + topic_name: tutor_galleries_comments_topic +- dataset: tutor_resources_comments + record_count: 1000 + topic_name: tutor_resources_comments_topic +- dataset: tutor_socialmedia_likes + record_count: 1000 + topic_name: tutor_socialmedia_likes_topic +- dataset: tutor_financials + record_count: 1000 + topic_name: tutor_financials_topic +- dataset: tutor_statistics + record_count: 1000 + topic_name: tutor_statistics_topic +- dataset: tutor_industryconnections + record_count: 1000 + topic_name: tutor_industryconnections_topic +- dataset: tutor_referrals + record_count: 1000 + topic_name: tutor_referrals_topic +- dataset: tutor_meeting_notes + record_count: 1000 + topic_name: tutor_meeting_notes_topic +- dataset: tutor_languages_spoken + record_count: 1000 + topic_name: tutor_languages_spoken_topic +- dataset: tutor_interactions + record_count: 1000 + topic_name: tutor_interactions_topic +- dataset: tutor_feedback + record_count: 1000 + topic_name: tutor_feedback_topic +- dataset: tutor_collaborations + record_count: 1000 + topic_name: tutor_collaborations_topic +- dataset: tutor_conferences + record_count: 1000 + topic_name: tutor_conferences_topic +- dataset: tutor_podcasts + record_count: 1000 + topic_name: tutor_podcasts_topic +- dataset: tutor_webinars + record_count: 1000 + topic_name: tutor_webinars_topic +- dataset: tutor_websites + record_count: 1000 + topic_name: tutor_websites_topic +- dataset: tutor_socialmediametrics + record_count: 1000 + topic_name: tutor_socialmediametrics_topic +- dataset: tutor_ads + record_count: 1000 + topic_name: tutor_ads_topic +- dataset: tutor_admetrics + record_count: 1000 + topic_name: tutor_admetrics_topic +- dataset: tutor_competitions + record_count: 1000 + topic_name: tutor_competitions_topic +- dataset: tutor_networks + record_count: 1000 + topic_name: tutor_networks_topic +- dataset: tutor_partnerships + record_count: 1000 + topic_name: tutor_partnerships_topic +- dataset: tutor_certifications + record_count: 1000 + topic_name: tutor_certifications_topic +- dataset: tutor_trainingprograms + record_count: 1000 + topic_name: tutor_trainingprograms_topic +- dataset: tutor_feedbackresponses + record_count: 1000 + topic_name: tutor_feedbackresponses_topic +- dataset: tutor_mentorships + record_count: 1000 + topic_name: tutor_mentorships_topic +- dataset: tutor_resources_two + record_count: 1000 + topic_name: tutor_resources_two_topic +- dataset: tutor_articles_two + record_count: 1000 + topic_name: tutor_articles_two_topic +- dataset: tutor_trainingsessions + record_count: 1000 + topic_name: tutor_trainingsessions_topic +- dataset: tutor_videos_two + record_count: 1000 + topic_name: tutor_videos_two_topic +- dataset: tutor_audiolectures + record_count: 1000 + topic_name: tutor_audiolectures_topic +- dataset: tutor_bookrecommendations + record_count: 1000 + topic_name: tutor_bookrecommendations_topic +- dataset: tutor_feedbacksurveys + record_count: 1000 + topic_name: tutor_feedbacksurveys_topic +- dataset: tutor_eventparticipation + record_count: 1000 + topic_name: tutor_eventparticipation_topic +- dataset: tutor_goals + record_count: 1000 + topic_name: tutor_goals_topic From 8b9ac81676a9046c2189a913a4badf66c468c8ec Mon Sep 17 00:00:00 2001 From: Kevin Tran Date: Thu, 26 Sep 2024 15:49:22 -0700 Subject: [PATCH 12/15] feat: jupyter notebook scalability --- README.md | 8 ++++++++ schema-mapping/README.md | 18 ------------------ testing/ec2-kafka-s2-notebook.ipynb | 2 +- testing/stream_kafka.py | 3 +-- 4 files changed, 10 insertions(+), 21 deletions(-) delete mode 100644 schema-mapping/README.md diff --git a/README.md b/README.md index 26dd2fa..0436a02 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,14 @@ Run the following command to build and deploy the application. This script takes bash scripts/deploy.sh ``` +## Mapping MySQL Tables to SingleStore + +Input sample tables into the `schema-mapping/mysql-schema.sql` file. Run the following script. + +```bash +python schema-mapping/map-data.py +``` + ### Data Ingestion into Kafka Run the following commands to load data into the Kafka EC2 instance. The script populates one of the kafka topics with a dataset listed in `testing/data/data.yaml`: diff --git a/schema-mapping/README.md b/schema-mapping/README.md deleted file mode 100644 index c949bee..0000000 --- a/schema-mapping/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# Creating Sample Data from MySQL Syntax - -## MySQL Schema - -Input sample tables into the `testing/schema-mapping/mysql-schema.sql` file. - -## Generate data and testing vars - -Run the following script. - -```bash -python testing/schema-mapping/map-data.py -``` - -Generates: - -- `testing/schema-mapping/kafka_topics.txt`: topics for provisioning deployment -- `testing/load_data.yaml`: script for automatically loading topics using `testing/stream_kafka.py` diff --git a/testing/ec2-kafka-s2-notebook.ipynb b/testing/ec2-kafka-s2-notebook.ipynb index ce1d81f..095af96 100644 --- a/testing/ec2-kafka-s2-notebook.ipynb +++ b/testing/ec2-kafka-s2-notebook.ipynb @@ -1 +1 @@ -{"cells":[{"attachments":{},"cell_type":"markdown","id":"d9aec522-eb90-4c3d-8857-e4c2b3404d6a","metadata":{"language":"sql"},"source":["# EC2 Kafka + SingleStore Ingestion"]},{"attachments":{},"cell_type":"markdown","id":"8b95e2cd-979a-4048-a7d6-6e65c7539244","metadata":{"language":"sql"},"source":["### Database Configuration"]},{"cell_type":"code","execution_count":null,"id":"1050e92f-06a4-4a15-86fd-5e5cb3e654f2","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:28:50.484025Z","iopub.status.busy":"2024-09-12T15:28:50.479839Z","iopub.status.idle":"2024-09-12T15:29:00.691213Z","shell.execute_reply":"2024-09-12T15:29:00.686049Z","shell.execute_reply.started":"2024-09-12T15:28:50.483957Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","CREATE DATABASE IF NOT EXISTS ec2_kafka;"]},{"cell_type":"code","execution_count":null,"id":"c3b47c15-14e5-407e-ae12-e5d0f466c7ea","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:29:02.170503Z","iopub.status.busy":"2024-09-12T15:29:02.164359Z","iopub.status.idle":"2024-09-12T15:29:02.336865Z","shell.execute_reply":"2024-09-12T15:29:02.323518Z","shell.execute_reply.started":"2024-09-12T15:29:02.170452Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","USE ec2_kafka;"]},{"attachments":{},"cell_type":"markdown","id":"98fc0e53-8b8c-4a4c-b9e0-b1a8abc1665d","metadata":{"language":"sql"},"source":["### Table Creation"]},{"cell_type":"code","execution_count":null,"id":"c08be15a-46b4-4ab1-81ac-cb1e63b76bf4","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:29:03.676929Z","iopub.status.busy":"2024-09-12T15:29:03.675729Z","iopub.status.idle":"2024-09-12T15:29:03.970963Z","shell.execute_reply":"2024-09-12T15:29:03.966534Z","shell.execute_reply.started":"2024-09-12T15:29:03.676863Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","CREATE TABLE vehicle_log (\n"," event_id VARCHAR(50), \n"," timestamp DATETIME,\n"," event_type VARCHAR(50),\n"," description VARCHAR(50),\n"," related_vehicle_id VARCHAR(50),\n"," additional_info JSON\n",");"]},{"cell_type":"code","execution_count":null,"id":"b493a476-e10f-47c8-b779-3ab7fd80f604","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:29:05.260480Z","iopub.status.busy":"2024-09-12T15:29:05.260000Z","iopub.status.idle":"2024-09-12T15:29:05.508462Z","shell.execute_reply":"2024-09-12T15:29:05.507839Z","shell.execute_reply.started":"2024-09-12T15:29:05.260446Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","CREATE TABLE browser_log (\n"," event_id VARCHAR(50),\n"," timestamp DATETIME,\n"," event_type VARCHAR(50),\n"," page VARCHAR(50),\n"," browser VARCHAR(50),\n"," metadata JSON\n",");"]},{"cell_type":"code","execution_count":null,"id":"a1385d9a-070e-47c3-8ee0-622c1b9d88ca","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:29:06.787443Z","iopub.status.busy":"2024-09-12T15:29:06.787076Z","iopub.status.idle":"2024-09-12T15:29:07.063353Z","shell.execute_reply":"2024-09-12T15:29:07.052226Z","shell.execute_reply.started":"2024-09-12T15:29:06.787414Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","CREATE TABLE user_info (\n"," user_id VARCHAR(50),\n"," sign_up DATETIME,\n"," user_type VARCHAR(50),\n"," email VARCHAR(50),\n"," phone_number VARCHAR(50)\n",");"]},{"attachments":{},"cell_type":"markdown","id":"ffbf1b89-5e63-4044-ac9a-7e6df0481797","metadata":{"language":"sql"},"source":["### Pipeline Creation"]},{"cell_type":"code","execution_count":null,"id":"a0f73a75-4f43-44a9-be87-d0d142e56e62","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:29:08.933916Z","iopub.status.busy":"2024-09-12T15:29:08.933539Z","iopub.status.idle":"2024-09-12T15:29:09.138942Z","shell.execute_reply":"2024-09-12T15:29:09.130620Z","shell.execute_reply.started":"2024-09-12T15:29:08.933886Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","SET @EC2_PUBLIC_IP := \"\""]},{"cell_type":"code","execution_count":null,"id":"fbfaefa6-4582-4e9f-bb1f-f32aa556f561","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:29:37.769111Z","iopub.status.busy":"2024-09-12T15:29:37.768694Z","iopub.status.idle":"2024-09-12T15:29:37.950339Z","shell.execute_reply":"2024-09-12T15:29:37.946700Z","shell.execute_reply.started":"2024-09-12T15:29:37.769071Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","CREATE OR REPLACE PROCEDURE create_pipelines(\n"," EC2_PUBLIC_IP TEXT,\n"," S2_PIPELINE_NAME TEXT,\n"," TOPIC_NAME TEXT,\n"," TABLE_STATEMENT TEXT\n",")\n","AS\n","BEGIN \n"," EXECUTE IMMEDIATE CONCAT(\"CREATE OR REPLACE PIPELINE \", S2_PIPELINE_NAME ,\" AS LOAD DATA KAFKA '\", EC2_PUBLIC_IP, \"/\", TOPIC_NAME, \"' INTO TABLE \", TABLE_STATEMENT, \" FORMAT JSON;\");\n","END;"]},{"cell_type":"code","execution_count":null,"id":"8ed39f15-0813-4fde-831e-c2709563aa88","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:29:39.248850Z","iopub.status.busy":"2024-09-12T15:29:39.247723Z","iopub.status.idle":"2024-09-12T15:29:39.532002Z","shell.execute_reply":"2024-09-12T15:29:39.527369Z","shell.execute_reply.started":"2024-09-12T15:29:39.248793Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","CALL create_pipelines(\n"," @EC2_PUBLIC_IP,\n"," \"vehicle_log_pipeline\",\n"," \"vehicle_topic\", -- change as needed\n"," \"vehicle_log(event_id <- event_id, timestamp <- timestamp, event_type <- event_type, description <- description, related_vehicle_id <- related_vehicle_id, additional_info <- additional_info)\"\n",");"]},{"cell_type":"code","execution_count":null,"id":"c50fa8a7-0b72-49e9-ac17-e4deb21c4ddb","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:29:41.241543Z","iopub.status.busy":"2024-09-12T15:29:41.240928Z","iopub.status.idle":"2024-09-12T15:29:41.475231Z","shell.execute_reply":"2024-09-12T15:29:41.473685Z","shell.execute_reply.started":"2024-09-12T15:29:41.241449Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","CALL create_pipelines(\n"," @EC2_PUBLIC_IP,\n"," \"browser_log_pipeline\",\n"," \"browser_topic\", -- change as needed\n"," \"browser_log (event_id <- event_id, timestamp <- timestamp, event_type <- event_type, page <- page, browser <- browser, metadata <- metadata)\"\n",");"]},{"cell_type":"code","execution_count":null,"id":"126075d3-4626-4276-b485-fc09501cc1e8","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:29:42.865275Z","iopub.status.busy":"2024-09-12T15:29:42.864917Z","iopub.status.idle":"2024-09-12T15:29:43.082795Z","shell.execute_reply":"2024-09-12T15:29:43.080576Z","shell.execute_reply.started":"2024-09-12T15:29:42.865245Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","CALL create_pipelines(\n"," @EC2_PUBLIC_IP,\n"," \"user_info_pipeline\",\n"," \"user_topic\", -- change as needed\n"," \"user_info(user_id <- user_id, sign_up <- sign_up, user_type <- user_type, email <- email, phone_number <- phone_number)\"\n",");"]},{"cell_type":"code","execution_count":null,"id":"ec6f97d3-83d9-402f-a78a-374bd3fcbf8e","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:29:44.342190Z","iopub.status.busy":"2024-09-12T15:29:44.341595Z","iopub.status.idle":"2024-09-12T15:29:44.497077Z","shell.execute_reply":"2024-09-12T15:29:44.496083Z","shell.execute_reply.started":"2024-09-12T15:29:44.342123Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","SHOW PIPELINES;"]},{"cell_type":"code","execution_count":null,"id":"9272ebb2-58f2-40a5-ae94-eefa9e449428","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:29:46.124251Z","iopub.status.busy":"2024-09-12T15:29:46.123183Z","iopub.status.idle":"2024-09-12T15:29:46.297730Z","shell.execute_reply":"2024-09-12T15:29:46.295820Z","shell.execute_reply.started":"2024-09-12T15:29:46.123943Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","START ALL PIPELINES;"]},{"attachments":{},"cell_type":"markdown","id":"47bba54c-7464-4bda-9ef1-a1101fa14002","metadata":{"language":"sql"},"source":["### Verify"]},{"cell_type":"code","execution_count":null,"id":"0b71ff27-f405-4701-bbe0-a722bb101f79","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:29:48.006635Z","iopub.status.busy":"2024-09-12T15:29:48.006225Z","iopub.status.idle":"2024-09-12T15:29:48.312019Z","shell.execute_reply":"2024-09-12T15:29:48.310622Z","shell.execute_reply.started":"2024-09-12T15:29:48.006606Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","SELECT COUNT(*) FROM vehicle_log;"]},{"cell_type":"code","execution_count":null,"id":"15e0ddfc-098f-478c-bdbe-4a6b3e7f587a","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:29:49.970576Z","iopub.status.busy":"2024-09-12T15:29:49.962961Z","iopub.status.idle":"2024-09-12T15:29:50.291547Z","shell.execute_reply":"2024-09-12T15:29:50.286662Z","shell.execute_reply.started":"2024-09-12T15:29:49.970540Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","SELECT * FROM vehicle_log LIMIT 5;"]},{"cell_type":"code","execution_count":null,"id":"f3479d36-1a1f-4dd2-8d8e-e01adbd0774f","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:29:52.124033Z","iopub.status.busy":"2024-09-12T15:29:52.123375Z","iopub.status.idle":"2024-09-12T15:29:52.446672Z","shell.execute_reply":"2024-09-12T15:29:52.445961Z","shell.execute_reply.started":"2024-09-12T15:29:52.123975Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","SELECT COUNT(*) FROM browser_log;"]},{"cell_type":"code","execution_count":null,"id":"e87b66ac-e7b6-4422-aef2-3b9d99eb9fa9","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:29:54.032377Z","iopub.status.busy":"2024-09-12T15:29:54.032034Z","iopub.status.idle":"2024-09-12T15:29:54.280308Z","shell.execute_reply":"2024-09-12T15:29:54.279426Z","shell.execute_reply.started":"2024-09-12T15:29:54.032350Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","SELECT * FROM browser_log LIMIT 5;"]},{"cell_type":"code","execution_count":null,"id":"724c2b20-6329-4e16-8df5-10ea51f26bfc","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:29:55.825242Z","iopub.status.busy":"2024-09-12T15:29:55.824909Z","iopub.status.idle":"2024-09-12T15:29:56.161967Z","shell.execute_reply":"2024-09-12T15:29:56.145878Z","shell.execute_reply.started":"2024-09-12T15:29:55.825212Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","SELECT COUNT(*) FROM user_info;"]},{"cell_type":"code","execution_count":null,"id":"a1180200-59d0-47db-be5d-0063456ccbaa","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:29:57.414518Z","iopub.status.busy":"2024-09-12T15:29:57.407290Z","iopub.status.idle":"2024-09-12T15:29:57.742515Z","shell.execute_reply":"2024-09-12T15:29:57.733711Z","shell.execute_reply.started":"2024-09-12T15:29:57.414482Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","SELECT * FROM user_info LIMIT 5;"]},{"attachments":{},"cell_type":"markdown","id":"86767fd0-ea3e-4a7b-b6a9-4d7966406ecc","metadata":{"language":"sql"},"source":["### Cleanup"]},{"cell_type":"code","execution_count":null,"id":"ed0e6fc7-c8c1-4893-9ca8-da7a9cc566aa","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:30:12.493594Z","iopub.status.busy":"2024-09-12T15:30:12.492925Z","iopub.status.idle":"2024-09-12T15:30:12.648574Z","shell.execute_reply":"2024-09-12T15:30:12.647686Z","shell.execute_reply.started":"2024-09-12T15:30:12.493553Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","STOP ALL PIPELINES;"]},{"cell_type":"code","execution_count":null,"id":"1f87d98b-2ab7-46ac-bd66-2770ec07602e","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:30:13.917835Z","iopub.status.busy":"2024-09-12T15:30:13.917464Z","iopub.status.idle":"2024-09-12T15:30:16.170446Z","shell.execute_reply":"2024-09-12T15:30:16.166023Z","shell.execute_reply.started":"2024-09-12T15:30:13.917805Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","DROP DATABASE ec2_kafka;"]}],"metadata":{"jupyterlab":{"notebooks":{"version_major":6,"version_minor":4}},"kernelspec":{"display_name":"Python 3 (ipykernel)","language":"python","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.11.6"},"singlestore_cell_default_language":"sql","singlestore_connection":{"connectionID":"eabe1cba-2dbd-4e05-915f-10dc1d7cebd5","defaultDatabase":""},"singlestore_row_limit":300},"nbformat":4,"nbformat_minor":5} +{"cells":[{"attachments":{},"cell_type":"markdown","id":"d9aec522-eb90-4c3d-8857-e4c2b3404d6a","metadata":{"language":"sql"},"source":["# EC2 Kafka + SingleStore Ingestion"]},{"attachments":{},"cell_type":"markdown","id":"8b95e2cd-979a-4048-a7d6-6e65c7539244","metadata":{"language":"sql"},"source":["### Database Configuration"]},{"cell_type":"code","execution_count":null,"id":"1050e92f-06a4-4a15-86fd-5e5cb3e654f2","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:28:50.484025Z","iopub.status.busy":"2024-09-12T15:28:50.479839Z","iopub.status.idle":"2024-09-12T15:29:00.691213Z","shell.execute_reply":"2024-09-12T15:29:00.686049Z","shell.execute_reply.started":"2024-09-12T15:28:50.483957Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","CREATE DATABASE IF NOT EXISTS ec2_kafka;"]},{"cell_type":"code","execution_count":null,"id":"c3b47c15-14e5-407e-ae12-e5d0f466c7ea","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:29:02.170503Z","iopub.status.busy":"2024-09-12T15:29:02.164359Z","iopub.status.idle":"2024-09-12T15:29:02.336865Z","shell.execute_reply":"2024-09-12T15:29:02.323518Z","shell.execute_reply.started":"2024-09-12T15:29:02.170452Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","USE ec2_kafka;"]},{"attachments":{},"cell_type":"markdown","id":"98fc0e53-8b8c-4a4c-b9e0-b1a8abc1665d","metadata":{"language":"sql"},"source":["### Table Creation"]},{"cell_type":"code","execution_count":null,"id":"c08be15a-46b4-4ab1-81ac-cb1e63b76bf4","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:29:03.676929Z","iopub.status.busy":"2024-09-12T15:29:03.675729Z","iopub.status.idle":"2024-09-12T15:29:03.970963Z","shell.execute_reply":"2024-09-12T15:29:03.966534Z","shell.execute_reply.started":"2024-09-12T15:29:03.676863Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","CREATE TABLE vehicle_log (\n"," event_id VARCHAR(50), \n"," timestamp DATETIME,\n"," event_type VARCHAR(50),\n"," description VARCHAR(50),\n"," related_vehicle_id VARCHAR(50),\n"," additional_info JSON\n",");\n","\n","CREATE TABLE browser_log (\n"," event_id VARCHAR(50),\n"," timestamp DATETIME,\n"," event_type VARCHAR(50),\n"," page VARCHAR(50),\n"," browser VARCHAR(50),\n"," metadata JSON\n",");\n","\n","CREATE TABLE user_info (\n"," user_id VARCHAR(50),\n"," sign_up DATETIME,\n"," user_type VARCHAR(50),\n"," email VARCHAR(50),\n"," phone_number VARCHAR(50)\n",");"]},{"attachments":{},"cell_type":"markdown","id":"ffbf1b89-5e63-4044-ac9a-7e6df0481797","metadata":{"language":"sql"},"source":["### Pipeline Creation"]},{"cell_type":"code","execution_count":null,"id":"a82e1c20","metadata":{},"outputs":[],"source":["%%sql\n","-- Table for procedure\n","CREATE TABLE pipeline_config_table (\n"," pipeline_name TEXT,\n"," topic_name TEXT,\n"," table_statement TEXT\n",");"]},{"cell_type":"code","execution_count":null,"id":"a0f73a75-4f43-44a9-be87-d0d142e56e62","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:29:08.933916Z","iopub.status.busy":"2024-09-12T15:29:08.933539Z","iopub.status.idle":"2024-09-12T15:29:09.138942Z","shell.execute_reply":"2024-09-12T15:29:09.130620Z","shell.execute_reply.started":"2024-09-12T15:29:08.933886Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","-- Main procedure to connect with Confluent server\n","CREATE OR REPLACE PROCEDURE call_create_pipelines_from_table() AS\n","DECLARE\n"," KAFKA_SERVER TEXT = '';\n"," pipeline_data QUERY(pipeline_name TEXT, topic_name TEXT, table_statement TEXT) = \n"," SELECT pipeline_name, topic_name, table_statement \n"," FROM pipeline_config_table;\n","BEGIN\n"," FOR x IN COLLECT(pipeline_data) LOOP\n"," CALL create_pipelines(KAFKA_SERVER, x.pipeline_name, x.topic_name, x.table_statement);\n"," END LOOP;\n","END"]},{"cell_type":"code","execution_count":null,"id":"fbfaefa6-4582-4e9f-bb1f-f32aa556f561","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:29:37.769111Z","iopub.status.busy":"2024-09-12T15:29:37.768694Z","iopub.status.idle":"2024-09-12T15:29:37.950339Z","shell.execute_reply":"2024-09-12T15:29:37.946700Z","shell.execute_reply.started":"2024-09-12T15:29:37.769071Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","CREATE OR REPLACE PROCEDURE create_pipelines(\n"," EC2_PUBLIC_IP TEXT,\n"," S2_PIPELINE_NAME TEXT,\n"," TOPIC_NAME TEXT,\n"," TABLE_STATEMENT TEXT\n",")\n","AS\n","BEGIN \n"," EXECUTE IMMEDIATE CONCAT(\"CREATE OR REPLACE PIPELINE \", S2_PIPELINE_NAME ,\" AS LOAD DATA KAFKA '\", EC2_PUBLIC_IP, \"/\", TOPIC_NAME, \"' INTO TABLE \", TABLE_STATEMENT, \" FORMAT JSON;\");\n","END;"]},{"cell_type":"code","execution_count":null,"id":"8a039a8b","metadata":{},"outputs":[],"source":["-- Paste INSERT statements if schema mapping used\n","NSERT INTO pipeline_config_table VALUES('vehicle_log_pipeline', 'vehicle_topic', 'vehicle_log(event_id <- event_id, timestamp <- timestamp, event_type <- event_type, description <- description, related_vehicle_id <- related_vehicle_id, additional_info <- additional_info)'),('browser_log_pipeline', 'browser_topic', 'browser_log (event_id <- event_id, timestamp <- timestamp, event_type <- event_type, page <- page, browser <- browser, metadata <- metadata)'),('user_info_pipeline', 'user_topic', 'user_info(user_id <- user_id, sign_up <- sign_up, user_type <- user_type, email <- email, phone_number <- phone_number)')"]},{"cell_type":"code","execution_count":null,"id":"d01ff02b","metadata":{},"outputs":[],"source":["%%sql\n","-- Looking at the pipeline_config_table\n","SELECT * FROM pipeline_config_table LIMIT 5;"]},{"cell_type":"code","execution_count":null,"id":"cd985a74","metadata":{},"outputs":[],"source":["%%sql\n","-- Provisions all the pipelines\n","CALL call_create_pipelines_from_table();"]},{"cell_type":"code","execution_count":null,"id":"ec6f97d3-83d9-402f-a78a-374bd3fcbf8e","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:29:44.342190Z","iopub.status.busy":"2024-09-12T15:29:44.341595Z","iopub.status.idle":"2024-09-12T15:29:44.497077Z","shell.execute_reply":"2024-09-12T15:29:44.496083Z","shell.execute_reply.started":"2024-09-12T15:29:44.342123Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","SHOW PIPELINES;"]},{"cell_type":"code","execution_count":null,"id":"9272ebb2-58f2-40a5-ae94-eefa9e449428","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:29:46.124251Z","iopub.status.busy":"2024-09-12T15:29:46.123183Z","iopub.status.idle":"2024-09-12T15:29:46.297730Z","shell.execute_reply":"2024-09-12T15:29:46.295820Z","shell.execute_reply.started":"2024-09-12T15:29:46.123943Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","START ALL PIPELINES;"]},{"attachments":{},"cell_type":"markdown","id":"47bba54c-7464-4bda-9ef1-a1101fa14002","metadata":{"language":"sql"},"source":["### Verify"]},{"cell_type":"code","execution_count":null,"id":"0b71ff27-f405-4701-bbe0-a722bb101f79","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:29:48.006635Z","iopub.status.busy":"2024-09-12T15:29:48.006225Z","iopub.status.idle":"2024-09-12T15:29:48.312019Z","shell.execute_reply":"2024-09-12T15:29:48.310622Z","shell.execute_reply.started":"2024-09-12T15:29:48.006606Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","SELECT COUNT(*) FROM vehicle_log;"]},{"cell_type":"code","execution_count":null,"id":"15e0ddfc-098f-478c-bdbe-4a6b3e7f587a","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:29:49.970576Z","iopub.status.busy":"2024-09-12T15:29:49.962961Z","iopub.status.idle":"2024-09-12T15:29:50.291547Z","shell.execute_reply":"2024-09-12T15:29:50.286662Z","shell.execute_reply.started":"2024-09-12T15:29:49.970540Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","SELECT * FROM vehicle_log LIMIT 5;"]},{"cell_type":"code","execution_count":null,"id":"724c2b20-6329-4e16-8df5-10ea51f26bfc","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:29:55.825242Z","iopub.status.busy":"2024-09-12T15:29:55.824909Z","iopub.status.idle":"2024-09-12T15:29:56.161967Z","shell.execute_reply":"2024-09-12T15:29:56.145878Z","shell.execute_reply.started":"2024-09-12T15:29:55.825212Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","-- Check for errors\n","SELECT DATABASE_NAME, PIPELINE_NAME, BATCH_ID, PARTITION, BATCH_SOURCE_PARTITION_ID,\n"," ERROR_KIND, ERROR_CODE, ERROR_MESSAGE, LOAD_DATA_LINE_NUMBER, LOAD_DATA_LINE\n","FROM information_schema.PIPELINES_ERRORS;"]},{"cell_type":"code","execution_count":null,"id":"a1180200-59d0-47db-be5d-0063456ccbaa","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:29:57.414518Z","iopub.status.busy":"2024-09-12T15:29:57.407290Z","iopub.status.idle":"2024-09-12T15:29:57.742515Z","shell.execute_reply":"2024-09-12T15:29:57.733711Z","shell.execute_reply.started":"2024-09-12T15:29:57.414482Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","-- Checking for pipeline errors\n","SELECT * FROM information_schema.PIPELINES_BATCHES WHERE BATCH_PARTITION_STATE=\"Failed\";"]},{"attachments":{},"cell_type":"markdown","id":"86767fd0-ea3e-4a7b-b6a9-4d7966406ecc","metadata":{"language":"sql"},"source":["### Cleanup"]},{"cell_type":"code","execution_count":null,"id":"ed0e6fc7-c8c1-4893-9ca8-da7a9cc566aa","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:30:12.493594Z","iopub.status.busy":"2024-09-12T15:30:12.492925Z","iopub.status.idle":"2024-09-12T15:30:12.648574Z","shell.execute_reply":"2024-09-12T15:30:12.647686Z","shell.execute_reply.started":"2024-09-12T15:30:12.493553Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","STOP ALL PIPELINES;"]},{"cell_type":"code","execution_count":null,"id":"1f87d98b-2ab7-46ac-bd66-2770ec07602e","metadata":{"collapsed":true,"execution":{"iopub.execute_input":"2024-09-12T15:30:13.917835Z","iopub.status.busy":"2024-09-12T15:30:13.917464Z","iopub.status.idle":"2024-09-12T15:30:16.170446Z","shell.execute_reply":"2024-09-12T15:30:16.166023Z","shell.execute_reply.started":"2024-09-12T15:30:13.917805Z"},"jupyter":{"outputs_hidden":true},"language":"sql","trusted":true},"outputs":[],"source":["%%sql\n","DROP DATABASE ec2_kafka;"]}],"metadata":{"jupyterlab":{"notebooks":{"version_major":6,"version_minor":4}},"kernelspec":{"display_name":"Python 3 (ipykernel)","language":"python","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.11.6"},"singlestore_cell_default_language":"sql","singlestore_connection":{"connectionID":"eabe1cba-2dbd-4e05-915f-10dc1d7cebd5","defaultDatabase":""},"singlestore_row_limit":300},"nbformat":4,"nbformat_minor":5} diff --git a/testing/stream_kafka.py b/testing/stream_kafka.py index a3b3fb1..34ea423 100644 --- a/testing/stream_kafka.py +++ b/testing/stream_kafka.py @@ -37,10 +37,9 @@ def produce_event_logs_to_kafka(num_records, topic_name, dataset_num): event_logs = main_generation(num_records, dataset_num) for log in event_logs: producer.produce(topic_name, value=json.dumps(log)) - producer.poll(0) # Polls the producer for message delivery events + producer.poll(0) time.sleep(0.0001) # Adjust this value as needed print(f"Sent: {log}") - # Wait up to 5 seconds for messages to be sent producer.flush(timeout=5) From 0aff53defdcb8ed50f69383cd39e92f3ffe246e1 Mon Sep 17 00:00:00 2001 From: Kevin Tran Date: Tue, 15 Oct 2024 08:32:28 -0700 Subject: [PATCH 13/15] docs: updated docs --- README.md | 16 ++--- features.md | 6 +- iac-ec2-kafka.drawio | 157 ++++++++++++++++++++++++++++--------------- 3 files changed, 116 insertions(+), 63 deletions(-) diff --git a/README.md b/README.md index 0436a02..bf85df0 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,11 @@ Deploy an EC2 kafka instance programmatically using terraform. The EC2 instance ### Input Variables -Set your AWS account using `aws configure`. Retrieve the output IP addresses from 1/ your provisioned SingleStore workspace cluster and 2/ any other IP addresses you would like Kafka to connect with. Run the following command to populate your environment variables: +Set your AWS account using `aws configure`. Retrieve the output IP addresses from 1/ your provisioned SingleStore workspace cluster and 2/ any other IP addresses you would like Kafka to connect with. + +If you'd like to map sample MySQL data create a `schema-mapping/mysql-schema.sql` containing the table. + +Then, run the following command to populate your environment variables: ```bash bash scripts/var_gen.sh @@ -35,14 +39,6 @@ Run the following command to build and deploy the application. This script takes bash scripts/deploy.sh ``` -## Mapping MySQL Tables to SingleStore - -Input sample tables into the `schema-mapping/mysql-schema.sql` file. Run the following script. - -```bash -python schema-mapping/map-data.py -``` - ### Data Ingestion into Kafka Run the following commands to load data into the Kafka EC2 instance. The script populates one of the kafka topics with a dataset listed in `testing/data/data.yaml`: @@ -67,6 +63,8 @@ streaming: dataset: user_data ``` +Note: creating `schema-mapping/mysql-schema.sql` will automatically create this when you ran the `var_gen.sh` script. + ### SingleStore Ingestion Load the notebook `testing/ec2-kafka-s2-notebook.ipynb` into SingleStore Helios. diff --git a/features.md b/features.md index 97e805e..1ab8658 100644 --- a/features.md +++ b/features.md @@ -2,10 +2,14 @@ In Progress: -- feat - vish: can add connection details into notebook and make it work from local +- feat: combining load_data.yaml with data.yaml +- feat: substituting EC2_PUBLIC_IP on deploy in notebook +- feat: mysql schema mapping included with var_gen.sh **Future scope:** +- feat: Terraform provider for Confluent Kafka +- feat: can add connection details into notebook and make it work from local - feat: add in dictionary representation to include tagging / description for IP addresses - feat: let user pass the table ddl which could be used to generate custom data gen function that could be passed to a streaming script to stream data to created kafka topic - Feat: stopping and starting an instance diff --git a/iac-ec2-kafka.drawio b/iac-ec2-kafka.drawio index 901d3f5..9923b00 100644 --- a/iac-ec2-kafka.drawio +++ b/iac-ec2-kafka.drawio @@ -1,89 +1,140 @@ - + - + - - + + - - - - - - - + - + - - + + - - + + - - + + - - - - - - - + + + + + + + - - + + - - + + - - + + - + - + - - - - - - - - - - - + + - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + - - + + From 8dcc3ae6c2549c53ea2f756f2073df5addf1d976 Mon Sep 17 00:00:00 2001 From: Kevin Tran Date: Thu, 31 Oct 2024 13:58:50 -0700 Subject: [PATCH 14/15] bug: max value when adding in new data --- testing/data/generate_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/data/generate_data.py b/testing/data/generate_data.py index 243f5f3..1cf720f 100644 --- a/testing/data/generate_data.py +++ b/testing/data/generate_data.py @@ -24,7 +24,7 @@ def prompt_options(options): while True: try: choice = int(input("Enter the number corresponding to your choice (eg, 1): ")) - if 1 <= choice <= 3: + if 1 <= choice <= len(options): print(f"You chose: {options[choice - 1]}") return options[choice - 1] else: From 7fc37e433093b7b85f8bd9d745ad208cc10e1c7e Mon Sep 17 00:00:00 2001 From: Kevin Tran Date: Thu, 31 Oct 2024 16:59:15 -0700 Subject: [PATCH 15/15] chore: removed excess variable --- scripts/var_gen.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/var_gen.sh b/scripts/var_gen.sh index d9f3775..f9ba943 100755 --- a/scripts/var_gen.sh +++ b/scripts/var_gen.sh @@ -63,7 +63,6 @@ fi # Write the variables to the output script cat < $SCRIPT_DIR/output_vars.sh #!/bin/bash -export TF_VAR_singlestore_api_key="$TF_VAR_singlestore_api_key" export AWS_REGION="$AWS_REGION" export IP_LIST='$IP_LIST' export MY_IP="$MY_IP"