RelationalDatabase Assignment 1a Solved

30.00 $

Category:

Description

Rate this product

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:

  1. Drop a database if it exists, create a database by the same name and use it.
  2. 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:

 

  1. a primary key field
  2. a field of type varchar
  • a field of type char
  1. a field of type float or double, unsigned
  2. a field of type smallint, unsigned
  3. a field of enumerated data type
  • a field of date data type
  • at least one field that cannot contain a null value
  1. at least one field has a relevant default value

 

  1. Display the structure of the table.
  2. Populate the table with relevant data, at least 10 records. Text/string data in quotes and numeric without quotes
  3. Add a SELECT statement to display the data in the table.

 

  • assignment1a-ivc4fd.zip