Question: Consider a SQL database diploma with a table named modules . The modules table has the following columns: - code , which is the primary
Consider a SQL databasediplomawith a table namedmodules Themodulestable has the following columns:
code which is the primary key of the table for storing unique character module codes
name which stores module names
lecturer which stores the names of the primary lecturers for the modules
Assume that themodulesdatabase table has been populated with the following information:
ICT Interactive Programming Dr S Bheki
ICT Internet Programming Dr A Thomas
ICT Digital Logic Dr D Smit
Answer the questions that follow:
a Can the databasediplomahave additional tables? Explain your answer. marks
b Can two rows of data inmoduleshave the same value for the fieldlecturer Explain your answer. marks
c What data given in the description of this question is unnecessary to create a PDO object? marks
d Assume that a database connection is established using a PDO object named$db Write the necessary PHP code to extract all the data in themodulesdatabase table and display the data in a format of your choice. marks
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
