Podcast
Questions and Answers
Which of the following is a component of the relational database model?
Which of the following is a component of the relational database model?
- Object-oriented programming paradigm
- Hierarchical data structure
- Network of interconnected nodes
- Relations implemented through tables (correct)
In a relational database, how are relations organized within tables?
In a relational database, how are relations organized within tables?
- As a collection of linked lists
- As a three-dimensional cube
- As rows and columns (correct)
- As a single, continuous string of characters
Which of the following best describes the term 'attribute' in the context of a relational database?
Which of the following best describes the term 'attribute' in the context of a relational database?
- A named column of a relation. (correct)
- A data entry constraint imposed upon a column.
- A relationship between two tables.
- A specific value within a row.
What does a 'record' represent in a typical relational database?
What does a 'record' represent in a typical relational database?
What is the 'domain' of an attribute in a relational database?
What is the 'domain' of an attribute in a relational database?
Which statement accurately describes a characteristic of relational tables?
Which statement accurately describes a characteristic of relational tables?
Why is the order of rows and columns immaterial to the DBMS?
Why is the order of rows and columns immaterial to the DBMS?
Why must each table have an attribute that uniquely identifies each row?
Why must each table have an attribute that uniquely identifies each row?
Which of the following is a critical feature of a relational database regarding data values within a column?
Which of the following is a critical feature of a relational database regarding data values within a column?
What is the significance of each cell containing only an atomic value in a relational table?
What is the significance of each cell containing only an atomic value in a relational table?
What is the 'cardinality' of a relation?
What is the 'cardinality' of a relation?
In database terminology, what does the 'degree' of a relation refer to:
In database terminology, what does the 'degree' of a relation refer to:
Which type of key is composed of more than one attribute?
Which type of key is composed of more than one attribute?
What is the primary function of a 'foreign key' in a relational database?
What is the primary function of a 'foreign key' in a relational database?
What is the role of 'functional dependence' in the context of database keys?
What is the role of 'functional dependence' in the context of database keys?
Why should nulls be avoided in a database?
Why should nulls be avoided in a database?
What is 'Controlled redundancy' in relational databases?
What is 'Controlled redundancy' in relational databases?
What does entity integrity primarily ensure in a relational database?
What does entity integrity primarily ensure in a relational database?
What is the key focus of referential integrity in relational databases?
What is the key focus of referential integrity in relational databases?
Which of the following describes a scenario where referential integrity is maintained?
Which of the following describes a scenario where referential integrity is maintained?
For what purpose is a 'data dictionary' used in database management?
For what purpose is a 'data dictionary' used in database management?
Which of the following is typically included in a data dictionary?
Which of the following is typically included in a data dictionary?
What is a 'system catalog' in the context of a database management system (DBMS)?
What is a 'system catalog' in the context of a database management system (DBMS)?
Which of the following best describes an 'index' in the context of databases??
Which of the following best describes an 'index' in the context of databases??
What is a 'unique index'?
What is a 'unique index'?
Which type of relationship is generally considered the 'norm' in relational database design?
Which type of relationship is generally considered the 'norm' in relational database design?
Why are Many-to-many (:) relationships difficult to implement directly in a relational model?
Why are Many-to-many (:) relationships difficult to implement directly in a relational model?
In what way can : relationships be changed to be implemented?
In what way can : relationships be changed to be implemented?
According to Codd's rules, how should changes to physical access methods and storage structures affect application programs?
According to Codd's rules, how should changes to physical access methods and storage structures affect application programs?
Which of Codd's 12 rules emphasizes that the end users and application programs should be unaware and unaffected by the data location?
Which of Codd's 12 rules emphasizes that the end users and application programs should be unaware and unaffected by the data location?
Among Codd's 12 rules, what crucial principle does 'Rule Zero' establish for a database to qualify as relational?
Among Codd's 12 rules, what crucial principle does 'Rule Zero' establish for a database to qualify as relational?
What is the significance of adhering to Codd's 12 rules for relational databases?
What is the significance of adhering to Codd's 12 rules for relational databases?
According to Codd's rules, how should nulls be handled in a relational database?
According to Codd's rules, how should nulls be handled in a relational database?
What does Codd's rule of 'Guaranteed Access' ensure in a relational database?
What does Codd's rule of 'Guaranteed Access' ensure in a relational database?
How are rows (tuples) different from columns (attributes) in a relation?
How are rows (tuples) different from columns (attributes) in a relation?
Why is it important that each row (tuple) in a relational table is distinct?
Why is it important that each row (tuple) in a relational table is distinct?
What is implied by a '1:1 relationship' between two entities in a relational database system?
What is implied by a '1:1 relationship' between two entities in a relational database system?
What are the limitations of direct implementations of the Many-To-Many relationships?
What are the limitations of direct implementations of the Many-To-Many relationships?
Flashcards
What is a relation?
What is a relation?
A structure with columns and rows in a database.
What is an attribute?
What is an attribute?
A named column in a relation(table).
What is a record?
What is a record?
A logically connected set of fields describing a person, place, or thing.
What is a domain?
What is a domain?
Signup and view all the flashcards
What does each row (tuple) represent?
What does each row (tuple) represent?
Signup and view all the flashcards
What does each table column represent?
What does each table column represent?
Signup and view all the flashcards
What is in a cell?
What is in a cell?
Signup and view all the flashcards
What values does a column conform to?
What values does a column conform to?
Signup and view all the flashcards
What uniquely identifies each row?
What uniquely identifies each row?
Signup and view all the flashcards
What is a Relational schema?
What is a Relational schema?
Signup and view all the flashcards
What is cardinality?
What is cardinality?
Signup and view all the flashcards
What is degree?
What is degree?
Signup and view all the flashcards
What do keys consisit of?
What do keys consisit of?
Signup and view all the flashcards
What is a candidate key?
What is a candidate key?
Signup and view all the flashcards
What is a primary key?
What is a primary key?
Signup and view all the flashcards
What is a composite key?
What is a composite key?
Signup and view all the flashcards
What is foreign key?
What is foreign key?
Signup and view all the flashcards
Meaning of nulls
Meaning of nulls
Signup and view all the flashcards
Meaning of controlled redundancy
Meaning of controlled redundancy
Signup and view all the flashcards
What is entity integrity?
What is entity integrity?
Signup and view all the flashcards
What is Referential integrity?
What is Referential integrity?
Signup and view all the flashcards
What is a Data dictionary?
What is a Data dictionary?
Signup and view all the flashcards
What is a System catalogue?
What is a System catalogue?
Signup and view all the flashcards
What is an Index?
What is an Index?
Signup and view all the flashcards
What is a Unique index?
What is a Unique index?
Signup and view all the flashcards
1:* relationship
1:* relationship
Signup and view all the flashcards
1:1 Relationship
1:1 Relationship
Signup and view all the flashcards
: Relationship
: Relationship
Signup and view all the flashcards
What are Codd's Relational Database Rules
What are Codd's Relational Database Rules
Signup and view all the flashcards
Study Notes
Relational Database Model Basics
- The relational database model is a logical view of data
- The model's basic components are relations that are implemented through tables in a relational Database Management System (DBMS)
- Relations are structured in tables that are composed of rows and columns
Relational Data Structure
- A relation is a table containing columns and rows
- An attribute is a named column within a relation
- A record is a logically connected set of single or multiple fields with info on a person, place, or thing
- A domain is the set of allowable values for a number of attributes
Relational Table Characteristics
- A table is a two-dimensional structure composed of rows and columns
- Each row (tuple) represents a single entity and must be distinct
- Each table column signifies an attribute with a distinct name
- Each cell should contain an atomic value
- All values in a column must conform to the same data format
- Each column has a specific range of values known as the attribute domain
- The order of the rows and columns is immaterial to a DBMS
- Each table must have an attribute that uniquely identifies each row
Relational Schema
- This is a textual representation of database tables
- Each table is described by its name and list of attributes in parentheses
- Example: Student (Stud_Num, FirstName, Surname, Age)
Cardinality and Degree
- The cardinality of a relation is the number of rows
- The degree of a relation is the number of attributes or columns
Keys in Relational Databases
- Keys consist of one or more attributes that determine other attributes
- A candidate key is an attribute determining all other attributes in the relation, and the primary key is chosen from these
- Primary key (PK) is an attribute that uniquely identifies a row
- Composite key is a key composed of more than one attribute
- Foreign key (FK) is an attribute whose values match primary key values in the related table
Key Determination
- A key's role is based on determination
- If the value of attribute A is known, then you can determine the value of attribute B
- Example: A → B (Student number → Student name)
- Functional dependence is when Attribute B is functionally dependent on attribute A
- Each value in a column A determines one and only one value in column B
Nulls
- Nulls are essentially no data entry
- Nulls are not permitted in primary key attributes
- Nulls are generally avoided in other attributes
- Nulls can represent:
- An unknown attribute value
- A known but missing attribute value
- A "not applicable" condition
- Nulls can create issues using the COUNT, AVERAGE, and SUM functions
Redundancy
- Tables share primary/foreign keys that enable tables to be linked together
- Multiple occurrences of values in a table are not redundant when they are required to make the relationship work.
- Redundancy exists only when attribute values are duplicated when they shouldn't
- Having a foreign key controls redundancy, and means attributes aren't unnecessarily duplicated
Integrity in a Relational Database
- Entity integrity ensures that each row is uniquely identified by the primary key
- A proper search for an existing row will always be successful
- Failure to find a match means the specified row does not exist
- Referential integrity concerns how tables reference each other
- Achieved through the foreign key (FK)
- FK can be null or be a valid entry in the table to which it is related
Data Dictionary
- This provides detailed accounting of all tables inside the database
- It includes all the attribute names and characteristics for each table in the system, which is known as metadata
System Catalogue
- This is a detailed system data dictionary:
- Describes all objects within the database
- Contains data about table names, creator, creation date, and other relevant properties
- DBMS provides a system catalogue from which the database designer can construct his/her data dictionary
Indexes
- Indexes provide a way to logically access rows in a table, like finding a book in the library or a topic in the book
- An index has an index key and a set of pointers where:
- Index key provides a reference point
- Pointers are identifiers that point to the data location identified by the key
- A unique index specifies each index key has only one pointer value associated with it
Relationships within a Relational Database
- 1:* relationship
- The Relational modeling ideal
- Should be the norm in any relational database design
- 1:1 relationship
- Should be rare in any relational database design
- : relationships
- Cannot be implemented as such in the relational model
- Can be changed into two 1:* relationships
Codd's Relational Database Rules
- Published a list of 12 rules in 1985 to define a relational database system
- Many vendors are marketing products as "relational" even though those products did not meet minimum relational standards
- Information - All data must be stored in tables
- Guaranteed Access - Access every value using Table + Column + Key
- Systematic treatment of nulls - Nulls must be represented systematically
- Dynamic on-line catalogue based on the relational model - The metadata must be stored and managed as ordinary data
- Comprehensive data sublanguage - The relational database must support a declarative language.
- View updating - Any view that is theoretically updatable must be updatable through the system
- High-level insert, update and delete - Database must support set-level inserts, updates and deletes
- Physical data independence - Application programs are logically unaffected by physical access methods
- Logical data independence - Application programs are logically unaffected by table structure changes that preserve original table values
- Integrity independence - Relational integrity constraints must be definable in the relational language
- Distribution independence - All relational integrity constraints must be definable in the relational language
- Non-subversion - There must not be a way to bypass the integrity rules of the database
- Rule Zero - For a database to be considered relational, it must use its relational facilities exclusively to manage the database
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.