86eyt37xx/the traffic light - #763
Conversation
|
Here's a summary of the Code Review Comments based on the provided pull request. Code Review Comments
Suggestions for Improvement
The comments are intended to streamline necessary adjustments while maintaining clarity. If there’s anything specific you’d like to delve deeper into, please let me know! |
| signal_id NUMBER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, | ||
| signal_name VARCHAR2(100) NOT NULL, | ||
| state VARCHAR2(10) DEFAULT 'RED' NOT NULL | ||
| CONSTRAINT ck_signal_state CHECK (state IN ('RED','YELLOW','GREEN')), |
There was a problem hiding this comment.
any specific reason for adding a constraint here ?
There was a problem hiding this comment.
sure, add this CONSTRAINT to prevent invalid status like blue, black just that's mention RED and YELLOW, GREEN
| --privilege | ||
| SELECT USER FROM dual; | ||
|
|
||
| GRANT CREATE JOB TO SYSTEM; |
There was a problem hiding this comment.
is there a reson for this statement ?
There was a problem hiding this comment.
Yes, prevent me when do create procedure that's create scheduler job so SELECT USER FROM dual; to check which user then create "GRANT CREATE JOB TO SYSTEM" for that user
|
Here's a summary of the Code Review Comments based on the provided pull request: Code Review Comments
Suggestions for Improvement
These comments aim to facilitate necessary revisions while maintaining code clarity and quality. If there's anything specific you'd like to explore further, just let me know! |
Code Review Comments
Suggestions for Improvement
These comments aim to facilitate necessary revisions while maintaining clarity and quality in the code. If you'd like to discuss anything further, just let me know! |



The Traffic Light That Never Sleeps:
Implemented a database-driven traffic signal system using Oracle PL/SQL
traffic_signalstable to store signal ID, name, current state, and last change time.check_and_update_signal_statusprecedure to manage the signal cycle:start_signal_watchprecedure to create schedule jobAFTER INSERTtrigger to automatically start the Scheduler when a new signal is created.