Skip to main content

Posts

Introdution to C

Introduction to C C Language is a powerful programming language developed by Dennis Ritchie at Bell Laboratories in 1970. C Language is a general purpose high-level language. Most of its principles and ideas were taken from the earlier language B, BCPL and CPL. CPL (Common Programming Language) was developed jointly between the Mathematical Laboratory at the University of Cambridge and the University of London Computer Unit in 1960s.CPL was too large for use in many applications. In 1967, BCPL (Basic Combined Programming Language) was created as a scaled down version of CPL retaining its basic features by Martin Richards. Ken Thompson at Bell Labs, USA wrote his own variants of BCPL and called it B. In due course, the designers of UNIX modified it to produce a programming language called C. In 1970, a co-worker of Ken Thompson, Dennis Ritchie developed C Language by taking some of the generality found in BCPL and the B language into a more powerful language called C. Ninety percent ...

Record Based Logical Models

Record based Logical Models are used in describing data at the conceptual level and view level. They are used to specify the overall logical structure of the database and to provide a higher level description of implementation. Record based models are so called because the database is structured as fixed format records of several types. Each record type defines a fixed number of fields (or attributes) and each field is of fixed length. Record based data models do not include a mechanism for the direct representation of code in the database. But there will be separate languages that are associated with the models to express database queries and update. The three data models are Relational, Network and Hierarchical. RELATIONAL DATA MODEL The relational model represent data and relationship among data by a collection of tables, each of which has a number of columns with unique names. The entities and their relationship(in the ER model) are represented as two-dimensional tables. The mathem...

Generalisation and Specialisation

GENERALISATION Consider the account entity set with attributes accno and balance. Each account can be classified as SAVINGS ACCOUNT or CURRENT ACCOUNT. Each of these is described by a set of attributes which include all the attributes of the account entity set PLUS some additional attributes , SAVINGS ACCOUNT entities are described by the attribute INTEREST RATE ,while CURRENT ACCOUNT are described by the attribute OVER DRAFT AMOUNT. There are similarities between the current account entity set and the saving account entity set in the sense that they have several attributes in common . This commonality can be expressed by generalization. Generalization is a containment relationship that exist between a higher level entity set and one or more lower level entity sets .Here the ACCOUNT is the higher level entity and SAVINGS ACCOUNT & CURRENT ACCOUNT are LOWERLEVEL ENTITY SETS. In an ER diagram generalization is represented by a triangular component labeled “ISA" it stands for ...

Codd's Rule- Fully relatoinal DBMS

CODD’s RULES The founder of the relational data base theory Dr. E F Codd has outlined twelve rules (modified to 333 rules) to test whether a product that is claimed to be fully relational really is an RDBMS. The twelve rules are based on a single foundation principle which is called as rule zero. RULE ZERO : For any system that is claimed to be RDBMS, that system must be able to manage databases entirely through its relational capabilities. RULE ONE Information representation All information in RDB is represented explicitly as values in tables. [ The metadata i.e., table name, column name etc. should also be stored in tables] RULE TWO Guaranteed access Each and every data item (atomic values) in a relational data base is guaranteed to be logically accessible by giving the table name, primary key value and column name. [This rule specifies the need for a primary key to access the data in the data base] RULE THREE Systematic treatment of null values Null values are sup...

How to Use DEBUG

DEBUG This tutorial is made to present an overview of the DEBUG.COM program for the IBM PC. This utility can be extremely useful, when used correctly. It is almost a must for Assembler Language programmers, and can also provide an insight into the operation of the machine at the bit level. It has several nice features, including the ability to display and change any of the registers in the IBMPC, start and stop program execution at any time, change the program,and look at diskettes, sector by sector. DEBUG works at the machine code level, but it does also have the ability to disassemble machine code, and (at dos 2.0), assemble instructions directly into machine code. STARTING DEBUG There are two ways to start DEBUG with a file. Both ways produce the same results, and either can be used. In the Command Line: c:\>debug clock.com where clock.com is your executable program Separate from the command line: c:\>debug -n clock.com -l With either method, you will get the DEBUG prompt of a...

ER Diagrams to Table

REDUCING E-R DIAGRAM TO TABLE - A database which conforms to an E R diagram can be represented by collection of tables .For each entity set and for each relationship set in the database, we will create unique tables, which is assigned the name of the corresponding entity set or relationship sets . Each table has a no. of columns which have unique names. Each row in the table corresponds to an entity or a relationship. REPRESENTATION OF STRONG ENTITY SET -Let E be a strong entity set with descriptive attributes a1, a2....aN . We represent this entity by table called E with N distinct columns, each of which corresponds to one of the attributes of E. REPRESENTATION OF RELATIONSHIP SET - Let R be a relation ship set involving entity set E1,E2....En Let attribute(R) consists of 'm' attributes We can represent this relation ship set by a table called R with m distinct columns, each of which corresponds to one of the attributes in attribute (R) plus the primary key of E1..En. REPRE...

ER Diagrams 2

Roles are indicated in E R diagram by labeling the line that connects diamonds to rectangle. The following figure shows the role indicators MANAGER and the WORKER between the employee entity set and the works for relationship set . A weak entity set is indicated in the E R diagram by doubly outlined box . In the following figure the weak entity set TANSACTION is dependant on the strong entity set ACCOUNT via the relationship set ACC-TRAN Non binary relationship sets can also be represented in ER diagram .Consider the entity set CUSTOMER , ACCOUNT & BRANCH through the relationship CAB. The figure specifies a CUSTOMER may have several account each located in a specific branch of a bank and that an ACCOUNT may belong to several different CUSTOMERS.