Professional Documents
Culture Documents
Textbook Chapter 62-66
Textbook Chapter 62-66
Textbook Chapter 62-66
Chapter 62:
Q1: Age, Blood type, Gender
Q2: Time of appointment dentist assigned to it
Q3: Yes because it is unique among everyone in the UK.
Q4: Yes because the word entity has the foreign key Nurse and Patient
Q5: a)
Product ProductComp Component
b)
Exercises:
1. a) House Address, House Price, House type, Buyer name, Date and Time of viewing
b)
Property (address, BedroomNum, Type, AskingPrice)
Vendor (name, address, telephone)
Buyer (name, telephone, address, type, lower/upper limit)
Viewing (Address, Price, Type, BuyerName, Date/Time)
c)
Property Viewing Vendor Buyer
2. a)
Book Loan Member
b) A primary key which consists of more than one attribute is called a composite primary key
c) A foreign key is an attribute that creates a join between two tables. It is the attribute that
is common to both tables and the primary key in one table is the foreign key in the table to
which it is linked
Harvey James
3. a) ExampaperID
b) Coursestaking(CandidateNumber, Firstname, Surname, courseID, subject)
c)
ExamPaper CourseTaking
Chapter 63:
Q1: It can be hard to create and manage when you have large amounts of products and
components. It is not practical for human users.
Q2:
Product
ProductComp
Component
Exercises:
1. a) ‘CatalougeNo’ as it is unique
b) It contains repeating attributes
SongMusic
c) Compact Disk
CD-Track Artist
b) All attributes are dependent on the key and only the key
Chapter 64:
Q1: SELECT * FROM CD
WHERE (RecordCompany = “ABC” OR RecordCompany = “GHK”) AND DatePublished
BETWEEN #01/01/2014 AND #01/01/2015
#will return CD14356, CD19998, CD25364, CD77233
Q2: SELECT Song.SongTitle, Artist.ArtistName, Song.MusicType
From Song, Artist
WHERE (Song.ArtistID = Artist.ArtistID) AND (Artist.ArtistName = “JJ” Or Artist.ArtistName =
“Rappat”)
ORDER BY ArtistName, SongTitle DESC
Harvey James
Exercises:
1. a)
Customer Product
Order OrderLine
Chapter 65:
Q1: CREATE TABLE Student (
StudentID CHAR(6) NOT NULL, PRIMARY KEY,
Surname VARCHAR(20) NOT NULL,
FirstName VARCHAR(15) NOT NULL,
DateOfBrith DATE NOT NULL)
Q2: ALTER TABLE Student
ADD YearGroup INTEGER
Q3: CREATE TABLE Cource (
CourseID CHAR(6) NOT NULL, PRIMARY KEY ,
CourseTitle VARCHAR(30) NOT NULL,
OnSite BOOLEAN)
Q4: a) INSERT INTO Student
VALUES (AB1234, Daley, Jennifer, 23/06/2005)
b) UPDATE Student
SET FirstName = “Jane”
c) ALTER TABLE Student
ADD DateStarted Date
Q5: The address will be changed but not the credit limit as it was overwritten by user A
Exercises:
1. a) i) A table is in third normal form if it is in second normal form and contains no ‘non-key’
dependencies
ii) So that all attributes are dependent on the key
b)
Customer
Furniture
Order
Customer
Customer
OrderLine
Harvey James
Chapter 66:
Q1: By linking the generation together to form a family tree to give structure to it.
Exercises:
1. a) This is where the stages of software development are not completed in a linear
sequence, with different parts being developed/tested at the same time. Prototypes are
built which are evaluated and improved until customer satisfaction.
b) This allows for improvements to be easily made and is more efficient as non-vital features
are not implemented which distracts time and energy.
2. a) How many courses will be used within the system, who are the primary users of the
system and how is the system is expected to grow?
b) Requirements are gathered, a prototype is built, the prototype is evaluated and refined,
this process repeats until the prototype satisfies the customer, the final system is then
created.