You are on page 1of 10

DDL: The SQL sentences that are used to create objects are called DDL or Data Definition Language.

Ex: Create, Alter, Drop. DML : The SQL sentences used to manipulate data within these objects are called DML Data Manipulation Language. Ex: Insert, Update, Delete DBMS means Database Management System which is the management and storing and retrieval of data in a secured way. DBA is the Database Administrator who is a person , an administrator of the database.He performs quite a number of functions. The primary key of a relational table uniquely identifies each record in the table. A foreign key is a field (or fields) that points to the primary key of another table. The purpose of the foreign key is to ensure referential integrity of the data. Candidate keys-> A candidate key is a combination of attributes that can be uniquely used to identify a database record without any extraneous data. Each table may have one or more candidate keys. One of these candidate keys is selected as the table primary key. Alternate keys-> Alternate Key or Unique Key is similar to Primary Key , except it accepts null Values . So that the records can still be entered submitting null values to this attribute.

A superkey is a combination of attributes that can be uniquely used to identify a database record. A table might have many superkeys. Candidate keys are a special subset of superkeys that do not have any external information in them. composite key: it is the group of primary or uniquely identified key which again unique in other table. A view is a virtual table. A view consists of rows and columns just like a table. The difference between a view and a table is that views are definitions built on top of other tables (or views), and do not hold data themselves.

Specialization: An entity set may include sub groupings of entities that are distinct in some way from other entities in the set. For instance, a subset of entities within an entity set may have attributes that are not shared by all the entities in the entity set. The E-R model provides a means for representing these distinctive entity groupings. Consider an entity set person, with attributes name, street, and city. A person may be further classified as one of the following: customer employee Each of these person types is described by a set of attributes that includes all the attributes of entity set person plus possibly additional attributes. For example, customer entities may be described further by the attribute customer-id, whereas employee entities may be described further by the attributes employee-id and salary. The process of designating sub groupings within an entity set is called specialization. The specialization of person allows us to distinguish among persons according to whether they are employees or customers. Generalization: The design process may also proceed in a bottom-up manner, in which multiple entity sets are synthesized into a higher-level entity set on the basis of common features. The database designer may have first identified a customer entity set with the attributes name, street, city, and customer-id, and an employee entity set with the attributes name, street, city, employeeid, and salary. There are similarities between the customer entity set and the employee entity set in the sense that they have several attributes in common. This commonality can be expressed by generalization, which is a containment relationship that exists between a higher-level entity set and one or more lower-level entity sets. In our example, person is the higher-level entity set and customer and employee are lower-level entity sets. Higher- and lower-level entity sets also may be designated by the terms superclass and subclass, respectively. The person entity set is the superclass of the customer and employee subclasses. For all practical purposes, generalization is a simple inversion of specialization. We will apply both processes, in combination, in the course of designing the E-R schema for an enterprise. In terms of the E-R diagram itself, we do not distinguish between specialization and generalization. New levels of entity representation will be distinguished (specialization) or synthesized (generalization) as the design schema comes to express fully the database application and the user requirements of the database. Differences in the two approaches may be characterized by their starting point and overall goal.Generalization proceeds from the recognition that a number of entity sets share some common features (namely, they are described by the same attributes and

participatein the same relationship sets).

Aggregation: Aggregation is an abstraction in which relationship sets (along with their associated entity sets) are treated as higher-level entity sets, and can participate in relationships.

