$35
Create a well-documented script - include names, date and purpose of the script at the head of the script, the purpose of the fields in the table, comment all code sections. Use meaningful names and consistent naming conventions throughout the script. The script should execute correctly without any syntax or logical errors or warnings.
Think of a real life scenario where a database will work well. Further, come up with structure of one table to store relevant information about an entity in this database. You can choose something of interest to you- sports, movies, music etc.
Now code a script in SQL that satisfies the following requirements:
a) Drop a database if it exists, create a database by the same name and use it.
b) Create a table therein that stores relevant information about an entity of your choice. Choose relevant fields of BEST FIT to store data pertaining to that entity. Comment the purpose of each field. Ensure that the table has at least:
i. a primary key field
ii. a field of type varchar
iii. a field of type char
iv. a field of type float or double, unsigned
v. a field of type smallint, unsigned
vi. a field of enumerated data type
vii. a field of date data type
viii. at least one field that cannot contain a null value
ix. at least one field has a relevant default value
c) Display the structure of the table.
d) Populate the table with relevant data, at least 10 records. Text/string data in quotes and numeric without quotes please.
e) Add a SELECT statement to display the data in the table.
How to submit: Name the script Assignment1ayour_names.sql and submit it via the
Assignments-Assignment 1a link on blackboard. Only one member of the group needs to submit.