28 Nov The relational database design process includes the process of identifying the tables, and the fields (columns) with associat
Unit 6: Design Assignment
Introduction
The relational database design process includes the process of identifying the tables, and the fields (columns) with associated types. The types of fields may differ from one database management system to another.
For example, MySQL database field types are given in this document: Data Types (Links to an external site.). They include text, numerical (data or ID) date and other field types.
As we learned, some of the fields could also be used to store IDs of records from another (related tables) to provide relations between the records. For example, if one table lists classes, another one lists students, we can create a table to record student enrollment. Then the enrollment table should have student IDs and class ID as its fields to record enrollment of the particular student into a particular class.
A new startup company is planning to build a system that would collect user preferences over different venues (restaurants, movie theaters, museums, etc.). The company utilizes a continuous scale of rating between zero and five to describe users’ preferences.
Directions
The task of this assignment is to design the structure of the database for a startup company that would allow the storage of user's preferences.
Submit a Word document with tables (one for each database table) that lists the following:
· Field name
· Field type (use MySQL data types (Links to an external site.))
· A comment on the role of the field
In order to complete the assignment, you will need to identify the number of tables that would efficiently store data collected by the startup company. And design the fields including the ones that would store ID values of other table(s) in order to ensure relations between tables. Please use arrows to identify the relations between table fields.
Here is an example of the design for the student enrollment database:
Unit 6: Coding Assignment
Introduction
SQL statements allow us to retrieve, manipulate, or delete data stored in relational databases. Here are few examples of SQL statements:
The INSERT statement is used to insert data into a table: For example:
INSERT INTO `students’ (‘student_id`, `first_name`, `age`) VALUES (14, “Melissa”, 23);
The SELECT statement is used to retrieve data. For example, to get the list of students use:
SELECT * FROM `students`;
Where * means to return a table with all columns of the initial table.
You can limit the output columns:
SELECT `first_name` FROM `students`;
To use a condition, you can add a WHERE statement
SELECT * FROM `students` WHERE student_id = 12;
If you need to aggregate information in the table, you can use a function like MAX, or AVG for average, or COUNT.
For example, if you need to calculate an average students’ age, you would use this fucntion:
SELECT AVG(`age`) FROM `students`;
The DELETE statement can be used to delete data. Note that if no WHERE conditions are given all data from the table will be deleted.
For, example, to delete all re-enrollment records for a student with id equal to 14:
DELETE from `enrollment` WHERE `student_id`=14
Directions
For the database design in the design assignment for this week write an SQL script to:
· Insert two a new user;
· Retrieve the list of places in a given category;
· Find the number of ratings submitted by a given user;
· Delete all preferences submitted by a user with a given ID = 342
Submit your script to the dropbox as a text document.
Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteEdu. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.
Do you need help with this question?
Get assignment help from WriteEdu.com Paper Writing Website and forget about your problems.
WriteEdu provides custom & cheap essay writing 100% original, plagiarism free essays, assignments & dissertations.
With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Chat with us today! We are always waiting to answer all your questions.