What is a database? a dbms is a complex software system that is used to manage, store and manipulate data and metadata used to describe the data. ----------------------------------------------------------------------------------What is a key? what are different keys in database? a key is nothing but a attribute or group of attributes. They are used to perform some specific operation depending on their operation. The keys are classified into primary key, secondary key, alternative key, super key, candidate key, compound or concatinated or composite key. ----------------------------------------------------------------------------------What is a primary key? primary key: an attribute to identify a record uniquely is considered to be primary key.for eg in the student table student_no is the primary key because it can be used to identify unique record or unique student. ----------------------------------------------------------------------------------What is a secondary key? an attribute used to identify a group of records satisfying a given condition is said to be a secondary key.in the employee table designation is a secondary key because more than one employee can have the same designation. ----------------------------------------------------------------------------------What is a candidate key? register no usually alloted in the exams is also unique for each student in that case for identifying a student uniquely either student_no or register_no can be used.here two different candidates are contesting for primary key post.any of them can be selected as primary key. ----------------------------------------------------------------------------------What is an alternate key? if any one of the candidate keys among the different candidate keys available is selected as primary key then remaining keys are called alternate key. ----------------------------------------------------------------------------------What is a super key? with primary key if any other attribute is added then that combination is called super key in other words,primary key is the minimum possible super key.in the student table student_no+student_name is one the super key. ----------------------------------------------------------------------------------What is a composite key? if the primary key is combination of more than one key then it is calles the composite key.in the table called marks student_no+subject is the composite key. ----------------------------------------------------------------------------------What is a relation? a relation consists of a homogeneous set of tuples. ----------------------------------------------------------------------------------What is a table? it is the representation of a relation having records as rows and attributes as columns. ----------------------------------------------------------------------------------What is an attribute? an object or entity is characterised by its properties or attributes.in relational database systems attributes corresponds to fields.

----------------------------------------------------------------------------------What is a domain? the set of allowable value for the attribute is the domain of the attribute. ----------------------------------------------------------------------------------What is a tuple? tuples are the members of a relation. An entity type having attributes can be represented by set of these attributes called tuple. -----------------------------------------------------------------------------------

What is a selection? an operation that selects only some of the tuples in the relation is known as selection operation.the selection operation yields a horizontal subset of a given relation. ----------------------------------------------------------------------------------What is a join operation? the join operation allows the combination of two relations to form a new relation. ----------------------------------------------------------------------------------What are base operations in relational algebra? union: the term of the relation as performed by combining the tuples from one relation with those a second relation to produce a third relation.duplicate tuples are eliminated.the the relation must be union compatable. difference: the difference of two relations is a third relation having tuples that occur in the first relation but not in the second relation. intersection: the intersection operation selects the common tuples from the two relations. cartesian product: the cartesian product of two relations is the concatination of tuples belonging to the two relations.a new resultant scheme is created consisting of concatination of all possible combination of tuples. ----------------------------------------------------------------------------------What are different dbms facilities? how many types of facilities are provided by a dbms? 1)the data definition facility or data definition language(DDL) 2)the data manipulation facility or data manipulation language(DML) 3)the data control facility(DCL) ----------------------------------------------------------------------------------what is data definition language? data scheme is specified by a set of definitions which are expressed b a special language called a DDL. ----------------------------------------------------------------------------------what is a data directory or data dictionary? the result of compilation of DDL statements is a set of tables which are stored in a special file called data dictionary or data directory.

a data directory is a file that contains metadata i.e data about data.this file is consulted before actual is read or modified in the database system. ----------------------------------------------------------------------------------what is a DML? a DML is a language that enables users to access or manipulate data as organised by the appropriate data mobel.there are basically two types: 1)procedural DML require a user to specify what data is needed and how to get it. 2)non procedural DML require a user to specify what data is needed without spectfying how to get it. ----------------------------------------------------------------------------------what is a query? a query is a statement requesting the retrieval of information. ----------------------------------------------------------------------------------what is a query language? the portion of DML that involves information retrieval is called a query language. ----------------------------------------------------------------------------------what are the advantages of DBMS? reduction of redundancies, integrity, security, conflict resolution, data independence, shared data, data quality enhanced. -----------------------------------------------------------------------------------

