...table or a field. N-tuple – in mathematics, an ordered set of n elements called its components or coordinates. Relation Schema – It is representation of database highlighting relationships that we have created. Relation State – set of tuples that have the same attributes. Degree of a relation – number of attributes n of its relation schema. Relational Database Schema – Tables, columns and relationships that make up a relational database. Relational database state – is a union of all the individual relation states, whenever the database is changed a new state arise. 3.2 Why are tuples in a relation not ordered? - A Relation is defined as a set of tuples. Mathematically, elements of a set have no order among them: tuples in a relation do not have any particular order. In other words, a relation is not sensitive to the ordering of tuples. Tuple ordering is not part of a relation definition because a relation attempts to represent facts at a logical or abstract level. 3.3 Why are duplicate tuples not allowed in a relation? - Duplicate tuples are not allowed in a relation because it violates the specifications of the relational integrity constraints, particularly the key constraint which states that no two tuples can have the same values for their attributes at any relation state of a database. 3.4 What is the difference between a key and a superkey? - Superkey is any subset of attributes that uniquely identifies the tuples of a relation. This subset need not...
Words: 943 - Pages: 4
...Relational Database- Semester 2 ------------------------------------------------- Assignment 1 Due date: 5 August 2014 Question 1 a. Why are tuples in a relation not ordered? b. Why are duplicate tuples not allowed in a relation? c. What is different between a key and a superkey d. Why do we designate one of candidate keys of a relation to be the primary key? e. Discuss the characteristics of relations that make them different from ordinary tables and files. f. Discuss the various reasons that lead to the occurrence of NULL values in relations g. Discuss the entity integrity and referential constraints. Why is each considered important? h. Define foreign key. What is this concept used for? i. What is a transaction? How does it differ from an update operation [3 marks each] Question 2 2.1 Specify the following queries in SQL on the database schema of figure 1 a. Retrieve the names of all senior students majority in CS (computer science). b. Retrieve the names of all courses taught by Professor King in 2013 and 2014 c. For each section taught by Professor King, retrieve the course number, semester, year, and number of students who took the section. d. Retrieve the name and transcript of each senior student (class=4) majority in CS. A transcript includes course name, course number, credit hours, semester, year, and grade for each course completed by the student. [4 marks each] 2.2 Write SQL update...
Words: 313 - Pages: 2
...2: 8. What is the difference between procedural and nonprocedural DMLs? 9. What is the difference between a database schema and a database state? 10. If you were designing a Web-based system to make airline reservations and to sell airline tickets, which DBMS Architecture would you choose from Section 2.5? Why? Why would the other architectures not be a good choice? 11. What is the difference between procedural and nonprocedural DMLs? 12. Discuss the different types of user-friendly interfaces and the types of users who typically use each. 13. Consider Figure 2.1. In addition to constraints relating the values of columns in one table to columns in another table, there are also constraints that impose restrictions on values in a column or a combination of columns within a table. One such constraint forces that a column or a group of columns must be unique across all rows in the table. For example, in the STUDENT table, the StudentNumber column must be unique (to prevent two different students from having the same StudentNumber). Identify the column or the group of columns in the other tables that must be unique across all rows in the table? Chapter 3: 14. Why are tuples in...
Words: 513 - Pages: 3
...We take furniture company of Try Star international .It has two branches one in Lahore and other in Karachi. Old system were centralized and we design a new system of database which is distributed i.e. the database of the Lahore campus is in Lahore and the database of karachi campus is in Karachi i.e a collection of multiple ,logically interrelated databases distributed over a computer network. DDBMS: A distributed database management system is defined as a software system that permits the management of the ddbs and makes the distribution transparent to the users. Why we use distributed database? In centralized system, all queries are handled by the main server and all loads are on the server but in distributed system, a separate server for each site exists. • In centralized system If centre goes down, everything is down. So you need to have offsite redundant servers. • In centralized system there is the single point of failure that can bring an entire company down in the event of a server crash but in distributed system if one server crashed down we get information from main server. Distributed Database design: The design of a distributed computer system involves making decisions on the placement of data and programs across the sites of the computer network .in the case of distributed DBMSs,the distribution of application invoves two things: • The distribution of the distributed DBMS softwares • the distribution of thr application of...
Words: 2137 - Pages: 9
...Fundamentals of Database Systems Preface....................................................................................................................................................12 Contents of This Edition.....................................................................................................................13 Guidelines for Using This Book.........................................................................................................14 Acknowledgments ..............................................................................................................................15 Contents of This Edition.........................................................................................................................17 Guidelines for Using This Book.............................................................................................................19 Acknowledgments ..................................................................................................................................21 About the Authors ..................................................................................................................................22 Part 1: Basic Concepts............................................................................................................................23 Chapter 1: Databases and Database Users..........................................................................................23 ...
Words: 229471 - Pages: 918
...AC14/AT11 Database Management Systems TYPICAL QUESTIONS & ANSWERS PART -I OBJECTIVE TYPE QUESTIONS Each Question carries 2 marks. Choosethe correct or the best alternative in the following: Q.1 Which of the following relational algebra operations do not require the participating tables to be union-compatible? (A) Union (B) Intersection (C) Difference (D) Join Ans: (D) Q.2 Which of the following is not a property of transactions? (A) Atomicity (B) Concurrency (C) Isolation (D) Durability Ans: (B) Q.3 Relational Algebra does not have (A) Selection operator. (C) Aggregation operators. (B) Projection operator. (D) Division operator. Ans: (C ) Q.4 Checkpoints are a part of (A) Recovery measures. (C ) Concurrency measures. (B) Security measures. (D) Authorization measures. Ans: (A) Q.5 Tree structures are used to store data in (A) Network model. (B) Relational model. (C) Hierarchical model. (D) File based system. Ans: (C ) Q.6 The language that requires a user to specify the data to be retrieved without specifying exactly how to get it is (A) Procedural DML. (B) Non-Procedural DML. (C) Procedural DDL. (D) Non-Procedural DDL. Ans: (B) Q.7 Precedence graphs help to find a 1 AC14/AT11 Database Management Systems (A) Serializable schedule. (C) Deadlock free schedule. (B) Recoverable schedule. (D) Cascadeless schedule. Ans: (A) Q.8 The rule that a value of a foreign key must appear...
Words: 20217 - Pages: 81
...textbook used by that class is Database Management Systems, 3rd Edition by Raghu Ramakrishnan and Johannes Gehkre; some of the material below may be specific to that text. This document is provided in the hope that it is useful, but I can’t provide any assurance that any information it contains is in any way accurate or complete. Corrections or additions are welcome. Distribution Terms: This document is released into the public domain. Query Evaluation External Sorting • A DBMS frequently needs to sort data (e.g. for a merge-join, ORDER BY, GROUP BY, etc.) that exceeds the amount of main memory available. In order to do this, an external sort algorithm is used. • 2-Way External Merge Sort: – In the first pass, each page of the input relation is read into memory, sorted, and written out to disk. This creates N runs of 1 page each. – In each successive pass, each run is read into memory and merged with another run, then written out to disk. Since the number of runs is halved with every pass, this requires log2 N passes. Since an additional initial pass is required and each pass requires 2N I/Os, the total cost is: 2N( log2 N + 1) – Thus, we can see that the number of passes we need to make is critical to the overall performance of the sort (since in each pass, we read and write the entire file). Furthermore, the number of runs that we start with also determines the number of passes that are required. – This algorithm only requires 3 buffers: 2 input buffers (for the merging passes)...
Words: 12979 - Pages: 52
...of a database. The database is a structure that houses one or more tables and metadata. The metadata are data about data. Metadata include the data (attribute) characteristics and the relationships between the entity sets. 2. What does a database expert mean when (s)he observes that a database displays both entity integrity and referential integrity? Entity integrity describes a condition in which all tuples within a table are uniquely identified by their primary key. The unique value requirement prohibits a null primary key value, because nulls are not unique. Referential integrity describes a condition in which a foreign key value has a match in the corresponding table or in which the foreign key value is null. The null foreign key value makes it possible not to have a corresponding value, but the matching requirement on values that are not null makes it impossible to have an invalid value. 3. Why are entity integrity and referential integrity important in a database? Entity integrity is important, because it means that a proper search for an existing tuple (row) will always be successful. And the failure to find a match on a row search will always mean that the row for which the search is conducted does not exist in that table. Referential integrity is important, because its existence ensures that it will be impossible to assign a non-existing foreign key value to a table. For example, the referential integrity enforcement in a SALESREP is assigned to CUSTOMER...
Words: 2215 - Pages: 9
...Information Systems Lecture Notes G´bor Bodn´r a a RISC-Linz, Johannes Kepler University, A-4040 Linz, Austria email: Gabor.Bodnar@risc.uni-linz.ac.at www: http://www.risc.uni-linz.ac.at/people/gbodnar January 23, 2005 2 Contents 0 Introduction 0.1 Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0.2 Information Sources . . . . . . . . . . . . . . . . . . . . . . . . . 1 Data Modeling 1.1 Introduction . . . . . . . . . . . . . . . . . 1.2 The Entity-Relationship Model . . . . . . 1.2.1 Entities, Attributes, Relationships 1.2.2 Classification of Relationships . . . 1.2.3 Keys . . . . . . . . . . . . . . . . . 1.2.4 Entity-Relationship Diagrams . . . 1.2.5 Entity-Relationship Design . . . . 1.2.6 Exercises . . . . . . . . . . . . . . 1.3 The Relational Model . . . . . . . . . . . 1.3.1 Relational Structure . . . . . . . . 1.3.2 Relational Algebra . . . . . . . . . 1.3.3 Functional Dependencies . . . . . . 1.3.4 Normal forms . . . . . . . . . . . . 1.3.5 Indexing and Hashing . . . . . . . 1.3.6 Exercises . . . . . . . . . . . . . . 1.4 SQL . . . . . . . . . . . . . . . . . . . . . 1.4.1 Data Definition . . . . . . . . . . . 1.4.2 Simple Queries . . . . . . . . . . . 1.4.3 Database Modification . . . . . . . 1.4.4 Views and Joins . . . . . . . . . . 1.4.5 Embedded SQL . . . . . . . . . . . 1.4.6 Exercises . . . . . . . . . . . . . . 2 Information Systems On-Line 2.1 On-Line Databases . . . . . . . . . . . 2.1.1 Security Control . . . . . . . . 2.1.2 Transaction...
Words: 18634 - Pages: 75
...one: True False Question 2 Which term describes each two-dimensional table or file in the relational model? Select one: a. Database b. Relational Database c. Data Warehouse d. None of the Above Question 3 If a relation has more than one candidate key the one chosen to represent the relation is called the: Select one: a. primary key b. foreign key c. alternate key d. candidate key Question 4 The first hierarchial DBMS was ____ and was released by IBM in 1968? Select one: a. IMS (Information Management System) b. SQL c. DB2 d. Oracle Question 5 What is a field that uniquely describes each record? Select one: a. Composite Key b. Foreign Key c. Primary Key d. None of the Above Question 6 The number of attributes in a relation is known as: Select one: a. The relation degree b. The relation cardinality c. The relation domain d. The relation schema Question 7 Which of the following is NOT an information model? Select one: a. pureXML model b. Relational Model c. Hierarchial model d. Network model Question 8 The network model (CODASYL) was released in what year? Select one: a. 1979 b. 1969 c. 1964 d. 1980 Question 9 A formal description of all the database relations and all of the relationships existing between them is called a database schema. Select one: True False Question 10 A unique KEY field Select one: a. Is a special field that each database has to have. b. Is a special...
Words: 4344 - Pages: 18
... update, and report traffic and natural growth in the types of stored information. Existing noninferential, formatted data systems provide users with tree-structured files or slightly more general network models of the data. In Section 1, inadequacies of these models are discussed. A model based on n-ary relations, a normal form for data base relations, and the concept of a universal data sublanguage are introduced. In Section 2, certain operations on relations (other than logical inference) are discussed and applied to the problems of redundancy and consistency in the user’s model. KEY WORDS AND PHRASES: data bank, data base, data structure, data organization, hierarchies of data, networks of data, relations, derivability, redundancy, consistency, composition, join, retrieval language, predicate calculus, security, data integrity CR CATEGORIES: 3.70, 3.73, 3.75, 4.20, 4.22, 4.29 1. Relational Model and Normal Form 1 .I. INTR~xJ~TI~N This paper is concerned with the application of elementary relation theory to systems which provide shared access to large banks of formatted data. Except for a paper by Childs [l], the principal application of relations to data systems...
Words: 9945 - Pages: 40
...Python for Informatics Exploring Information Version 0.0.8-d2 Charles Severance Copyright © 2009-2013 Charles Severance. Printing history: October 2013: Major revision to Chapters 13 and 14 to switch to JSON and use OAuth. Added new chapter on Visualization. September 2013: Published book on Amazon CreateSpace January 2010: Published book using the University of Michigan Espresso Book machine. December 2009: Major revision to chapters 2-10 from Think Python: How to Think Like a Computer Scientist and writing chapters 1 and 11-15 to produce Python for Informatics: Exploring Information June 2008: Major revision, changed title to Think Python: How to Think Like a Computer Scientist. August 2007: Major revision, changed title to How to Think Like a (Python) Programmer. April 2002: First edition of How to Think Like a Computer Scientist. This work is licensed under a Creative Common Attribution-NonCommercial-ShareAlike 3.0 Unported License. This license is available at creativecommons.org/licenses/ by-nc-sa/3.0/. You can see what the author considers commercial and non-commercial uses of this material as well as license exemptions in the Appendix titled Copyright Detail. A The LTEX source for the Think Python: How to Think Like a Computer Scientist version of this book is available from http://www.thinkpython.com. Preface Python for Informatics: Remixing an Open Book It is quite natural for academics who are continuously told to “publish or perish” ...
Words: 68401 - Pages: 274
...Distributed Systems: Concepts and Design Edition 3 By George Coulouris, Jean Dollimore and Tim Kindberg Addison-Wesley, ©Pearson Education 2001 Chapter 1 1.1 Exercise Solutions Give five types of hardware resource and five types of data or software resource that can usefully be shared. Give examples of their sharing as it occurs in distributed systems. 1.1 Ans. Hardware: CPU: compute server (executes processor-intensive applications for clients), remote object server (executes methods on behalf of clients), worm program (shares cpu capacity of desktop machine with the local user). Most other servers, such as file servers, do some computation for their clients, hence their cpu is a shared resource. memory: cache server (holds recently-accessed web pages in its RAM, for faster access by other local computers) disk: file server, virtual disk server (see Chapter 8), video on demand server (see Chapter 15). screen: Network window systems, such as X-11, allow processes in remote computers to update the content of windows. printer: networked printers accept print jobs from many computers. managing them with a queuing system. network capacity: packet transmission enables many simultaneous communication channels (streams of data) to be transmitted on the same circuits. Data/software: web page: web servers enable multiple clients to share read-only page content (usually stored in a file, but sometimes generated on-the-fly). file: file servers enable multiple clients to share...
Words: 38975 - Pages: 156
...Author Richard Serfozo Basic Probability Problems May 20, 2003 Springer Berlin Heidelberg NewYork Hong Kong London Milan Paris Tokyo 1 Elementary Concepts The subject of applied probability appears to be rather fragmented because problems involving randomness arise in many different contexts and they often require the use of ad hoc mathematical techniques. The subject has more underlying structure, however, than meets the eye. The set of notes before you describes this structure via a number of basic probability problems. These notes are intended as a “supplement” to an introductory probability textbook that describes the methodology and notation. The basic problems presented here should be viewed as a follow-on to elementary, motivating examples. A reader just learning probability should aim at mastering these basic problems in the sense of being able to recognize them in various settings and solve them by carry out the required analysis and computations. A good way to study each problem is to create and solve one or more examples of the problem analogous to those below. By creating new examples this way, one will actually own a piece of the subject as well as understanding it. 1.1 Probabilities of Events A description of events and their probabilities requires a framework for representing events of interest in terms of a random experiment. Our textbook tells us how to describe such an experiment in terms of a set of outcomes Ω called a sample space, and to...
Words: 10002 - Pages: 41
... In other words, middleware aims at improving the single-system view that a distributed system should have. 2. Q: Explain what is meant by (distribution) transparency, and give examples of different types of transparency. A: Distribution transparency is the phenomenon by which distribution aspects in a system are hidden from users and applications. Examples include access transparency, location transparency, migration transparency, relocation transparency, replication transparency, concurrency transparency, failure transparency, and persistence transparency. 3. Q: Why is it sometimes so hard to hide the occurrence and recovery from failures in a distributed system? A: It is generally impossible to detect whether a server is actually down, or that it is simply slow in responding. Consequently, a system may have to report that a service is not available, although, in fact, the server is just slow. 4. Q: Why is it not always a good idea to aim at implementing the highest degree of transparency possible? A: Aiming at the highest degree of transparency may lead to a considerable loss of performance that users are not willing to accept. 5. Q: What is an open distributed system and what benefits does openness provide? A: An open distributed system offers services according to clearly defined rules. An open system is capable of easily interoperating with other open systems but also allows applications to be easily ported between different implementations of the same system. ...
Words: 19883 - Pages: 80