Question

If you need to store the following data in a relational database and MongoDB, how would...

If you need to store the following data in a relational database and MongoDB, how would you implement in each of them. List the design and commands to store these records in relational database and MongoDB separately.

{no:1,name:"ST",salary:2000,role:"OB"}

{no:2,name:"MSD",salary:1500,role:"WK"}

{no:3,name:"YS",salary:1000,role:"ALR"},

Homework Answers

Answer #1

Relational database, MySQL

Precondition: Create and use database

Step 1: Creation of table "jobs"

create table jobs(no int primary key, name varchar(100), salary int, role varchar(100));

Step 2: Insertion into table "jobs"

insert into jobs values(1,"ST",2000,"OB");

insert into jobs values(2,"MSD",1500,"WK");

insert into jobs values(3, "YS", 1000, "ALR");

MongoDB

Precondition: Create and use database

Step 1: Creation of collection "jobs"

db.createCollection("jobs")

Step 2: Insertion into collection "jobs"

db.jobs.insert([

{no:1,name:"ST",salary:2000,role:"OB" },

{no:2,name:"MSD",salary:1500,role:"WK"},

{no:3,name:"YS",salary:1000,role:"ALR"}

])

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
If you need to store the following data in a relational database and MongoDB, how would...
If you need to store the following data in a relational database and MongoDB, how would you implement in each of them. List the design and commands to store these records in relational database (SQL query) and MongoDB separately. {no:1,name:"ST",salary:2000,role:"OB"} {no:2,name:"MSD",salary:1500,role:"WK"} {no:3,name:"YS",salary:1000,role:"ALR"},
***** this is question and answer i just need the schema Data Modelling is the primary...
***** this is question and answer i just need the schema Data Modelling is the primary step in the process of database design. Compare and contrast Conceptual data model versus Physical data model. Illustrates with help of example to list down data (entities), relationship among data and constraints on data. Data Modeling:- Data Modeling is the first step in database designing.It is the representation of data model, or collected data. Also shows that collected data stored in database and linked...
SQL DATABASE Task 4 [1.5 marks] Create Index (0.5 marks) Currently, the database only contains a...
SQL DATABASE Task 4 [1.5 marks] Create Index (0.5 marks) Currently, the database only contains a small number of records. However, the data contained within it is expected to grow significantly in the future. Creating indexes on commonly searched columns is a way performance issues can be minimized. Write a command to create an index on student_name column of the student table. Create view – 1 mark Write a command to create a view to list the student ID and...
You are a database consultant with Ace Software, Inc., and have been assigned to develop a...
You are a database consultant with Ace Software, Inc., and have been assigned to develop a database for the Mom and Pop Johnson video store in town. Mom and Pop have been keeping their records of videos and DVDs purchased from distributors and rented to customers in stacks of invoices and piles of rental forms for years. They have finally decided to automate their record keeping with a relational database. You sit down with Mom and Pop to discuss their...
Write a 4-6 sentence summary explaining how you can use STL templates to create real world...
Write a 4-6 sentence summary explaining how you can use STL templates to create real world applications. In your summary, provide an example of a software project that you can create using STL templates and provide a brief explanation of the STL templates you will use to create this project. After that you will implement the software project you described . Your application must be a unique project and must incorporate the use of an STL container and/or iterator and...
Overview Your assignment is to complete a wireless network design for a small company. You will...
Overview Your assignment is to complete a wireless network design for a small company. You will place a number of network elements on the diagram and label them appropriately. A network diagram is important to communicate the design features of a network between network administrators, system administrators and cyber-security analysts. It helps to create a shared mental model between these different technologists, yet each will have their own perspective on what is important to have documented on the diagram. Please...
After reading the following article, how would you summarize it? What conclusions can be made about...
After reading the following article, how would you summarize it? What conclusions can be made about Amazon? Case 12: Amazon.com Inc.: Retailing Giant to High-Tech Player? (Internet Companies) Overview Founded by Jeff Bezos, online giant Amazon.com, Inc. (Amazon), was incorporated in the state of Washington in July 1994, and sold its first book in July 1995. In May 1997, Amazon (AMZN) completed its initial public offering and its common stock was listed on the NASDAQ Global Select Market. Amazon quickly...
Please read the article and answear about questions. Determining the Value of the Business After you...
Please read the article and answear about questions. Determining the Value of the Business After you have completed a thorough and exacting investigation, you need to analyze all the infor- mation you have gathered. This is the time to consult with your business, financial, and legal advis- ers to arrive at an estimate of the value of the business. Outside advisers are impartial and are more likely to see the bad things about the business than are you. You should...
In February 2012, the Pepsi Next product was launched into the US market. This case study...
In February 2012, the Pepsi Next product was launched into the US market. This case study provides students with an interesting insight into PepsiCo’s new product process and some of the challenging decisions that they faced along the way. Pepsi Next Case Study Introduction Pepsi Next was launched by PepsiCo into the US market in February 2012, and has since been rolled out to various international markets (for instance, it was launched in Australia in September 2012). The new product...