banner



Which Of The Following Is A Database That Stores Data In Tables That Consist Of Rows And Columns?

Chapter 2 Database Terms and Concepts


Relational database concepts

A relational database management system (RDBMS) stores and retrieves data that is represented in tables. A relational database consists of a collection of tables that store interrelated information.

This department introduces some of the terms and concepts that are important in talking near relational databases.

Database tables

In a relational database, all data is held in tables, which are fabricated up of rows and columns.

Each table has ane or more than columns, and each column is assigned a specific datatype, such as an integer number, a sequence of characters (for text), or a appointment. Each row in the table has a value for each column.

A typical fragment of a table containing employee data may wait equally follows:

emp_ID

emp_lname

emp_fname

emp_phone

10057

Huong

Zhang

1096

10693

Donaldson

Anne

7821

The tables of a relational database have some important characteristics:

  • There is no significance to the order of the columns or rows.
  • Each row contains one and only i value for each cavalcade.
  • Each value for a given cavalcade has the same type.

The post-obit table lists some of the formal and informal relational database terms describing tables and their contents, together with their equivalent in other nonrelational databases. This transmission uses the breezy terms.

Formal relational term

Informal relational term

Equivalent nonrelational term

Relation

Table

File

Attribute

Column

Field

Tuple

Row

Tape

When yous are designing your database, brand sure that each table in the database holds information nearly a specific affair, such as employees, products, or customers.

By designing a database this way, you can set up a construction that eliminates redundancy and inconsistencies. For instance, both the sales and accounts payable departments may look upwardly information about customers. In a relational database, the information about customers is entered but once, in a table that both departments can access.

A relational database is a gear up of related tables. Y'all use primary and foreign keys to describe relationships between the data in different tables.

Primary and foreign keys

Master and foreign keys define the relational structure of a database. These keys enable each row in the database tables to exist identified, and define the relationships between the tables.

Tables accept a primary key

All tables in a relational database should have a chief key. The principal central is a column, or set of columns, that allows each row in the tabular array to exist uniquely identified. No two rows in a table with a main key can have the same primary fundamental value.

If no chief cardinal is assigned, all the columns together become the primary central. It is good practice to proceed your primary central for each table as compact equally possible.

Examples

In a tabular array holding data nearly employees, the primary central may be an ID number assigned to each employee.

In the sample database, the table of sales lodge items has the following columns:

  • An club number, identifying the lodge the item is role of
  • A line number, identifying each item on whatsoever social club
  • A product ID, identifying the production beingness ordered
  • A quantity, showing how many items were ordered
  • A send date, showing when the order was shipped

To identify a particular item, both the gild number and the line number are required. The main key is made up of both these columns.

Tables are related by foreign keys

The information in 1 tabular array is related to that in other tables by foreign keys.

Case

The sample database has one tabular array belongings employee data and one table holding section information. The department table has the following columns:

  • dept_id An ID number for the department. This is the primary key for the table.
  • dept_name A column property the name of the department.
  • dept_head_id The employee ID for the section manager.

To find the name of a particular employee'due south section, there is no demand to put the name of the employee's department into the employee table. Instead, the employee table contains a column holding the department ID of the employee'southward department. This is called a foreign fundamental to the department table. A strange key references a particular row in the table containing the corresponding primary key.

In this example, the employee tabular array (which contains the strange key in the human relationship) is called the foreign table or referencing table. The department tabular array (which contains the referenced main key) is called the principal tabular array or the referenced tabular array.

Other database objects

A relational database holds more than a set of related tables. Among the other objects that make up a relational database are:

  • Indexes Indexes allow quick lookup of information. Conceptually, an index in a database is similar an index in a book. In a book, the index relates each indexed term to the page or pages on which that word appears. In a database, the index relates each indexed column value to the concrete location at which the row of data containing the indexed value is stored.
    Indexes are an of import design element for loftier performance, nevertheless their apply is transparent to the user.
  • Views Views are computed tables, or virtual tables. They look like tables to customer applications, but they do not hold information. Instead, whenever they are accessed, the information in them is computed from the underlying tables.
    The tables that actually hold the information are sometimes called base tables to distinguish them from views.
  • Stored procedures and triggers These are routines held in the database itself that act on the information in the database.
    You can create and name your own stored procedures to execute specific database queries and to perform other database tasks. Stored procedures can have parameters. For example, you lot might create a stored procedure that returns the names of all customers who have spent more than the amount that you lot specify as a parameter in the phone call to the procedure.

    A trigger is a special stored procedure that automatically fires whenever a user updates, deletes, or inserts data, depending on how you define the trigger. You lot associate a trigger with a table or columns inside a table. Triggers are useful for automatically maintaining business organisation rules in a database.

  • Users and groups Each user of a database has a user ID and password. Y'all can prepare permissions for each user, so that confidential information is kept private and users are prevented from making unauthorized changes. Users tin be assigned to groups, in social club to brand the assistants of permissions easier.
  • Java objects You can install Java classes into the database. Java classes provide a powerful way of building logic into your database, and a special class of user-defined datatypes for holding information.

Queries

Remember data from a database using the SELECT argument. The bones query operations in a relational organization are projection, brake, and join. The SELECT statement implements all of these operations.

A project is a subset of the columns in a table. A restriction (too called selection) is a subset of the rows in a table, based on some conditions.

For example, the following SELECT argument retrieves the names and prices of all products that price more than than $xv:

SELECT name, unit_price
FROM product
WHERE unit_price > 15

This query uses both a brake (WHERE unit_price > 15) and a project (SELECT name, unit_price)

A Join links the rows in two or more than tables past comparing the values in key columns and returning rows that have matching values. For example, you may want to select the particular identification numbers and product names for all items for which more than than a dozen has been shipped:

SELECT sales_order_items.id, product.proper noun
FROM product KEY JOIN sales_order_items
WHERE sales_order_items.quantity > 12

The product table and the sales_order_items table are joined together based on the foreign key relationships betwixt them.

Other SQL statements

You can do more with SQL than just query. SQL includes statements that create tables, views, and other database objects. It besides includes statements that modify tables and commands that perform many other database tasks discussed in this transmission.

The system tables

Every database contains a set up of organisation tables, which are special tables that the system uses to manage information and the system. These tables are sometimes called the data dictionary or the system catalog.

System tables contain information about the database. Yous never alter the system tables directly in the way that you tin can alter other tables. The system tables hold information about the tables in a database, the users of a database, the columns in each tabular array, and so on. This information is data about data, or metadata.


Copyright © 2000 Sybase, Inc. All rights reserved.

Which Of The Following Is A Database That Stores Data In Tables That Consist Of Rows And Columns?,

Source: https://www.upi.pr.it/docs/easfg/easvrfgp7.htm

Posted by: westwelition.blogspot.com

0 Response to "Which Of The Following Is A Database That Stores Data In Tables That Consist Of Rows And Columns?"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel