| |

VerySource

 Forgot password?
 Register
Search
View: 743|Reply: 6

Seeking database design, classes, student questions, online, etc.

[Copy link]

2

Threads

8

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-2-11 19:30:02
| Show all posts |Read mode
If there is a school with several classes, the number of students in each class is different from the student name
How to do database table design
How about the following design?
1, classTable table
   ID studentID ClassName
    Class 1, 1, 3, 5
    Class 2, 2, 4, 6, 7
.........


2, studentTable table
   ID studentName
   Few photos
   2 Guo Jing
   3 Wei packet
   4 Aaron Kwok
.........

Is there a better design? Solve online!
Reply

Use magic Report

0

Threads

35

Posts

22.00

Credits

Newbie

Rank: 1

Credits
22.00

 China

Post time: 2020-4-7 16:30:01
| Show all posts
studentTable
   ID studentName class
   1 sheet only
   2 Guo Jing High School Class 1
   3 Wei Xiaobao High School Class 1
   4 Guo Fucheng High School Class 1
Reply

Use magic Report

0

Threads

211

Posts

108.00

Credits

Newbie

Rank: 1

Credits
108.00

 China

Post time: 2020-4-7 19:30:01
| Show all posts
Class table
Student table
Class relationship table
Reply

Use magic Report

2

Threads

8

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

 Author| Post time: 2020-4-7 22:15:01
| Show all posts
The method ofsinexesinexeseems to be very good, how can I not think of it, huh, huh
Reply

Use magic Report

2

Threads

8

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

 Author| Post time: 2020-4-8 01:30:02
| Show all posts
fanfan1980
Ask, what is the specific implementation of your method?
Reply

Use magic Report

0

Threads

211

Posts

108.00

Credits

Newbie

Rank: 1

Credits
108.00

 China

Post time: 2020-4-8 11:30:02
| Show all posts
Class table
classID ClassName

Student table
studentID studentName

Class relationship table
classID studentID Flag (whether the flag is valid, so you can check the history)
Reply

Use magic Report

2

Threads

8

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

 Author| Post time: 2020-4-8 16:45:01
| Show all posts
Thank you ~~
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list