The First Lab

Basic Terms and Concepts in Database

Sepy 4, 2015

(I) Homework Submission

  •         • Written Assignment: Please bring the hard copy to the lecture class.
  •         • Programming Assignment: Please submit digital report and code via gsubmit system.

        About gsubmit:

  •         (1) The instructions of gsubmit is here.
  •         (1) Make a new directory for each programming assignment. For example, make a folder PA1 for the report and code of programming assigmen 1.
  •         (2) Copy all files directly into the folder. Do not compress (or zip) the files.
  •         (3) The report for programming assignments should be in plain text file (*.txt), if the template is provided. Or submit pdf file (*.pdf), if the template is not available. Do not submit the report in other formats (*.rtf, *.doc or *.docx)
  •         (4) Type gsubmit cs460 PAX to submit the whole folder (including the files in the folder).
  •         (5) Type gsubmit cs460 -ls to check that you have successfully submitted the folder and files.
  •         (6) Type gsubmit cs460 -cat PAX/[Filename] to check that your file is readable (*.txt, *.java or *.cpp).
  •         (7) Grad students use cs660 instead of cs460 .
  •         (8) The cs460 in gsubmit is case sensitive. Please use lowercase.

(II) Basic Terms

  •         (1) Data:
                            A set of values (numbers, characters, other formats).

  •         (2) Metadata:
                            A kind of data that describes other data.

  •         (3) Database:
                            A very large collection (of files) of organized and related data.

  •         (4) DBMS (Database Management System):
                            A software package/system that can be used to store, manage and retrieve data from databases that persist for long periods of time.

  •         (5) Database System:
                            DBMS + data [+ applications].

  •         (6) Data Model:
                            A framework for describing data, data relationships, data semantics, and data constraints.

  •         (7) Schema:
                            The structure of the database using a particular model.

(III) Relational Model and Relational Databases

  •         (1) Relational Model:
                            A database model based on first-order predicate logic.

  •         (2) Entity Relationship Model:
                            An abstract conceptual data model used in software engineering to represent structured data.

  •         (3) From Entity Relationship Model to Relational Model:
                            Entity Relationship Model and Relational Model are different.
                            Translate from Entity Relational Model to Relational Model.

  •         (4) Relational Databases:

    •                         (a) Relation: Also called Table, made up of 2 parts: Schema and Instance.
    •                         (b) Schema: Specifies name of relation, plus name and type of each column.
    •                         (c) Instance: The actual data at a given time.
    •                         (d) Relational Database: A set of relations.
    •                         (e) Row: Also called Record or Tuple which represents a single, implicitly structured data item in a table.
    •                         (f) Column: Also called Attribute, a set of data values of a particular simple type.

(IV) An Example of a Relation (Table)

id name year rating runtime genre earnings_rank
1300854 Iron Man 3 2013 PG-13 130 A 13
1690953 Despicable Me 2 2013 PG 98 N 24
0770828 Man of Steel 2013 PG-13 143 A 54
1453405 Monsters University 2013 104 N 64
1905041 Furious 6 2013 PG-13 130 A 86
1623205 Oz the Great and Powerful 2013 PG 130 V 90
1408101 Star Trek Into Darkness 2013 PG-13 132 A 96
0816711 World War Z 2013 PG-13 123 A 135
0481499 The Croods 2013 PG 98 N 152
0848228 The Avengers 2012 PG-13 143 A 3