Identify all candidate keys for each relation

Assignment Help Basic Computer Science
Reference no: EM131008798

Question 1. Consider the following:

D1 = {Student1, Student2, Student3, Student4}
D2 = {20, 18, 34, 27}
D3 = {undergraduate, postgraduate}
S = {(x, y, z) | x ∈ D1, y ∈ D2, z ∈ D3, and y ≥ 30}

(a) Create a Relation Schema for S given above. Write out both the full and the abbreviated schemas as shown on Slide of the lecture notes in Module 3.

(b) Using a table as a physical representation, create a relation for S as defined above. The table should include ALL the possible tuples for S and has column headings that correspond to the attributes of the relation.

(c) What is the cardinality of S, the table you have constructed in Question 1(b)?

(d) What is the degree of S?

Question 2. Consider the following relational schema:

Student(stdNo, firstName, lastName, eMail)
Course(code, name, credits)
WhenOffered(course, semester, year, examiner)
Staff(staffID, name, birth-date, department)
Transcript(student, course, semes, year, grade)

This is a schema for a database maintained by a small college to keep track of students, courses, etc. Students have their own unique student ID (which may only contain numbers) and can be contacted via their own unique college email address. There are no two courses having the same code or name. A course is offered at most once per semester (where 1 ≤ semester ≤ 3), but can be offered in several semesters or in different years. A course offer is examined by a specific member of staff. The examiner can vary over different semesters, and can examine more than one course in a given semester. A staff belongs to one and only one department at the university. A student enrolled in a specific course offer obtains a grade for that course. A student can take a same course multiple times (e.g., fail for a few time and finally pass it), but cannot take the course twice in a single semester of a given year. Students' and staff's names are generally NOT unique. The college typically uses the database to create a list of course names, when they are offered, and the name of the examiner. It also emails reports for each student with their name, the names of courses they have taken and in which semester, the name of their examiner, and the grade they  obtained.

In the above relations, we have the following correspondence between attributes (but not limited to): stdNo↔student, examiner↔ staffID and code↔course. For the following questions, do not use assumptions that are not supported by the description given above. Use the Forum on the course web site to discuss the problem setting if you need clarification.

(a) Identify all Candidate Keys for each relation.

(b) Choose the Primary Key for each relation.

(c) Identify all Foreign Keys for each relation. Use the following notation for each Foreign Key:

FK TableName(Attributes) References TableName(Attributes).

(d) Consider the following instance for Transcript:

student course semes year grade
1 CSC2401 1 2010 NULL
1 CSC2401 2 2010 B
2 CSC3400 NULL 2011 A
3 CSC3403 3 2011 F
4 NULL NULL 2011 C
Jeff CSC2406 1 2011 HD
NULL CSC8407 2 2011 NULL

Indicate which row(s) break the relational integrity rules, and why (there may be more than 1 reason per row).

Reference no: EM131008798

Questions Cloud

Estimate the proportion of traditional college : Suppose you want to estimate the proportion of traditional college students on your campus who own their own car. You have no preconceived idea of what that proportion might be.
Problem regarding the confidence interval change : a) How would the confidence interval change if the sample size had been 800 instead of 200? b) How would the confidence interval change if the confidence level had been 90% instead of 95%?
Coworkers fall in the interval : From a survey of coworkers you find that 48% of 200 have already received this year's flu vaccine. An approximate 95% confidence interval is (0.409, 0.551). Which of the following are true? If not, explain briefly. a) 95% of the coworkers fall ..
Standard error of the sample proportion : a) What is the value of the sample proportion p? b) What is the standard error of the sample proportion?
Identify all candidate keys for each relation : Create a Relation Schema for S given above. Write out both the full and the abbreviated schemas as shown on Slide of the lecture notes in Module 3. Using a table as a physical representation, create a relation for S as defined above. The table sho..
Standard weight of precious metal : The trial of the pyx. In 1150, it was recognized in England that coins should have a standard weight of precious metal as the basis for their value. A guinea, for example, was supposed to contain 128 grains of gold. (There are equivalent to the su..
Sampling distribution model for the sample mean : Sampling. A sample is chosen randomly from a population that can be described by a Normal model. a) What's the sampling distribution model for the sample mean? Describe shape, center, and spread. b) If we choose a larger sample, what's the effect on ..
Problem regarding the meals-sampling : Sampling. A sample is chosen randomly from a popu- lation that can be described by a Normal model. What's the sampling distribution model for the sample mean? Describe shape, center, and spread.
What is the area enclosed by the track in the given case : Find I and r such that the area of the rectangular region of the racetrack is as large as possible. What is the area enclosed by the track in this case?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Creating a sales tracking application called the webco sales

In this project, you will be creating a sales tracking application called the Webco Sales Tracker, similar to commercial applications such as SalesForce. The system will use a simplified sales pipeline model that has three stages: qualifying, quot..

  Expectation of reduced costs for the company

As explained in the e-Activity, Bring Your Own Device (BYOD) programs are initiated with the expectation of reduced costs for the company. In many situations, such reductions are not realized due to hidden or unexpected costs associated with the p..

  Explain order processing program to keep track

You're asked to implement an Order Processing program to keep track of orders for customers and process them if needed. The program will read a text file containing customer orders in arbitrary order and then process them Class Design

  System network administrator

You are the system network administrator for the Can-D company, which is an organization of 3,000 employees working from a large corporate campus in sunny Orlando, Florida.

  Write the code to compute s on the basis of these values

In physics, a common useful equation for finding the position s of a body in linear motion at a given time t, based on its initial position s0, initial velocity v0, and rate of acceleration a, is the following:

  K and l are mobile across sectors.

The next three questions pertain to the two-good (M,F)-two-factor (K-L) Harberger model.Unless noted otherwise, assume that each factor of production is always fully employed, allmarkets are competitive, and K and L are mobile across sectors.

  How frequently should your personal computer be scanned

Name and briefly describe three different types of malware that could infect a personal computer running the Windows operating system.

  Deadlock prevention

In  deadlock prevention , we constrain resource requests to prevent at least one of the four conditions of deadlock (Mutual exclusion, Hold and wait, No preemption, Circular wait). This is either done indirectly, by preventing one of the three necess..

  Structured and object-oriented designs

Structured and object-oriented designs are the two main contenders for programming methodologies relevant to the creation of documentation for application programs. The choice of methodologies will greatly affect how we approach the challenge and ..

  Robot battle tank to battle against other tanks

Robocode is a programming game, where the goal is to develop a robot battle tank to battle against other tanks. You program a robot using the Java language, put it onto a battlefield and let it fight against opponent robots created by other progra..

  Illustrate your answer with an example

Each of the UML models relates to the other models. How can cross checking between models ensure that the requirements are accurate and correct? Illustrate your answer with an example

  What are the three major classes of guided media

)An AP may connect a wireless network to a wired network. Does the AP need to have two MAC addresses in this case? Why or why not?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd