Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The three text files contain data like they use in the IMDb (internet movie data

ID: 3701403 • Letter: T

Question

The three text files contain data like they use in the IMDb (internet movie database). I posted this question several days ago and got a “needs more info” response. I don’t know what other info you would need. We can use pseudocode, python or simply describe the process we would use in detail to read in these text files and create a list of the principals and their titles like the example of: Carrie Fisher Star Wars 1977 This is a database class 3, You are given three tab-delimited text files formatted as follows: title.basics 3. tconst (string) - alphanumeric unique identifier of the title . title (string) - the popular title at the point of release . startYear (Y) - represents the release year of a title. In the case of TV Series, it is the series start year . endYear (w)- TV Series end year. 'W' for all other title types name.basics nconst (string) - alphanumeric unique identifier of the name/person primaryName (string)- name by which the person is most often credited knownForTitles (array of tconsts) - titles the person is known for title.principals tconst (string) - alphanumeric unique identifier of the title principalCast (array of nconsts) - title's top-billed cast/crew . Your goal is to create a list of the principals and their titles. Each entry (line) will include the person's name, one of the titles associated with them, and the title's start year. Example: Carrie Fisher Star Wars 1977 Describe the process you would use to create this list. Be specific. You may assum enough memory to hold all data in program memory. (You may substitute a pseudocode implementation if you would prefer.)

Explanation / Answer

This problem can be solved by using only 2 of these 3 files: "title.basis" and "name.basis".

--1) Store data from title.basis into memory with name "TITLES" as key-value pairs where tconst is key, and (title + startYear) touple should be the value.

--2) Store data from names.basis into memory with name as "NAMES" as key-value pairs where primaryName is key, and first element in knownForTitles (i.e. first tconst in the array) is value.

--3) Iterate over each entry in "NAMES", and do the following for each entry:

   (a) Read the key into a variable called "Name", and value into a variable called "Title_Id".

   (b) Look-up into "TITLES" for "Title_Id", and read corresponding value, and extract the title and startYear from it. Store title into a variable called "Title" and startYear into a variable called "Start_Year".

   (c) Print "Name", "Title" and "Start_Year". Put a tab between every element while printing.

--4) Sample data and answer:

title.basis

===========

t1   title_1   1997   1999

t2   title_2   2002   2004

t3   title_3   1988   N

t4   title_4   1977   1990

t5   title_5   2012   2014

t6   title_6   1980   N

t7   title_7   1994   N

t8   title_8   2010   2015

t9   title_9   1975   N

t10   title_10   1960   1964

t11   title_11   2000   2001

t12   title_12   1988   1989

name.basis

==========

n1   John S   t2,t3,t4

n2   Tom P   t1,t2,t4,t6

n3   Bill D   t5,t7,t8,t9,t10

n4   Peter K   t1,t4,t11,t12

title.principals

================

t1   n2,n4

t2   n1,n2

t3   n1

t4   n1,n4

t5   n3

t6   n2

t7   n3

t8   n3

t9   n3

t10   n3

t11   n4

t12   n4

Answer

======

John S   title_2   2002

Tom P   title_1   1997

Bill D   title_5   2012

Peter K   title_1   1997

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote