A database management system is computerized records keeping system. It is a software that defines, manipulates and manage the database. It allows to access the files, update the records and retrieve data as requested. In other words, DBMS, is defined as the collection of interrelated data and a set of programs to access those data.
Purpose of Database
A database should be a repository of data needed for an organization's data processing. That data should be accurate, private, and protected from damage. It should be accurate so that diverse applications with different data requirements can employ the data. Different application programmers and various end-users have different views upon data, which must be derived from a common overall data structure. Their methods of searching and accessing of data will be different.
Advantages of Using Database
- Database minimizes data redundancy to a great extent.
- The database can control the inconsistency of data to a large extent.
- Sharing of data is also possible using the database.
- Database enforce standards.
- The use of Databases can ensure data security.
- Integrity can be managed using the database.
Various Levels of Database Implementation
The database is implemented through three general levels. These levels are:
- Internal Level or Physical level
- Conceptual Level
- External Level or View Level
The Concept of Data Independence
As the database may be viewed through three levels of abstraction, any change at any level can affect other levels' schemas. Since the database keeps on growing, then there may be frequent changes at times. This should not lead to redesigning and re-implementation of the database. The concepts of data independence prove beneficial in such types of contexts.
- Physical data independence
- Logical data independence
Basic Terminologies Related to Database and SQL
Relation: In general, a relation is a table, i.e., data is arranged in rows and columns. A relation has the following properties:
- In any given column of a table, all the items are of the same kind, whereas items in different columns may not be of the same kind.
- For a row, each column must have an atomic value, and also for a row, a column cannot have more than one value.
- All rows of a relation are distinct.
- The ordering of rows in a relationship is immaterial.
- The column of a relation are assigned distinct names, and the ordering of these columns is immaterial.
Tuple: The rows of tables in a relationship are generally termed as Tuples.
Attributes: The columns or fields of a table is termed as Attributes.
Degree: The number of attributes in a relation determines the degree of relation. A relation having three attributes is said to have a relation of degree 3.
Cardinality: The number of tuples or rows in a relation is termed as cardinality.