Question 1: Relational Schema (6 Marks)
• Provide a relational schema for the database you will create.
• Identify the primary keys (1 mark), the foreign keys (1 mark), and the constraints (1 mark).
• Identify the data types (1 mark) and write a query to create the database with MySQL (1 mark) and one to import the sample dataset you were provided with (1 mark)
Answer 1:
• Provide a relational schema for the database you will create.
Movies_n9000348
movieID
Title Year
Ratings_n9000348 reviewerID movieID rating comments
Reviewers_n9000348
reviewerID name yearJoined trustRating
• Identify the primary keys (1 mark), the foreign keys (1 mark), and the constraints (1 mark).
Listed below are the Established Relationships: -
1) movieID is the ‘Primary Key’ in the Movies_n9000348 table.
2) Combination of reviewerID and movieID is a ‘Composite Primary Key’ in the Ratings_n9000348 table.
3) movieID from Ratings_n9000348 table is the ‘Foreign Key’ to movieID column in the Movies_n9000348 table.
4) reviewerID from Reviewers_n9000348 table is the ‘Foreign Key’ to reviewerID column in the Ratings_n9000348 table. • Identify the data types (1 mark) and write a query to create the database with MySQL (1 mark) and one to import the sample dataset you were provided with (1 mark)
• Identify the data types (1 mark)
DATATYPES:
Datatypes identified for the column variables in Movies_n9000348 table:
1) movieID: INT
2) Title: VARCHAR(100)
3) Year: INT
Datatypes
Which of the following defines a relationship in which each occurrence of data in one entity
Step 2. Data Analysis: The data will be analyzed to determine database modeling. Step 3. Database normalization: Fields and
In social databases, a one-to-numerous relationship happens when a parent record in one table can possibly reference a few youngster records in another table. In a one-to-numerous relationship, the parent is not required to have youngster records; in this way, the one-to-numerous relationship permits zero tyke records, a solitary kid record or various kid records. The imperative thing is that the youngster can't have more than one parent record.
For this assignment, you will NOT create a database. You will list the type of data you want to collect, group it accordingly, break it into field and determine attributes. Think about how the different pieces of data relate to one another and what purpose they serve. You may use Excel, Word, or Visio for this assignment.
In order to complete this task, I will need the data that needs to be inserted into the table, and how the information will be used.
The lab begins with a simple example of query development using Access; then, evolves to more complex queries which the student should perform after completing the first exercise. The student can create a query with the wizard, with query design view, or with SQL statements. The Northwind database will be used again in this lab.
The '.csv' file is needed because it can transfer information from one database format and transform it into another. With this Lab we are showing how this can be done. All the fields in the '.csv' file are exactly the same as the '.xlsx' file, except, the attributes for the data type 'text' has a length of 8000, with allowable null values. The numeric
A relational database is a database that consists of a collection of tables with columns showing entities, and rows showing data. This type of database uses a primary key and foreign key. The foreign key in another table will point to the primary key of a table, and this is how tables can relate to each other. This permits for one-to-one, one-to-many, and many-to-many relationship between the data. An advantage of relational databases includes the ease of adding or modifying new tables and entities without needing to change the structure of the database already in place. Relational database have many features, including indexing, setting data type, and setting validation tests, all these help to ensure data integrity.
|I will use Microsoft Excel to enter data into a database file, to make sure the data is
Phase 3: Sketch the star schema for the database and developed the database based on the star schema.
Dataset can be used in combination with SqlDataAdapter class. Each DataTable in a DataSet is filled with data from the data source by making use of the DataAdapter. The SqlDataAdapter object will
The purpose of a primary key, and the appropriate selection and assignment of a field as primary key.
Draw an REA diagram with cardinalities and tables with primary keys, foreign keys, and non-key attributes for the following business:
Describe the steps to be taken prior to inputting the data into the computerized system and how you would go about implementing the new system.
If you have not yet defined any relationships, the Show Table dialog box automatically appears. If it does not appear, on the Design tab, in the Relationships group, click Show Table.