IMDb in DBTG Network Model - CSE 199 (Fall 2026)

IMDb is the world's most popular and authoritative source for movie, TV and celebrity content, designed to help fans explore the world of movies and shows and decide what to watch. IMDb also provides downloadable version/API acccess to its database for developers. To help you learn by example, we took a small sample of the database as of December, 2017 (HT to join order benchmark) and reorganized it in the historical DBTG network data model. Please follow the recitation materials as a guide for this interative interface.

IMDb in DBTG data model

  • A DBTG database consists of records connected to each other through links (called DBTG sets).
  • A record type specifies the name and the common attributes of a collection of similar records. They are shown as blue boxes in the diagram, with its name at the top, and its list of attributes below the name. In our simplified IMDb database, we have:
    • title: each title represents a unique media entry belong to one of the following kinds: movie, tv movie, video movie or tv series.
    • episodes: for each tv series, there may be multiple associated episodes.
    • company: each represents a company in the motion pictures industry.
    • distributor: these are special entries representing which title is distributed by which companies.
  • A DBTG set represent an owner-member relationship between two types of records (not to be confused with the mathematical definition of set):
    • In the data model diagram, each DBTG set is represented as an arrow, pointing from member to owner.
    • Each member record can only have at most one owner record in each DBTG set. For example, each episode is an episode_of a specific title. It cannot belong to two different titles at the same time.
  • To allow one to enumerate records of any type, DBTG model has a virtual system record type with exactly one such record. It, as the owner, forms a DBTG set with every other record type (as member), shown in black in the diagram below.
Determining sampled IMDb database size…
Database instance (disk)
Program state (memory)
Current title
Current episodes
Current company
Current distributor
Current episode_of
Current is_distributor
Current distributor_of
Current run unit
record type set type run unit
DB-status
DB-set-name
DB-record-name
DB-data-name
counter: 0
Record templates
DBTG Commands
find using
find within
get
find owner within
Filter Loop
find any using
find first within
count := 0;
while DB-status = 0 and count < do begin
get title
if then
;
find duplicate title using id
end;
Command history
Click history to show prior state; Must be on most recent to execute command
Printed records