Posts

Showing posts from January, 2018

MySQL

Image
What is MySQL? MySQL is an open source relational database management system (RDBMS) based on Structured Query Language (SQL). MySQL runs on virtually all platforms There are two main components to MySQL: ·          The MySQL database server, mysqld. This is the MySQL DBMS that does the actual work of managing your databases. It runs all the time in the background, accepting connections from client programs, web scripts and so on. ·          Various client and utility programs. These include mysql, the command-line MySQL Monitor client that issues commands to the server. There are many ways to install the MySQL server and associated programs. Here are two ways that you can do it: Ø   Using an official MySQL installation package ·          MySQL Community Server ·          MySQL Cluster ·          MySQL Router ·          MySQL Workbench MySQL Workbench is a cross platform, unified visual tool for data modeling, SQL development, and comprehensive

Entity Relationship Diagram

Image
Entity   Student is an Entity. Attribute A property or characteristic of an entity type. Examples: FirstName, LastName, PhoneNo If the attributes are  composite , they are further divided in a tree like structure Multivalued  attributes are depicted by double ellipse. Example: PhoneNo Derived  attributes are depicted by dashed ellipse. Example: Age Identifier An attribute (or combination of attributes) that uniquely identify individual instances of an entity type Roll_No is an identifier.(Primary Key) Mapping to Relations Student ( Roll_No , Name, Class, Subject) There can be composite identifiers. Mapping to Relations Flight ( Flight_No , Date ) Mapping to Relations Loan ( loan-number , amount) Payment ( loan-number , payment-number , payment-date, payment-amount)

Relational Algebra

Image
Relational Algebra Relational algebra defines the theoretical way of manipulating table contents using the eight relational database operators: SELECT, PROJECT, JOIN, INTERSECT, UNION, DIFFERENCE, PRODUCT, and DIVIDE. UNION combines all rows from two tables, excluding duplicate rows. The tables must have the same attribute characteristics (the no of columns, the names of columns and domains must be identical. Those tables are said to be union compatible tables)   INTERSECT yields only the rows that appear in both tables.( The tables must be union-compatible) DIFFERENCE yields all rows in one table that are not found in the other table. it subtracts one table from the other ( The tables must be union-compatible) PRODUCT yields all possible pairs of rows from two tables—also known as the Cartesian product. Therefore, if one table has six rows and the other table has three rows, the PRODUCT yields a list composed of 6 × 3= 18 rows. SELECT, also known as RES

Data Models

Image
Data Abstraction Levels External Model The external model is the end users’ view of the data environment. The term end users refers to people who use the application programs to manipulate the data and generate information. ER diagrams will be used to represent the external views. A specific representation of an external view is known as an external schema . Conceptual Model A conceptual model is graphically represented by an ERD. It integrates all external views (entities, relationships, constraints, and processes) into a single global view of the entire data in the enterprise. Also known as a conceptual schema Internal Model The internal model requires the designer to match the conceptual model’s characteristics and constraints to those of the selected implementation model. Physical Model The physical model operates at the lowest level of abstraction, descr

Data Models

Image
Data Model A data model is a relatively simple representation, usually graphical, of more complex real-world data structures. Data Models Basic Building Blocks o    An entity represents a particular type of object in the real world . Each entity occurrence is unique and distinct o    An attribute is a characteristic of an entity. o    A relationship describes an association among entities. §   One-to-many (1:M or 1..*) relationship . A painter paints many different paintings, but each one of them is painted by only one painter.. §   Many-to-many (M:N or *..*) relationship . A student may learn many subjects, and each subject may be learned by many students §   One-to-one (1:1 or 1..1) relationship . A company’s management structure may require that each of its stores be managed by a single employee. In turn, each store manager, who is an employee, manages only a single store. o    A constraint is a restriction placed on the data. Types of Data Models