Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How to establish the database of student achievement management system with SQL?
How to establish the database of student achievement management system with SQL?
First, use enterprise manager or wizard to create a database in SQL, name it Student Management System, start SQL Sever service, run enterprise manager, click the plus icon on the left side of the server to create a database, expand the tree directory, right-click the "Database" node, select the "New Database" command in the pop-up shortcut menu, and then follow the prompts to create a database step by step, without going into details. Suppose there are three tables under the student management system, namely, student table, curriculum and curriculum. The structure of the table is as follows: student table (sno universal coding fixed-length character type, length 7, main code, sname universal coding fixed-length character type, length 8, non-empty, gender (ssex) universal coding fixed-length character type and length. Department (sdept) unified coding variable-length character type, length 20) curriculum (course number (cno) commonly used coding fixed-length character type, length 6, subject code, course name (cname) unified coding fixed-length character type, length 10, non-empty, small integer for credits, small integer for semester) curriculum schedule (sc) (student number (cno) Commonly used coding fixed-length character type, length 6, main code and foreign code grade small Length 4) The statements for creating tables are: create table student (snochar (7) primary key, snamechar (8) not null, ssexchar (1), sage tinyint, Sdept nvarchar(20))create table Course(Cno char(6)primary key,Cname nchar( 10) not null,Credit smallint, Semesh smallint) create table sc (snochar (7), Cno char(6), Grade smallint, Type char(4), primary key(Sno, Sno) databases and tables are basically established, and then students' specific data can be added to the database through data import or SQL statements.

SQL language is short for structured query language. SQL language is a database query and programming language, which is used to access data and query, update and manage relational database systems. It is also an extension of the database script file.