Chapter 07 Creating Tables and Constraint Flashcards

1
Q

What is a constraint?

A

A constraint can be considered as a rule or policy defined in the database to enforce data integrity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a table?

A

A table is defined with columns, and it stores rows of data. A table should have
at least one column. In Oracle, a table normally refers to a relational table. You can also
create object tables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a view?

A

A view is a customized representation of data from one or more tables and/or views.
Views are used as windows to show information from tables in a certain way or to restrict
the information. Views are queries stored in the database that select data from one or more
tables. Unlike tables, views do not store data—they can be considered as stored queries. They also provide a way to restrict data from certain users, thereby providing an additional
level of security

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is an Index?

A

An index is a structure associated with tables used to speed up the queries. An index is
an access path to reach the desired row faster. Creating/
dropping indexes does not affect the storage of data in the underlying tables. You can create
unique or nonunique indexes. Unique indexes are created automatically by Oracle when you
create a primary key or a unique key constraint in a table. A composite index has more than
one column in the index.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a schema?

A

A schema is a collection of database objects owned by a single user. For example, a schema
can have tables, views, triggers, synonyms, and PL/SQL programs such as procedures. A
schema is owned by a database user and has the same name as the user. If the database user
does not own any database objects, then no schema is associated with the user. A schema is
a logical grouping of database objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a Trigger?

A

A trigger is a stored PL/SQL program that is executed when a specified condition
occurs. A trigger can be defined on a table to “fire” when an insert, update, or delete operation
occurs on the table. A trigger may also be defined on the database to “fire” when certain
database conditions occur, such as starting the database, or when a database error occurs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is PL/SQL Programs?

A

PL/SQL stored programs include procedures, functions, and packages.
A procedure is a PL/SQL programmatic construct. A function is similar to a procedure but
always returns a value. A package is a grouping of related PL/SQL objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly