-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_db.py
46 lines (41 loc) · 828 Bytes
/
create_db.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import sqlite3
conn = sqlite3.connect('dalton.db')
cursor = conn.cursor()
sql = '''
CREATE TABLE IF NOT EXISTS StudentInfo11 (
student_id TEXT PRIMARY KEY,
student_name TEXT,
roll_no INTEGER,
stream TEXT,
phone_numbers INTEGER,
academic_year_from INTEGER,
academic_year_to INTEGER
)
'''
cursor.execute(sql)
conn.commit()
sql = '''
CREATE TABLE IF NOT EXISTS StudentInfo12 (
student_id TEXT PRIMARY KEY,
student_name TEXT,
roll_no INTEGER,
stream TEXT,
phone_numbers INTEGER,
academic_year_from INTEGER,
academic_year_to INTEGER
)
'''
cursor.execute(sql)
conn.commit()
sql = '''
CREATE TABLE IF NOT EXISTS dailyAttendance (
date TEXT,
class INTEGER,
stream TEXT,
present TEXT,
absent TEXT
)
'''
cursor.execute(sql)
conn.commit()
conn.close()