CP330-week_3_lecture_notes

CP330-week_3_lecture - CP330-Database Management Systems Week 3 Lecture notes Relational Databases A relation is a two-dimensional table with

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CP330-Database Management Systems Week 3 Lecture notes Relational Databases A relation is a two-dimensional table with specific properties. These properties include: Entries in the table are single-valued. Each column has a distinct name. All values in a column are values of the same attribute. The order of the columns is immaterial. Each row is distinct. The order of the rows is immaterial. If a structure contains entries that are not single-valued (repeating groups occur), then the structure is called an unnormalized relation. Use Figure 2.2 to discuss each of the six properties of a relation. Mention that the formal term for a table is relation, and the formal term for a row is tuple. A relational database is a collection of tables. Formally, the tables are called relations. In a relational database, each entity is stored in its own table and the attributes of the entity become fields or columns in the table. Relationships are implemented through common columns in two or more tables. To make each row distinct, one or more columns must uniquely identify a given row in a table. This column or collection of columns is called the primary key. When two or more tables in a database use the same column name, qualify the column name, that is, combine the table name and the column name. Quick Quizzes 1. Rows in a table are often called records or _____. Answer: tuples 2. A(n) _____ is a collection of relations. Answer: relational database 3. The column or collection of columns that uniquely identify a given row in a table is called the _____ . Answer: primary key Query-By-Example (QBE) A query is simply a question represented in a way that a DBMS can recognize and process. When students search for an article or book at the library or do a search on the Web, they really are querying a database. Query-By-Example
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/18/2011 for the course CP 330 taught by Professor Kate during the Spring '11 term at Monroe CC.

Page1 / 4

CP330-week_3_lecture - CP330-Database Management Systems Week 3 Lecture notes Relational Databases A relation is a two-dimensional table with

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online