Basics of Dbms
Basics of Dbms
Data within the most common types of databases in operation today is typically
modeled in rows and columns in a series of tables to make processing and data
querying efficient. The data can then be easily accessed, managed, modified,
updated, controlled, and organized. Most databases use structured query
language (SQL) for writing and querying data.
1. It is less expensive.
2. Less risk of data loss.
3. No software specialised person is required.
1. No sharing of data.
2. More chances of inconsistent data.
3. Making correction is very time consuming.
1. More expensive.
2. More risk to data loss.
3. A Software specialised person is required to manage this system.
Databases are widely used in various fields. Some applications are given below :
Attributes : The columns of a relation are the attributes which are also referred as
fields. for example : In the table “Student” given below, there are four attributes.
1 Amit Kumar XI A
4 Simar Singh XI B
Tuple : Each row of data in a relation (table) is called a tuple. It is also known as
record. for example In the table “Student” given above, there are two tuples.
Domain : It is a set of values from which an attribute can take a value in each
row. Usually, a data type is used to specify domain for an attribute. For example,
in “Student” relation given above, the attribute Roll_no takes integer values and
hence its domain is a set of integer values.
Degree : The number of attributes in a relation is called the Degree of the relation.
For example, the relation “Student” given below with four attributes is a relation
of degree 4.
1 Amit Kumar XI A
4 Simar Singh XI B
Cardinality : The number of tuples in a relation is called the Cardinality of the
relation. For example, the cardinality of relation “Student” is 2 as there are 2 tuples
in the table.
1 Amit Kumar XI A
4 Simar Singh XI B
Database Schema : It is the skeleton of the database that represents the structure
(table names and their fields/columns), the type of data each column can hold,
constraints on the data to be stored (if any), and the relationships among the
tables.
Data Constraint : Certain restrictions or limitations on the type of data that can
be inserted in one or more columns of a table during table creation is called data
constraint. Constraints are used to ensure accuracy and reliability of data in the
database.
Queston : Qhat are the Advantages of RDBMS over a Traditional File System ?
File System: A File Management system is a DBMS that allows access to single
files or tables at a time. In a File System, data is directly stored in a set of files. It
contains flat files that have no relation to other files (when only one table is
stored in a single file, then this file is known as a flat file).
Interfaces: DBMS provides different multiple user interfaces like graphical user
interface and application program interface.
Easy Maintenance: DBMS can be is easily maintainable due to its centralized
nature.
Data sharing: The file system does not allow sharing of data or sharing is too
complex. Whereas in DBMS, data can be shared easily due to a centralized
system.
Data concurrency: Concurrent access to data means more than one user is
accessing the same data at the same time.
Data searching: For every search operation performed on the file system, a
different application program has to be written. While DBMS provides inbuilt
searching operations. The user only has to write a small query to retrieve data
from the database.
Data integrity: There may be cases when some constraints need to be applied to
the data before inserting it into the database. The file system does not provide
any procedure to check these constraints automatically. Whereas DBMS
maintains data integrity by enforcing user-defined constraints on data by itself.
System crashing: In some cases, systems might have crashed due to various
reasons. It is a bane in the case of file systems because once the system crashes,
there will be no recovery of the data that’s been lost. A DBMS will have the
recovery manager which retrieves the data making it another advantage over
file systems.
Data security: A file system provides a password mechanism to protect the
database but how long can the password be protected? No one can
guarantee that. This doesn’t happen in the case of DBMS. DBMS has specialized
features that help provide shielding to its data.
Backup: DBMS creates a backup subsystem to restore the data if required.
Data: Basic/raw facts about something which is not organized, for example details
of some students which is not organized.
Data Item: Each piece of information about an entity, such as name of a person
or address, age or name of a product or the price is a Data Item.
Database: A well organised collection of data that ensures safety, security and
integrity of data.
SQL standards are defined by ANSI (American National Standards Institute). SQL
statements are used to retrieve and update data in a database.
SQL works with database programs like MySQL, MS Access, DB2, Informix, MS SQL
Server, Oracle, Sybase, etc. Most of the SQL database programs also have their
own proprietary extensions in addition to the SQL standard.