what is a SQL? structered query language(sql) originated in 1974 at IBM.SQL was the data definition and manipulation language. ----------------------------------------------------------------------------------what are the features of SQL? portability,client srever architecture,dynamic data definition,multiple views of data,complete data base language,interactive,high level structure and SQL standards. ----------------------------------------------------------------------------------how SQL organises the data? SQL organises data as databases,tables,indexes,views. ----------------------------------------------------------------------------------what is data definition? SQL lets a user todefinethe data structure and relationship at the stored data. ----------------------------------------------------------------------------------what is data retrieval? allows a user or an application program to retrieve the stored data. ----------------------------------------------------------------------------------what is data sharing? data can be shared by more than one user. ----------------------------------------------------------------------------------what are data manipulation operations? remove,append,create,dalate. ----------------------------------------------------------------------------------data definition is done through which statement? data definition in SQL is via the create statement.the statement can be used to create a table,index or view. ----------------------------------------------------------------------------------what is the command to alter the structure of the table? the definition of the existing relation can be altered by using ALTER statement.this statement allows a new column to be added to an existing relation. ----------------------------------------------------------------------------------what is a view? it is an object of SQL.a query can be defined,storedand named.this is called view. ----------------------------------------------------------------------------------what is a first normal form? a relation which contains no mulivalued attributes. ----------------------------------------------------------------------------------what is a second normal form? a relation is in second normal form for if it is first normal form and every nonkey attribute is fully functionally dependent on primary key. ----------------------------------------------------------------------------------what is a third normal form? a relation is in third normal form if for evey functional dependency F :x->y is a D key. -----------------------------------------------------------------------------------

what is BCNF? Boyce-code normal form. ----------------------------------------------------------------------------------what is fifth normal form? a relation which eleminates join dependencies. ----------------------------------------------------------------------------------what is the command to delete a record in the table? DELETE. ----------------------------------------------------------------------------------what is the command to delete a table? DROP TABLE. ----------------------------------------------------------------------------------what is the command to insert a record? INSERT INTO. ----------------------------------------------------------------------------------what is the command to alter table values in SQL? UPDATE. ----------------------------------------------------------------------------------what is time stamping? in the time stamping based method,a serial order is created among the concurrent transactions by assigning to each transaction a unique nondecreasing numbers.you will be allocating fixed time for each transaction. ----------------------------------------------------------------------------------what is data base schema? it is the description of the database i.e its datastructure and not the detail. ----------------------------------------------------------------------------------what is a self jion? joining the table to the same table. ----------------------------------------------------------------------------------what are the different aggrigate functions in SQL? AVG(),MIN(),MAX(),COUNT(),SUM(). ----------------------------------------------------------------------------------what is data integrity? data must satisfy the integrity constrainsts of the system. ----------------------------------------------------------------------------------what is data independence? a database system keeps data seperate from software data structures. ----------------------------------------------------------------------------------what is dead locking? it is the situation where two transactions are waiting for other to release a lock on an item. ----------------------------------------------------------------------------------what is decryption? taking encoded text and converting it into text that you are able to read. ----------------------------------------------------------------------------------what is a disributed database?

a database in which the data is contained with in a number of seperate subsystems usually in different locations. ----------------------------------------------------------------------------------what is an entity? it represents a real world object. --------------------------------------------------------------------------------what is a coceptual data model? a conceptual data model is concerned with the general description of the data base without concern for how the data may be organised. ----------------------------------------------------------------------------------what is two phase locking? it is a most common mechanism that is used to control concurrency in two phases for achiving the serializability.the two phases are Growing and Shrinking. 1)a transaction acqires locks on data items it will need to complete the transaction.this is called growing process.a transaction may obtain lock but may not release any lock. 2)one lock is released no other lock may be acquired.this is called shrinking process.a transaction may release locks but may not obtain any newlocks. ----------------------------------------------------------------------------------what is projection? the projection of a relation is defined as projection of all its tuples over a set of attributes.it yields vertical subset of the relation.the projection operation is used to twicw the number of attributes in the resultant relation or to reorder attributes. ------------------------------------------------------------------------------------what is encryption? encryption is the coding or scrambling of data so that humans can not read them directly. -----------------------------------------------------------------------------------------------------------------what is cardinality? the no of instances of each entity involved in an instance of a relation of a relation ship describe how often an entity can participate in realation ship.(1:1,1:many,many:many) ----------------------------------------------------------------------------------------------------------------------------------------------

You might also like