Skip to content
Snippets Groups Projects
Verified Commit 7939c45c authored by jonahbeneb02's avatar jonahbeneb02
Browse files

Add assets

parent f8706749
No related branches found
No related tags found
No related merge requests found
*.aux
*.log
*.out
*.synctex*
2PL.pdf 0 → 100644
File added
ER-Beispiel.png

126 KiB

ER-Beispiel_2.png

114 KiB

ER-Modell.jpg

43.9 KiB

evaluation.png

478 B

import psycopg2
# Connect to your postgres DB
conn = psycopg2.connect("dbname=dbs_project user=jonah")
# Open a cursor to perform database operations
cur = conn.cursor()
# Execute a query
cur.execute("SELECT TRUE")
# Retrieve query results
records = cur.fetchall()
print("Sucess!")
tut5.cpp 0 → 100644
#include <sqlite3.h>
#include <stdio.h>
int main() {
sqlite3 *db;
sqlite3_stmt *query;
int rc = sqlite3_open("test.sqlite", &db);
rc = sqlite3_prepare_v2(db, "SELECT SQLITE_VERSION()", -1, &query, 0);
rc = sqlite3_step(query);
if (rc == SQLITE_ROW) {
printf("%s\n", sqlite3_column_text(query, 0));
}
rc = sqlite3_prepare_v2(db, "SELECT 1", -1, &query, 0);
rc = sqlite3_step(query);
if (rc == SQLITE_ROW) {
printf("%s\n", sqlite3_column_text(query, 0));
}
sqlite3_finalize(query);
sqlite3_close(db);
return 0;
}
tut5.py 0 → 100755
#!/usr/bin/env python3
import sqlite3
if __name__ == "__main__":
conn = sqlite3.connect('test.py.sqlite')
cur = conn.cursor()
cur.execute("CREATE TABLE IF NOT EXISTS test (id INTEGER PRIMARY KEY, str TEXT)")
cur.execute("INSERT INTO test (str) VALUES (?)", ("test string",))
cur.execute("INSERT INTO test (id, str) VALUES (?,?)", (3, "test string"))
cursor = conn.execute("SELECT * from test")
for row in cursor:
print("id:", row[0])
print("str:", row[1])
print("-----")
conn.close()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment