Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update database #15

Merged
merged 1 commit into from
Mar 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions database
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Step 1: Define Entities and Relationships

# Example: Define entities and their relationships
class User:
def __init__(self, user_id, username, email):
self.user_id = user_id
self.username = username
self.email = email

class Course:
def __init__(self, course_id, title, description):
self.course_id = course_id
self.title = title
self.description = description

# Step 2: Design Entity-Relationship Diagram (ERD)
# Example: Visualize entities and relationships using a diagramming tool

# Step 3: Define Database Tables

# Example: Define database tables using SQL
CREATE TABLE users (
user_id SERIAL PRIMARY KEY,
username VARCHAR(50) UNIQUE NOT NULL,
email VARCHAR(100) UNIQUE NOT NULL
);

CREATE TABLE courses (
course_id SERIAL PRIMARY KEY,
title VARCHAR(100) NOT NULL,
description TEXT
);

# Step 4: Implement Schema in Database Management System (DBMS)
# Example: Execute SQL statements to create tables in PostgreSQL

# Step 5: Test Schema
# Example: Populate database with sample data and perform tests to ensure functionality

# Step 6: Integrate Schema into Software

# Example: Connect to the database using an ORM like SQLAlchemy and define models
from