Presentation is loading. Please wait.

Presentation is loading. Please wait.

Texas State Technical College DISCOVER! Database Tables The building blocks of the relational database.

Similar presentations


Presentation on theme: "Texas State Technical College DISCOVER! Database Tables The building blocks of the relational database."— Presentation transcript:

1 Texas State Technical College DISCOVER! Database Tables The building blocks of the relational database.

2 Texas State Technical College DISCOVER! Database Tables The table is the basic structure of all relational databases. One table represents one type of object in the real world domain. The table’s main purposes are: Define the object and all its attributesDefine the object and all its attributes Store all the instances of that object typeStore all the instances of that object type Table Purpose

3 Texas State Technical College DISCOVER! Database Tables Generic Object Type (defined by the table) EngineEngine Instances of the Engine Generic Type (stored in the table) Ford 4 cylinderFord 4 cylinder Ford V-6Ford V-6 Ford V-8Ford V-8 Dodge V-12Dodge V-12 Table Purpose Illustration

4 Texas State Technical College DISCOVER! Database Tables Table Composition Each table has two primary components. Table DefinitionTable Definition Attribute(field)Attribute(field) Attribute type (datatype)Attribute type (datatype) Relationship(key)Relationship(key) Table DataTable Data Instances (records)Instances (records)

5 Texas State Technical College DISCOVER! Database Tables Table Definition Defines the characteristics of one generic type of object. The definition for a table is a list of pairs {attribute name, attribute type} Any attribute/characteristic listed must be common to all objects of the object type.

6 Texas State Technical College DISCOVER! Database Tables Table Definition Example NameVolumeCylindersMax TorqueMax RPM TextDecimalInteger [ ENGINE ] Think of all the engines that exist or that you wish to model. The engine table describes a generic engine. It must define all the attributes that are common for all automotive engines. Below are only a few of the common characteristics/attributes in both a graphical and text based representation. [ {Name, Text}, {Volume, Decimal}, {Cylinders, Integer}, {Max Torque, Integer}, {Max RPM, Integer} ]

7 Texas State Technical College DISCOVER! Database Tables Table Data Stores all specific instances of the object type. Each instance or record represents one existing or actual object of the object type specified by the table. Each instance or record is a list of pairs {attribute name, attribute value}

8 Texas State Technical College DISCOVER! Database Tables Table Data Example NameVolumeCylindersMax TorqueMax RPM Ford 4 Cylinder2.648005200 [ ENGINE ] Each instance of the object type is referred to as a record. Each record is visualized as below in two different ways, as graphical and as text. There are two records, one describing a Ford 4 cylinder engine and the other a Ford V-6 engine. NameVolumeCylindersMax TorqueMax RPM Ford V-63.6614007200 [ {Name, Ford 4 Cylinder}, {Volume, 2.6}, {Cylinders, 4}, {Max Torque, 800}, {Max RPM, 5200} ] [ {Name, Ford V-6}, {Volume, 3.6}, {Cylinders, 6}, {Max Torque, 1400}, {Max RPM, 7200} ] RECORD #1 RECORD #2

9 Texas State Technical College DISCOVER! Database Tables Table Composition NameVolumeCylindersMax TorqueMax RPM TextDecimalInteger Ford V-63.6 litre614007200 Ford 4 Cylinder2.6 litre48005200 [ ENGINE ] When we combine the two components, we get something most of us are a little more used to seeing. It is a lot like an Excel spreadsheet, except in a table all the cells or fields in a row are related because they describe one actual object. DEFINITION DATA

10 Texas State Technical College DISCOVER! Database Tables In Summary… The two basic components of tables are the table definition and the table data.The two basic components of tables are the table definition and the table data. Relational databases define object types and store occurrences of that object type through the use of tables.Relational databases define object types and store occurrences of that object type through the use of tables. Tables are composed of fields and records.Tables are composed of fields and records. Fields are used to define the attributes of an object type.Fields are used to define the attributes of an object type. Records are used to store individual occurrences or instances of an object type.Records are used to store individual occurrences or instances of an object type.


Download ppt "Texas State Technical College DISCOVER! Database Tables The building blocks of the relational database."

Similar presentations


Ads by Google