- Database :
- Structured assembly of logically related data
- Self-describing collection of integrated records
- It is the data dictionary that makes data independence possible
- It is a software program used to store, delete, update and retrieve data.
- Limited to a single desktop computer. E.g. Sybase, Microsoft SQL Server, Oracle RDBMS, PostgreSQL, MySQL, etc.
- Data field :
- A space allocated for a particular item of information.
- Fields are the smallest units of information you can access.
- It contains a single piece of information (first name, family name, employee number, salary).
- A collection of data fields comprise a record such as, in this example, an employee record.
- Database record:
- Composed of fields, each of which contains one item of information.
- Data structure:
- Refers to the overall design for records in a database.
- Present a uniform format to facilitate information exchange.
- It is a scheme for organizing related pieces of information.
- The basic types of structures include files, lists, arrays, records, trees, tables.
- There are three basic database models:
- Hierarchical databases exhibit a branching structure, with information arranged into sets and sub-sets; getting to a particular piece of data may require going through several vertically ordered files.
- Network databases offer many more direct connections between files, but, similar to hierarchies, the links are predefined and are difficult to change or adjust.
- Object-oriented databases link self-contained entities (or objects) together. Objects can be text, a picture, a piece of film, or any item that can be individually selected and manipulated. These are useful for organizing large amounts of disparate information.
- A relational database spreads information across different tables while maintaining links between them. A relational database stores facts in tables called relations.
Advantages of Database Management Systems
- Warehouse of Information: A large amount of data can be stored. Examples in commercial applications are inventory data, personnel data, etc.
- Defining Attributes: The unique data field in a table is assigned a primary key. The primary key helps in the identification of data. It also checks for duplicates within the same table, reducing data redundancy. There are tables, which have a secondary key. The secondary key is also called the ‘foreign key’. The secondary key refers to the primary key of another table, thus establishing a relationship between the two tables.
- Systematic Storage: The data is stored in the form of tables. The tables consist of rows and columns. The primary and secondary keys help to eliminate data redundancy, thus enabling systematic storage of data.
- Changes to Schema: The table schema can be changed and it is not platform dependent. The tables in the system can be edited to add new columns and rows without hampering the applications that depend on that particular database.
- No Language Dependence: It can be used with various languages and on various platforms.
- Joining / Merging Tables: The data in two or more tables can be integrated into a single table. This enables to reduce the size of the database and helps in easy retrieval of data.
- Multiple Simultaneous Usages: The database can be used simultaneously by a number of users. Various users can retrieve the same data simultaneously. The data in the database can also be modified, based on the privileges assigned to users.
- Data Security: Database management systems help to keep the data secured.
- Privileges: Different privileges can be given to different users. Some users, for example, can edit the database but are not allowed to delete the contents of the database.
- Abstract view of Data and Easy retrieval: A database user can view only the abstract form of data; it exists in a user-friendly format.
- Data Consistency: It ensures a consistent view of data to every user. It includes the accuracy, validity, and integrity of related data. The data in the database must satisfy certain consistency constraints. When the database is updated, these constraints are checked by the database systems.