Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Accounts acctNo owner userid password balance 365556 Tony Jones tjones 456 819.3

ID: 3714255 • Letter: A

Question

Accounts

acctNo

owner

userid

password

balance

365556

Tony Jones

tjones

456

819.37

499872

Frank Smith

fsmith

123

590.81

761112

George Powers

gpowers

geo

239.41

765552

Betty Davis

bdavis

atl

356.21

872221

Suzanne Austin

suze

suze

622.22

899900

Mary Wilson

mwilson

mary

772.12

Customers

cid

cName

cAddr

cPhone

cEmail

tjones

Tony Jones

Miami, Fl

514-999-2131

tjones@yahoo.com

fsmith

Frank Smith

Dallas, Tx

616-423-1717

fsmith@haotmail.com

gpowers

George Powers

Chicago, Il

612-901-2312

gpowers@bellsouth.net

bdavis

Betty Davis

Nashville, Tn

909-367-9485

bdavis@yahoo.com

suze

Suzzane Austin

San Diego, Ca

201-565-1902

suze@yahoo.com

mwilson

Mary Wilson

Atlanta, Ga

405-787-2911

mwilson@hotmail.com

Did you notice a mistake in the database above. “Suzanne Powers” name is different in the second table.  What changes could you make to prevent an error like this from occurring again?

Accounts

acctNo

owner

userid

password

balance

365556

Tony Jones

tjones

456

819.37

499872

Frank Smith

fsmith

123

590.81

761112

George Powers

gpowers

geo

239.41

765552

Betty Davis

bdavis

atl

356.21

872221

Suzanne Austin

suze

suze

622.22

899900

Mary Wilson

mwilson

mary

772.12

Explanation / Answer

The given problem can be prevented by declaring the referential integrity between the two table Accounts and Customers. In table Account 'userid' needs to be declared as Primary key and cid (foreign key) field of Customer table will refer to the userid of the Account table.

WHen the referential integrity constraint is established there will be no need to of field cName in Customer table.

The new relational schema is given beow. Underlined attributes are primary key and bold are foreign key.

Account (acctNo, owner, userid, password, balance)

Customer (cid, cAddr, cPhone, cEmail)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote