x

SQL doubts. Kindly help me to solve this.

Kindly help me solve this SQL:-

University “A” has decided that a new database system is needed for reporting students’ grades. • Students at this university are identified by their student ID, and the database system should store their names and major area of study. • Units in a degree course are identified by the Unit ID. • For each unit within a degree course, the database system (DB) should capture the unit title, unit location of offer and the name of the instructor. The database system should therefore store the grade for each student studying every unit in the degree course.

Question 1: Describe the elements of the table of this database system.

Question 2: Draw the Entity Relationship Diagram (ERD) of the generated tables.

Question 3: Write the SQL code to create the tables.

more ▼

asked Jan 04 at 02:50 PM in Default

avatar image

SQL.queries
1

What have you tried so far?

Jan 04 at 02:50 PM ThomasRushton ♦♦

I'm not able to start with it.

Jan 04 at 11:30 PM SQL.queries
(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

create table tbl_Major ( MajorID int not null Primary key, MajorName varchar(500)

) create table tbl_DegreeCourse ( DegreeCourseID int not null Primary key, DegreeCourse varchar(500) )

create table tbl_DegreeCourse_Major (

 DegreeCourse_MajorID        int not null Primary key,
 DegreeCourseID                int not null foreign key references tbl_DegreeCourse(DegreeCourseID),
 MajorID                        int not null foreign key references tbl_Major(MajorID)

)

create table tbl_Unit ( UnitID int not null Primary key, DegreeCourse_MajorID int not null foreign key references tbl_DegreeCourse_Major(DegreeCourse_MajorID), UnitTitle varchar(500), UnitLocation varchar(500), InstructorName varchar(500) )

create table tbl_Grade ( GradeID int not null Primary key, GradeName varchar(500)

) create table tbl_Student ( StudentID int not null Primary key, StudentName varchar(500), GradeID int not null foreign key references tbl_Grade(GradeID), UnitID int not null foreign key references tbl_Unit(UnitID)

)

more ▼

answered Jan 05 at 02:40 PM

avatar image

sajikumar.vk
1 1

(comments are locked)
10|1200 characters needed characters left
er-diagram.docx (28.7 kB)
tbl-script.sql (1.1 kB)
more ▼

answered Jan 05 at 02:46 PM

avatar image

sajikumar.vk
1 1

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x1208
x113

asked: Jan 04 at 02:50 PM

Seen: 41 times

Last Updated: Jan 05 at 02:46 PM

Copyright 2018 Redgate Software. Privacy Policy