





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






Data – it is raw, unorganised facts that need to be processed. Data can be something simple, random and useless until it is organised. Eg: individual students test score
Information - When data is processed, organised, structured or presented in a given context to make it useful. Eg: average score of a class
Structured data or quantitative data – it is the type of data that fits nicely into a relational database. It’s highly organized and easily analysed. Most IT staff are used to working with structured data.
When you think of structured data, think of things that would sit nicely in a spreadsheet.
Dates Phone numbers ZIP codes Customer names Product inventories Point-of-sale (POS) transaction information
It’s inherent structure and orderliness makes it simple to query and analyse. Common applications that rely on structured data in relational databases include CRM, ERP and POS systems.
Unstructured data or qualitative data - it is just the opposite. It doesn’t fit nicely into a spreadsheet or database. It can be textual or non-textual. It can be human- or machine- generated. Examples of unstructured data include
Media: Audio and video files, images Text files: Word docs, PowerPoint presentations, email, chat logs Email: There’s some internal metadata structure, so it’s sometimes called semi- structured, but the message field is unstructured and difficult to analyse with traditional tools. Social Media: Data from social networking sites like Facebook, Twitter and LinkedIn Mobile data: Text messages, locations Communications: Chat, call recordings
Data Process^ Information
Those examples are largely human-generated, but machine-generated data can also be unstructured: satellite images, scientific data, surveillance images and video, weather sensor data.
A database is a collection of information that is organized so that it can be easily accessed, managed and updated. Computer databases typically contain aggregations of data records or files, containing information about sales transactions or interactions with specific customers.
In other words database is used by an organisation as a method of storing, managing and retrieving information. Modern databases are managed using a database management system (DBMS)
Eg: student database, stock database
File oriented system
Database Approach
DBMS were first introduced in 1960’s and have continued to evolve during subsequent decades. Three objectives that always considered when developing database technology. To provide greater independence between programs and data To manage complex data types and structures To provide easier and faster access to data for non-computer professionals
There are 5 database models Flat file system A system of organizing files in an operating system in which all files are stored in a single directory. There are directories and subdirectories and different files can have the same name as long as they are stored in different directories, in a flat file system every file must have a different name because there is only one list of files Flat file system should not be confused with flat file.
Hierarchical model
Organised as a tree structure (simple) Always have one-to-many relationships Top most record is the parent record (root) Whole database is depends on the root record Data can be accessed using pointers Data records can be duplicated Single access path for a data record Need to write complex queries to get information from multiple branches.
Root
Network model
Organised as a network structure (complex) Always have many-to-many relationships Many records at the top level Database does not depends on the root record Data can be accessed using pointers Data records can be duplicated Multiple access paths for a data record Can write simple queries to get information from multiple branches (cross links are available).
Relational model
Data is stored in tables called relations.
Relations can be normalized.
In normalized relations, values saved are atomic values.
Data integrity
Cannot insert the information of a child who does not have any parent. Multiple occurrences of child records which lead to problems of inconsistency during the update operation. Deletion of parent results in deletion of child records
Does not suffer from any insertion anomaly. Free from update anomalies. Free from delete anomalies
Does not suffer from any insert anomaly. Free form update anomalies. Free from delete anomalies
Relations / Tables
Member details
Relationships
A relationship, in the context of databases, is a situation that exists between two relational database tables when one table has a foreign key that references the primary key of the other table. Relationships allow relational databases to split and store data in different tables, while linking disparate data items.
Types of Constraints Constraints are the rules enforced on the data columns of a table. These are used to limit the type of data that can go into a table. This ensures the accuracy and reliability of the data in the database.
Constraints could be either on a column level or a table level. The column level constraints are applied only to one column, whereas the table level constraints are applied to the whole table.
Relation/table
Attribute/ column/Field
Row/Tuple /Record
Commonly used constraints A NOT NULL Constraint By default, a column can hold NULL values. If you do not want a column to have a NULL value, then you need to define such a constraint on this column specifying that NULL is now not allowed for that column.
A Unique Constraint The UNIQUE Constraint prevents two records from having identical values in a column. In the CUSTOMERS table, for example, you might want to prevent two or more people from having an identical age.
CREATE TABLE CUSTOMERS( ID INT NOT NULL, NAME VARCHAR (20) NOT NULL, AGE INT NOT NULL UNIQUE, ADDRESS CHAR (25) , SALARY DECIMAL (18, 2), PRIMARY KEY (ID) );
A Primary Key Constraint A primary key is a field in a table which uniquely identifies each row/record in a database table. Primary keys must contain unique values. A primary key column cannot have NULL values. A table can have only one primary key, which may consist of single or multiple fields. When multiple fields are used as a primary key, they are called a composite key. If a table has a primary key defined on any field(s), then you cannot have two records having the same value of that field(s).
CREATE TABLE CUSTOMERS( ID INT NOT NULL, NAME VARCHAR (20) NOT NULL, AGE INT NOT NULL, ADDRESS CHAR (25) , SALARY DECIMAL (18, 2), PRIMARY KEY (ID) );