[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.0

database contraits

Asked by yazi in Databases Miscellaneous

Tags: database

hi,

  can anyone pla advice whether the contraits i have define for my oracle create tables statements is alright? or have i miss out any contraits?

  contraits are based on this requirement:
 
- Only the courses on offer for a particular year/semester can be selected for that year/semester.
- No course could be selected more than once, no matter in the same semester or not.
- The number of units selected in any semester by a student cannot exceed 8 (including those year long courses, whose total number of units is split into the two semesters equally).
- A course has the same code, title, number of units and duration no matter when it is offered.
- Each semester-long course carries 2 units, and each year-long course carries 4 units.
- Only the existing courses in Courses dataset can be offered.

  here is my create table statements:

CREATE TABLE Student(
StudentID VARCHAR2(8),
FamilyName VARCHAR2 (50) NOT NULL,              
GivenName VARCHAR2 (50) NOT NULL,
StudentPwd VARCHAR2(8) NOT NULL,
CONSTRAINT pk_Student PRIMARY KEY (StudentID));


CREATE TABLE Course(
CourseCode VARCHAR2(8),
CourseTitle VARCHAR2 (100) NOT NULL,              
CONSTRAINT pk_Course PRIMARY KEY (CourseCode));


CREATE TABLE StudentEnrolment(
CourseCode VARCHAR2(8),
StudentID VARCHAR2(8),              
EnrolledYear INTEGER NOT NULL,
EnrolledSem INTEGER NOT NULL,
CONSTRAINT pk_StudentEnrolment PRIMARY KEY (CourseCode, StudentID, EnrolledYear, EnrolledSem),
CONSTRAINT fk_StudentEnrolment1 FOREIGN KEY (CourseCode)
REFERENCES Course (CourseCode),
CONSTRAINT fk_Student_Enrolment2 FOREIGN KEY (StudentNo)
REFERENCES Student (StudentNo));


CREATE TABLE CourseOffering(
CourseCode VARCHAR2(8),
Year INTEGER NOT NULL,              
Sem VARCHAR2(6) NOT NULL,
Title VARCHAR2(100) NOT NULL,
Duration VARCHAR2(4),
UnitNum VARCHAR2(1) NOT NULL,
CONSTRAINT pk_CourseOffering PRIMARY KEY (CourseCode, year, sem),
CONSTRAINT fk_CourseOffering FOREIGN KEY (CourseCode)
REFERENCES Course (CourseCode));

  thank you.


[+][-]05/20/03 01:32 AM, ID: 8549141Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Databases Miscellaneous
Tags: database
Sign Up Now!
Solution Provided By: angelIII
Participating Experts: 4
Solution Grade: A
 
[+][-]05/20/03 06:50 AM, ID: 8550561Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/22/03 01:32 AM, ID: 8562901Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/31/03 02:27 PM, ID: 8621531Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/01/03 11:08 PM, ID: 8627300Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/02/03 07:08 PM, ID: 8634633Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/06/03 07:54 PM, ID: 8671074Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92