Chapter 01 Introducing Oracle Database 12c RDBMS Flashcards
What does the database do?
A database collects data, store, and organizes data, and retrieves related data.
What is DBMS and what does it do?
Database management System controls the storage, organization, and retrieval of data.
SQL is the
code and language used to retrieve data from the database.
What is RDBMS and what does it do?
Relational database management system is an organized model of subjects and characteristics that have relationships among the subjects.
3 Characteristics of a Relational Database:
■ Structures are objects that store or access data from the database. Tables, views, and indexes are examples of structures in Oracle.
■ Operations are the actions that are used to define the structures or to manipulate data between the structures. SELECT statements and CREATE statements are examples of operations in Oracle.
■ Integrity rules govern what kinds of actions are allowed on data and the database structure. These rules protect the data and the structure of the database. The primary keys and foreign keys are examples of integrity rules in Oracle.
ER model has [Blank], [Blank], and [Blank].
An ER model has entity, relationship, and attributes.
ER model: Entities and Attributes
An entity in a logical model is much like a noun in grammar—a person, place, or thing. The characteristics of an entity are known as its attributes. Attributes
are detailed information about an entity that serves to qualify, identify, classify, or quantify it.
ER model: Relationships and Unique Identifiers
In the ER model, a solid line represents a mandatory relationship, and a crowfoot represents the “many.” But in some departments, there may not be any employees at all. Optional occurrence is represented by a dotted line.
An entity-relationship (ER) model One-to-One
A one-to-one relationship is one in which each occurrence of one entity is represented by a single occurrence in another entity. For example, product and patent—one product might have a patent, and one patent corresponds to only one product.
An entity-relationship (ER) model One-to-Many
A one-to-many relationship is one in which an occurrence of one entity can be represented by many occurrences in another entity. For example, department and employees—one department has one or more employees, and an employee belongs to only
one department.
An entity-relationship (ER) model Many-to-Many
A many-to-many relationship is one in which an occurrence from one entity can be represented by one or more occurrences in another entity, and an occurrence from the second entity may be represented by one or many occurrences in the first entity.
Many-to-many relationships should not exist in RDBMS because they cannot be properly joined to represent a single row correctly. To solve this, create another entity that has an one-to-many relationship with the first entity and an one-to-many relationship with the second entity. For example, doctor and patient—a patient can visit many doctors, and a doctor can have many patients.
How do you create a physical model?
The physical model is created by taking the logical model and creating a database and database objects to represent the entities and relationships.
In the physical model, each entity becomes a [Blank] and attributes of the entity become columns of the table.
table
When the physical model is being designed from the logical model, which element may
be attributed as a table from the ER diagram?
A. Relationship
B. Attribute
C. Unique identifier
D. Entity
D. When the physical structure is being designed, an entity in the ER diagram may be mapped as a table in the database. An attribute may be mapped as a column, a relationship is the referential integrity, and a unique identifier is the primary key.
In the physical implementation of RDBMS, which database object is used to represent unique identifiers? A. Any constraint B. Index C. Primary key D. Foreign key
C. The relationship between the entities is part of one or more constraints between the tables. The unique identifiers of an entity become the primary key of the table. The relationship between tables becomes the foreign key.