1、数据库理论及基础面试题数据库理论及基础面试题问题:数据库理论及基础面试题 回答:1.What is database A database is a logically cohere nt collecti on of data with some in here nt meaning, represe nti ng some aspect of real world and which is designed, built and populated with data for a specific purpose.2.What is DBMS It is a collecti on of
2、programs that en ablesuser to create and maintain a database. In other words it is general-purpose software that provides the users with the processes of defi ning, con struct ing and man ipulati ng the database for various applicati ons.3.What is a Database system The database and DBMS software tog
3、ether is called as Database system.4.Adva ntages of DBMS Redu ndancy iscon trolled.U nauthorised access is restricted.Providi ng multipleuser in terfaces.E nforci ng in tegrity con strai nts.Providi ngbackup and recovery.5.Disadva ntage in File Process ing System Dataredundancy incon siste ncy.Diffi
4、cult in access ing data.Dataisolati on .Data in tegrity.C on curre nt access is not possible.Security Problems.6.Describe the three levels of data abstraction The arethree levels of abstracti on:Physical level: The lowest level of abstraction describes how data are stored.Logical level: The next hig
5、her level of abstraction, describes what data are stored in database and what relati on ship among those data.View level: The highest level of abstraction describes only part of entire database.7. Define the in tegrity rules There are two In tegrity rules.Entity Integrity: States that “ Primary key
6、cannot have NULL value ” Referential Integrity: States that “Foreign Key canbe either a NULL value or should be Primary Key value of other relatio n.8.What is exte nsion and intension Exte nsion -It is the nu mber of tuples prese nt in a table at any in sta nee. This is time depe ndent.Intension -It
7、 is a constant value that gives the name, structure of table and the con stra ints laid on it.9.What is System R What are its two major subsystems System R was designed and developed over a period of 1974-79 at IBM San Jose Research Cen ter. It is a prototype and its purpose was to dem on strate tha
8、t it is possible to build a Relatio nal System that can be used in a real life en vir onment to solve real life problems, with performa nee at least comparable to that of exist ing system.Its two subsystems areResearch StorageSystem Relati onal Data System.10.How is the data structure of System R di
9、ffere nt fromthe relatio nal structure Unlike Relati onal systems in System RDoma ins are not supportedE nforceme nt of can didate key uniqueness is optionalEnforcement of entity integrity isoptio nalRefere ntial in tegrity is not en forced11.What is Data Independence Data independencemeans that “th
10、e application is independent of the storagestructure and access strategy of data ” .In other words, The ability to modify the schema defi niti on in one level should notaffect the schema defi niti on in the n ext higher level.Two types of Data In depe nden ce:Physical Data In depe nden ce: Modificat
11、i on in physical level should not affect the logical level.Logical Data In depe nden ce: Modificati on in logical level should affect the view level. NOTE: Logical Data In depe ndence is more difficult to achieve12.What is a view How it is related to data in depe ndenceA view may be thought of as a
12、virtual table, that is, a table that does not really exist in its own right but is in stead derived from one or more un derly ing base table. In other words, there is no stored file that direct represe nts the view in stead a defi niti on of view is stored in data dicti on ary.Growth and restructuri
13、 ng of base tables is not reflected inviews. Thus the view can insulate users from the effects of restructuri ng and growth in the database. Hence acco unts for logical data in depe nden ce.13.What is Data Model A collection of conceptual tools for describ ing data, data relati on ships data sema nt
14、ics and con stra in ts.14.What is E-R model This data model is based on real world that consists of basic objects called entities and of relati on ship among these objects. En tities are described in a database by a set of attributes.15.What is Object Orie nted model This model is based oncollection
15、 of objects. An object contains values stored in in sta nee variables with in the object. An object also contains bodies of code that operate on the object. These bodies of code are called methods. Objects that con ta in same types of values and the same methods are grouped together in to classes.16
16、.What is an En tity It is a thi ng in the real world with anin depe ndent existe nee.17.What is an En tity type It is a eolleeti on (set) of en titiesthat have same attributes.18.What is an En tity set It is a eolleeti on of all en tities of particular en tity type in the database.19.What is an Exte
17、 nsion of en tity type The eolleeti ons of en tities of a partieular en tity type are grouped together into an en tity set.20.What is Weak Entity set An entity set may not have suffieie nt attributes to form a primary key, and its primary key eompromises of its partial key and primary key of its par
18、e nt en tity, the n it is said to be Weak En tity set.21.What is an attribute It is a partieular property, whieh deseribes the en tity.22.What is a Relation Sehema and a Relation A relation Sehema denoted by R(A1, A2,,An) is made up of the relati on n ame R and the list of attributes Ai that it cont
19、ains. Arelatio n is defi ned as a set of tuples. Let r be the relatio n whieh contains set tuples (t1, t2, t3, , tn). Eaeh tuple is an ordered list of n-values t=(v1,v2, , vn).23.What is degree of a Relation It is the number of attribute of its relati on schema.24.What is Relati on ship It is an ass
20、ociati on among two or more en tities.25.What is Relati on ship set The collecti on (or set) ofsimilar relatio nships.26.What is Relati on ship type Relati on ship type defi nes aset of associatio ns or a relati on ship set among a give n set of en tity types.27.What is degree of Relati on ship type
21、 It is the nu mber of en tity type participat ing.25.What is DDL (Data Defin iti on Lan guage) A data base schema is specifies by a set of definitions expressed by a special la nguage called DDL.26.What is VDL (View Definition Language) It specifiesuser views and their mapp ings to the con ceptual s
22、chema.27.What is SDL (Storage Definition Language) This Ian guage is to specify the internal schema. This Ian guage may specify the mapp ing betwee n two schemas.28.What is Data Storage Defin iti on Lan guage The storage structures and access methods used by database system are specified by a set of
23、 defi niti on in a special type of DDL calleddata storage-defi niti on Ian guage.29.What is DML (Data Manipulation Language) This Ianguage that enable user to access or manipulate data as orga ni sed by appropriate data model.Procedural DML or Low level: DML requires a user to specify what data are
24、n eeded and how to get those data.N on-Procedural DML or High level: DML requires a user to specify what data are n eeded without specify ing how to get those data.31.What is DML Compiler It tran slates DML stateme nts ina query Ian guage in to low-level in structi on that the queryevaluatio n engin
25、e can un dersta nd.32.What is Query evaluati on engine It executes low-levelin structi on gen erated by compiler.33.What is DDL In terpreter It in terprets DDL stateme ntsand record them in tables containing metadata.34.What is Record-at-a-time The Low level or ProceduralDML can specify and retrieve
26、 each record from a set of records.This retrieve of a record is said to be Record-at-a-time.35.What is Set-at-a-time or Set-orie nted The High level orNon-procedural DML can specify and retrieve many records in a sin gle DML stateme nt. This retrieve of a record is said to beSet-at-a-time or Set-ori
27、e nted.36.What is Relational Algebra It is procedural query Ianguage. It consists of a set of operations that take one or two relati ons as in put and produce a new relati on.37.What is Relati onal Calculus It is an applied predicate calculus specifically tailored for relati onal databases proposedb
28、y E.F. Codd. E.g. of Ianguages based on it are DSL ALPHA, QUEL.38.How does Tuple-oriented relational calculus differfrom domai n-orie nted relati onal calculusThe tuple-orie ntedcalculus uses a tuple variables i.e., variable whose only permitted values are tuples of that relati on. E.g. QUELThe doma
29、in-oriented calculus has domain variables i.e., variables that range over the un derly ing doma ins in stead of over relati on. E.g. ILL, DEDUCE.39.What is no rmalizati on It is a process of an alys ing thegive n relati on schemas based on their Fun cti onalDepe nden cies (FDs) and primary key to ac
30、hieve the propertiesMini miz ing redundancyMini miz ing in serti on, deleti on and update ano malies.40.What is Fun cti onal Depe ndency A Fun cti onaldepe ndency is deno ted by X Y betwee n two sets of attributesX and Y that are subsets of R specifies a constraint on thepossible tuple that can form
31、 a relation state r of R. The con strai nt is for any two tuples t1 and t2 in r if t1X = t2X then they have t1Y = t2Y. This means the value of X component of a tuple uniquely determines the value ofcomp onent Y.41.Whe n is a fun cti onal depe ndency F said to be mi ni malEvery depe ndency in F has a
32、 sin gle attribute for its right hand side.We cannot replace any depe ndency X A i nF with a depe ndency Y A where Y is a proper subset of X and still have a set of depe ndency that is equivale nt to F.We cannot remove any depe ndency from F and still have set of depe ndency that is equivale nt to F.42.What is Multivalued depe nde ncy Multivalued depe ndency deno ted by X Y specified on relatio n schema R,where X and Y are both subsets of R, specifies the follow ing con stra int on an
copyright@ 2008-2023 冰点文库 网站版权所有
经营许可证编号:鄂ICP备19020893号-2