The exercise request some additional constraints and enhancements:
Proposal:
- Create REGEX that validates domain_name.
- 'Registered' date should be between date of oldest record and NOW(), unless you can register with future date.
- domain_flag table should only accept domain flags from domains, that are in domain table.
- domain_flag table should only accept flags, whose effective_range is subset of registered-unregistered range.
Question about the exercise:
"do not have and active (valid) expiration (EXPIRED
) flag." -
- Its not clear to me, if "active (valid) flag" means the flag exists or if it is set to TRUE.
- In my opinion, it can be interpreted in two ways:
- Active flag can be TRUE or FALSE, as long as it has defined state within given range, we call it "Active(valid) flag"
- Active flag means it is set to TRUE I assumed the 1. is true, but if not, it can easily be repaired by adding "value = TRUE" next to the flag selection
"return fully qualified domain name" - Isnt domain name fully qualified by itself ?