1. Trang chủ
  2. » Công Nghệ Thông Tin

Quản lý điểm sinh viên

17 516 2

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Mục lục 1. Mô tả chức năng hệ thống Hệ thống quản lý điểm học sinh trung học phổ thông có hai chức năng chính là quản lý điểm của học sinh và quản lý hồ sơ của học sinh. Trong chức năng quản lý điểm học sinh, hệ thống có khả năng tính điểm trung bình của học sinh trong từng môn học cũng như điểm tổng kết cuối mỗi kỳ, tìm kiếm, thống kê học sinh đạt khá, giỏi…. học sinh có hạnh kiểm khá, tốt… 2. Thiết kế cơ sở dữ liệu 1. Bảng HoSo.HoSoHS Colum Name Description Datatype Length Allow Null MaHS Primary key int Identity(1,1) Not null HoTen HoTen Not null NgaySinh datetime Not null NoiSinh DiaChi Not null QueQuan DiaChi Not null NoiThuongTru DiaChi Not null GT Flag Not null DanToc Nvarchar 20 Not null TonGiao Nvarchar 20 Not null DoiTuong Nvarchar 30 Not null 2. Bảng HoSo.HoSoHS Colum Name Description Datatype Length Allow Null MaGV Khóa chính int Identity(1,1) Not null HoTen HoTen Not Null NgaySinh datetime Not Null NoiSinh DiaChi Not null QueQuan DiaChi Not Null NoiThuongTr u DiaChi Not Null GT flag Not null DanToc nvarchar 20 Not null TonGiao nvarchar 20 Not null MaNQL Tự quan hệ int null 3. Bảng CoCauToChuc.Khoa Colum name description Datatype length Allow null MaKhoa Primary key nchar Identity Not null TenKhoa Nvarchar 50 Not Null TruongKhoa Nvarchar 50 Not Null 4. Bảng CoCauToChuc.BoMon Colum name description Datatype length Allow null MaBM Primary key int Identity Not null TenBM Nvarchar 20 Not Null CNBM Nvarchar Not Null MaKhoa Khóa ngoại tham chiếu đến bảng Khoa Nchar 50 Not Null 5. Bảng CoCauToChuc.Lop Colum Name Description Datatype Length Allow Null MaLop Primary key Char Not null TenLop Varchar 10 Not Null MaKhoa Nchar 10 Not Null NamVaoTruon g int Not Null SySo int Not Null MaLopTruong Khóa ngoại tham chiếu đến bảng HoSoHS int Null 6. Bảng CoCauToChuc.SinhVienLop Colum name description datatype length Allow null MaSV Primary key Int Not null MaLop Khóa ngoại tham chiếu đến bảng Lop int Not null 7. Bảng CoCauToChuc.GiaoVien_BoMon Colum name description Datatype length Allow null MaGiaoVien Primary key int Identity Not null MaBoMon Khóa ngoại tham chiếu đến bảng BoMon int Not Null ChucVu Nvarchar Not Null ThoiGianNhamChu c datetime Not Null 8. Bảng Diem.Diem_SV Colum name description Datatype length Allow null MaSV Khóa chính int Not null MaMonHoc Khóa chính int Not null DiemThiLan1 Diem Not Null DiemThiLan2 Diem Not Null DiemCT Diem Not Null HocKy int Not Null NamHoc nvarchar Not Null 9. Bảng Diem.MonHoc Colum name description Datatype length Allow null MaMonHoc Khóa chính nchar(10) Not null TenMonHoc nvarchar(50) Not Null MaBoMon Khóa ngoại tham chiếu đến bảng BoMon int Not Null SoDVHT real Not Null 10.Bảng Diem.HocKy Colum name description datatype length Allow null NamHoc nvarchar Not null HocKy Int Not Null 11.Bảng Diem.PhanDauPhieuDiem Colum name description datatype length Allow null ChiTietPhieuDie m Khóa chính int Not null MaSV Khóa ngoại tham chiếu đến bảng HoSoSV nvarchar 10 Not null HocKy int Not Null NamHoc nvarchar Not Null DiemTB DiemTB:decimal(4,1 ) Not Null 12.Bảng Diem.DongPD Colum name description datatype length Allow null ChiTietPD Khóa ngoại tham chiếu đến bảng PhanDauPhieuDie m int Not null MaMonHoc nchar(10) 10 Not null Diem Diem:int 3 Not null 13. Bảng QuiDinh.HocLuc Colum name description datatype length Allow null DiemTB DiemTB:decimal(4, 1) Not null HocLuc nvarchar 50 Not null MaHocKy int 3 Not null NamHoc nvarchar (50) Not null [...]... USE [QuanLySinhVien] GO CREATE ROLE [Diem] GO USE [QuanLySinhVien] GO ALTER AUTHORIZATION ON SCHEMA::[Diem] TO [Diem] GO 5.2 User Kịch bản USE [QuanLySinhVien] GO CREATE USER [QTDiem] FOR LOGIN [QTDiem] GO USE [QuanLySinhVien] GO ALTER AUTHORIZATION ON SCHEMA::[Diem] TO [QTDiem] GO USE [QuanLySinhVien] GO EXEC sp_addrolemember N'Diem', N'QTDiem' GO 5.3 Cấp quyền cho User Kịch bản: use [QuanLySinhVien]... [QuanLySinhVien] GO GRANT SELECT ON SCHEMA::[HoSo] TO [QTDiem] GO use [QuanLySinhVien] GO GRANT SELECT ON SCHEMA::[QuyDinh] TO [QTDiem] GO 6 Mã nguồn một số hàm, thủ tục, trigger,view 6.1 Hàm create FUNCTION [Diem].[SoKha] (@Lop int, @hocky int, @namhoc nvarchar(50)) RETURNS INT AS BEGIN DECLARE @So INT; set @So = (SELECT COUNT(diem.phandauphieudiem.masv) FROM Diem.phandauphieudiem,CoCauToChuc.sinhvienlop... COUNT(*) FROM Diem.PhanDauPhieuDiem WHERE Diem.PhanDauPhieuDiem.DiemTB >=8.0 AND Diem.PhanDauPhieuDiem.MaHocKy = @HK AND Diem.PhanDauPhieuDiem.NamHoc = @NamHoc; END 6.3 Trigger Trigger Cập nhật điểm chính thức của sinh viên create trigger [DiemCT] on [Diem].[Diem_SV] for insert,update AS begin declare @DiemCT int,@MaSV int, @MaMonHoc nchar(10); Set @MaSV=(select MaSV from inserted ); Set @MaMonHoc=(select... inserted); else Set @DiemCT=(select inserted.Diem2 from inserted); update Diem.Diem_SV Set DiemCT=@DiemCT where Diem.Diem_SV.MaSV=@MaSV and Diem.Diem_SV.MaMonHoc=@MaMonHoc end Trigger tính điểm trung bình của sinh viên trong 1 học kỳ của 1 năm học create trigger [DiemTB2] on [Diem].[PhanDauPhieuDiem] for update,insert AS declare @MaSV INT, @HocKy INT, @NamHoc NVARCHAR(50), @DiemTB DECIMAL(4,1), @Diem... DECLARE @So INT; set @So = (SELECT COUNT(diem.phandauphieudiem.masv) FROM Diem.phandauphieudiem,CoCauToChuc.sinhvienlop WHERE diem.phandauphieudiem.masv=cocautochuc.sinhvienlop.masv AND diem.phandauphieudiem.diemtb>=7.0 AND cocautochuc.sinhvienlop.malop= @Lop AND diem.phandauphieudiem.mahocky = @hocky AND diem.phandauphieudiem.namhoc=@namhoc); RETURN @So; END DECLARE @So INT; SET @So = Diem.SoKha('1,1,2010-2011')... diem.diem_sv.diemCT=8 go select * from diem.diem_SV8 Kết luận Qua thời gian thực hiện đồ án chúng em đã đạt được một số vấn đề sau Đã thiết kế được cơ sở dữ liệu cho hệ thống, tạo được một số hàm, thủ tục, quản trị được cơ sở dữ liệu dựa theo các người sử dụng Tuy nhiên cho thời gian thực hiện đồ án ngắn do vậy đồ án vẫn còn một số hạn chế nhất định Số lượng hàm, thủ tục còn ít và đơn giản, thống kê, báo

Ngày đăng: 23/10/2014, 22:49

Xem thêm: Quản lý điểm sinh viên

TỪ KHÓA LIÊN QUAN

Mục lục

    1. Mô tả chức năng hệ thống

    2. Thiết kế cơ sở dữ liệu

    3. Mô tả các thủ tục, hàm và triggers

    4. Quản trị cơ sở dữ liệu

    4.1 Tạo role theo mẫu: (xong)

    4.2 Tạo user theo mẫu:

    5.Cấp quyền cho Role, User sử dụng giao diện

    6. Mã nguồn một số hàm, thủ tục, trigger,view

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w