Computer Science, asked by san8085, 1 year ago

explain database and its concepts

Answers

Answered by Anonymous
3
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 data.

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

Database tables

In a relational database, all data is held in tables, which are made up of rowsand columns.

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

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 one value for each column.

Each value for a given column has the same type.

When you are designing your database, make sure that each table in the database holds information about a specific thing, such as employees, products, or customers.

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

A relational database is a set of related tables. You use primary and foreign keys to describe relationships between the information in different tables.

Primary and foreign keys

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

Tables have a primary key

All tables in a relational database should have a primary key. The primary key is a column, or set of columns, that allows each row in the table to be uniquely identified. No two rows in a table with a primary key can have the same primary key value.

If no primary key is assigned, all the columns together become the primary key. It is good practice to keep your primary key for each table as compact as possible.

Examples

In a table holding information about employees, the primary key may be an ID number assigned to each employee.

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

An order number, identifying the order the item is part of

A line number, identifying each item on any order

A product ID, identifying the product being ordered

A quantity, showing how many items were ordered

A ship date, showing when the order was shipped

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 like 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 physical location at which the row of data containing the indexed value is stored.
Indexes are an important design element for high performance, however their use is transparent to the user.

Views Views are computed tables, or virtual tables. They look like tables to client applications, but they do not hold data. 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 take parameters. For example, you might create a stored procedure that returns the names of all customers who have spent more than the amount that you specify as a parameter in the 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 associate a trigger with a table or columns within a table. Triggers are useful for automatically maintaining business rules in a database.

Users and groups Each user of a database has a user ID and password. You can set permissions for each user, so that confidential information is kept private and users are prevented from making unauthorized changes. Users can be assigned to groups, in order to make the administration 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.



hope it helps u mate.....
pls mark me brainliest

san8085: Thanks
tyagishanu28: Out standing answer
tyagishanu28: Tq for this answer
Answered by MysticalStar07
7

Answer:

IF IT HELPS YOU PLEASE MARK AS BRAINLIEST

Attachments:
Similar questions