Question: Example B210316000041 QUESTION 4 (10 MARKS) Below is the data dictionary for table subject_mark. Table Name: subject_mark Column Name Data Type and Size Primary Key

Example B210316000041 QUESTION 4 (10 MARKS) Below is the data dictionary for table subject_mark. Table Name: subject_mark Column Name Data Type and Size Primary Key S_MARKDID varchar2(13) Yes STUDENTID Foreign key from STUDENT(studentID) SUBJ NAME varchar(100) CREDIT Number CARRY_MARK Number FINAL EXAM Number TOTAL_MARK Number Calculated automatically using trigger (CARRY_MARK+FINAL_EXAM) Develop steps so that the primary key for table subject_mark can be generated automatically and the value for column total_mark can be calculated automatically. The format of the primary key should be: B210316000041, as shown in Figure 4, where the first character is simply an alphabet B, the following six (6) characters is current date, (based on the example, you may assumed that 21 March 2016 is the current date) and the last six (6) digits is sequence number which should start from 1. Example of data for table subject_mark is shown in Figure 4. SAMARKIDA STUDE SUBU'NAME KREDIT CARRY MARK FINAL EXAM TOTALMARK B2-03 16000041 S001 Database 19 10 20 B2103160000425001 Database 10 10 20 B210316000043 9001 IOSK 10 101 20 3210316000044 S002 OSK 601 10 70 8210318000045 IS003 IOSK 50 20170 B210310000045 SCO3 palabusa 50 20 B210310000047 SC02 Database 40 20 82103110000040 S001 Database 30 20 50
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
