1) RELATION
A relationship is an association among several entities
eg:- A cusst_Acct relationship associates a customer with each account that she or he has.
Also, a table or an entity set is sometimes called a relation.
In both cases, a relation is a rectangular output consisting of row(tuples or records) and columns(attributes of fields)
2) REDUNDANCY
If same piece of information is stored in database for number of times the database is said to be redundant. We should check our database should not be redundant as it wastes disk space, reduced efficiency of database, require more processing time, and their are chances of inconsistency due to it in our database.
eg:-If we have to tables emp_details (contains details of employee) and Payroll(contains Payment details to employee), than if we include details of employee in payroll table, than it is said to be redundancy as same piece of information is repeated.
3) INCONSISTENCY
Inconsistency is various copies of the same data which is not consistent. Inconsistency occurs due to redundancy, so redundancy should be reduced.
eg:- If we have details of employee stored in emp_details and payroll table than while updating information we should check that both tables are updated or not, if we update the address of one employee in emp_details and same details is not updated in payroll table, than database is said to be in inconsistent state.
4) PROPAGATING UPDATES
Propagating updates ensures that changes made to records/data of one relation or tables, are automatically made to other tables or relations. This process is known as Propagating updates. Where the term "Updates" is used to cover all the operations of insertion, deletion and modification.
We can avoid inconsistency by using propagating update technique.
5)INSTANCES
The collection of information stored in the database at a particular moment in time is called an instances of the database.
6)SCHEMES
The overall design of the database is called the database scheme. Schemes are changed infrequently, if at all.
7)USERS
There are broadly three different types of database system users.
End Users
They are users who interact with the system by invoking one of the application programs. Thus, they are persons who use the information generated by a computer based system. Retrieval is the most common function for this class of user. Generally application user, data entry operators and report generators are come under this category.
Application Programmers
They are who prepare or code the application. Application programs operates on the data in all the usual ways: retrieving information, inserting new information, deleting or changing existing information.
Database Administrator
These are the highly skilled users responsible for the overall performance and maintenance of the database. They design the database schema, create the database, create users, grant and revoke rights from users and manage the database. Their responsibility includes recovery of database in case of failure and tuning the database for optimum efficiency.
D)KEYS concept in DBMS
A Key is a single attribute or combination of two or more attributes of an
entity set that is used to identify one or more instances of the set.
PRIMARY KEY:-A primary key is a field that uniquely identifies each record in a table. As it uniquely identify each entity, it cannot contain null value and duplicate value.
SUPER KEY :- If we add additional attributes to a primary key, the resulting combination would still uniquely identify an instance of the entity set. Such augmented keys are called superkey.
A primary key is therefore a minimum superkey.
CANDIDATE KEY:-A nominee's for primary key field are known as candidate key.
ALTERNATE KEY:-A candidate key that is not the primary key is called an Alternate key.
COMPOSITE KEY:- Creating a primary key are jointly from more than one attribute is known as composite key.
FOREIGN KEY:- Foreign key is a primary key of master table, which is reference in the current table, so it is known as foreign key in the current table. A foreign key is one or more columns whose value must exist in the primary key of another table or same table
Domain
A domain defines the possible values of an attribute. Domain Integrity rules govern these values. In a database system, the domain integrity is defined by:
The datatype and the length
The NULL value acceptance
The allowable values, through techniques like constraints or rules
The default value
For example, if you define the attribute of Age, of an Employee entity, is an integer, the value of every instance of that attribute must always be numeric and an integer. If you also define that this attribute must always be positive, the a negative value is forbidden. The value of this attribute being compulsory indicates that the attribute cannot be NULL. All of these characteristics form the domain integrity of this attribute.
Integrity
Attribute Constraints
There are two major Integrity rules/constraints
Entity Integrity Constraint: States that “Primary key cannot have NULL value”
Referential Integrity Constraint: States that “Foreign Key can be either a NULL value or should be Primary Key value of some relation.
Also
Semantic Integrity Constraint :General restrictions on data and changes to it. Example Salary must be greater than 20000
Domain Integrity Constraint : Each column contains same type of data thus when you select a data type for a particular domain then DBMS will not accept any value of other data type.
Database Constraints
They are constraints on the database that require relations to satisfy certain properties. Relations that satisfy all such constraints are legal relations.
The basic concept in a relational model is that of a relation(table or output of a Query). A relation can be viewed as a table which has the following properties :
1)It is column homogeneous. That is, in any given column of a table all items are of the same kind.
2)Each item is a simple number or a character string. That is, a table must be in the First Normal Form.
3)All the rows of a table are distinct
4)The ordering of rows within a table is immaterial
5)The columns in a table are assigned distinct names and the ordering of these columns is immaterial
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment