...1. How we can define the structure of the relation ,deleting relations and relating schemas ? a) DML(Data Manipulation Langauge) b) DDL(Data Definition Langauge) c) Probe d) Relational Schema Answer:b 2. Which one of the following delivers the capability to query material from the database and to insert tuples into, delete tuples from, and modify tuples in the database ? a) DML(Data Manipulation Langauge) b) DDL(Data Definition Langauge) c) Probe d) Relational Schema Answer:a 3. What command is used to create a table? a) DML b) DDL c) View d) Integrity constraint Answer:b 4. Which command is used to select the data’s from the table ? a) DML b) DDL c) View d) Integrity constraint Answer:a 5. The rudimentary data type char(n) is a _____ length character string and varchar(n) is _____ length character....
Words: 281 - Pages: 2
...Chapter 2 - Database System Concepts and Architecture Data Models, Schemas and Instances A characteristic of the database approach is that it provides a level of data abstraction, by hiding details of data storage that are not needed by most users. A data model is a collection of concepts that can be used to describe the structure of a database. The model provides the necessary means to achieve the abstraction. The structure of a database is characterized by data types, relationships, and constraints that hold for the data. Models also include a set of operations for specifying retrievals and updates. Data models are changing to include concepts to specify the behaviour of the database application. This allows designers to specify a set of user defined operations that are allowed. Categories of Data Models Data models can be categorized in multiple ways. • High level/conceptual data models – provide concepts close to the way users perceive the data. • Physical data models – provide concepts that describe the details of how data is stored in the computer. These concepts are generally meant for the specialist, and not the end user. • Representational data models – provide concepts that may be understood by the end user but not far removed from the way data is organized. Conceptual data models use concepts such as entities, attributes and relationships. • Entity – represents a real world object or concept • Attribute - represents...
Words: 2961 - Pages: 12
...Chapter 2 - Database System Concepts and Architecture Data Models, Schemas and Instances A characteristic of the database approach is that it provides a level of data abstraction, by hiding details of data storage that are not needed by most users. A data model is a collection of concepts that can be used to describe the structure of a database. The model provides the necessary means to achieve the abstraction. The structure of a database is characterized by data types, relationships, and constraints that hold for the data. Models also include a set of operations for specifying retrievals and updates. Data models are changing to include concepts to specify the behaviour of the database application. This allows designers to specify a set of user defined operations that are allowed. Categories of Data Models Data models can be categorized in multiple ways. • High level/conceptual data models – provide concepts close to the way users perceive the data. • Physical data models – provide concepts that describe the details of how data is stored in the computer. These concepts are generally meant for the specialist, and not the end user. • Representational data models – provide concepts that may be understood by the end user but not far removed from the way data is organized. Conceptual data models use concepts such as entities, attributes and relationships. • Entity – represents a real world object or concept • Attribute - represents...
Words: 2961 - Pages: 12
...Chapter 1 Databases and Database Users Review Questions 1.1. Define the following terms: data, database, DBMS, database system, database catalog, program-data independence, user view, DBA, end user, canned transaction, deductive database system, persistent object, meta-data, and transaction-processing application. Answer: Data: Facts that can be recorded and that have implicit meaning Database: Collection of related data DBMS: Collection of programs that enables users to create and maintain a database (Software) Database system: database and DBMS software together Database catalog: structure of data files is stored Program-data independence: property that properties that DBMS access programs do not require such changes in most cases. The structure of data files is stored in the DBMS catalog separately from the access programs. User view: DBA: assisted by a staff that carries out these functions End user: the people whose jobs require access to the database for querying, updating, and generating reports; the database primarily exists for their use Canned transaction: that have been carefully programmed and tested Deductive database system: database systems provide capabilities for defining deduction rules for inferencing new information from the stored database facts Persistent object: Meta-data: The information stored in the catalog Transaction-processing application: 1.2. What four main types of actions involve databases? Briefly discuss each. Answer:...
Words: 1273 - Pages: 6
...types, relationships, user operations, and constraints. External Schema -- External Schema describes the part of the database that a particular user group is interested in and hides the rest of the database from that user group. Data Independence – the capacity to change the schema at one level of a database system without having to change the schema at the next higher level. DDL – DDL or Data Definition Language is used to specify conceptual and internal schemas for the database and mappings. DML – DML or Data Manipulation Language as the name suggests is used for typical manipulations include retrieval, insertion, deletion, and modification of the data. SDL –The storage structures and access methods used by database system are specified by a set of definition in a special type of DDL called data storage-definition language. VDL – VDL or View Definition Language is used to specify user views and their mappings to the conceptual schema. Query Language -- a high-level DML used in a stand-alone...
Words: 778 - Pages: 4
...2.3 Answer: Major difference is the frequency of they get change. Database schema changes very rare when a new object has been added or deleted or any master detail /lookup relation has been setup between objects. However, database set gets updated very frequently on update on every DML on the record of any objects in system. 1. The skeleton of the database, their association with the different objects will be defined by Database Schema. Basically, it is the overall design describing the database to give the logical view of the objects present in application and the relationship among them. 2. At a particular time, database state defines the content of the database. 2.5 Answer: As the name suggest, physical data is independent of logical data. Anything...
Words: 646 - Pages: 3
...Multiple Choice Identify the choice that best completes the statement or answers the question. __A__ 1. All of the following would cause a trigger to fire, except ____. a. | BEFORE | c. | DELETE | b. | INSERT | d. | UPDATE | __A__ 2. Which of the following indicates that the trigger is fired only once, regardless of the number of rows affected by the DML statement? a. | Statement level | c. | DML level | b. | Event level | d. | Row level | __B__ 3. Which of the following statements is correct? a. | If multiple triggers exist on a table, the order in which the triggers will be fired can be set. | b. | A BEFORE statement level trigger will fire before a BEFORE row level trigger. | c. | If you have two statement level triggers, the order in which they are fired is dependent on the order in which they were written. | d. | Only one trigger can be constructed per table. | __D__ 4. Row level options are only applicable for ____ events. a. | CREATE | c. | DECLARE | b. | INSERT | d. | UPDATE and DELETE | __A__ 5. The default timing of a trigger is ____. a. | statement level | c. | row level | b. | system level | d. | header level | __A__ 6. Which of the following events will cause the trigger to fire? AFTER UPDATE OF orderplaced ON bb_basket a. | INSERT | c. | DELETE | b. | UPDATE | d. | AFTER | __D__ 7. CURSOR basketitem_curIS SELECT idproduct, quantity, option1 FROM bb_basketitem WHERE idbasket = :NEW.idbasket; ...
Words: 1769 - Pages: 8
...written answers in groups and may ask you to present your group’s collective responses to the class. Due to some particular circumstances, if you are not able to attend a tutorial session, make sure to: a) let your tutor know asap the reason(s) you missed the class by email; b) submit your answers to the tutorial questions by its due date electronically using Moodle. Before attempting the following tutorial activities, you need to learn this week’s lecture slides. To gain more understanding of the topics covered in this week review Chapters: Chapters: 8.5, 7.2.7, 3.2.2 and 3.3 of your textbook. ASSESSABLE TASKS OF THE WEEK Objectives: * Review DDL and DML statements * Investigate views, indexes, data integrity and data security Activities: 1. Discuss the difference between DDL and DML. DDL Data Definition Language (DDL) statements are used to define the database structure or schema. Some examples: * CREATE – to create objects in the database * ALTER –...
Words: 889 - Pages: 4
...SQL Fundamentals The Structured Query Language (SQL) comprises one of the fundamental building blocks of modern database architecture. SQL defines the methods used to create and manipulate relational databases on all major platforms. At first glance, the language may seem intimidating and complex but it's really not all that bad. In a series of articles over the next few weeks we'll explore the inner workings of SQL together. By the time we're through, you'll have the fundamental knowledge you need to go out there and start working with databases! This week, our first article in the SQL series provides an introduction to the basic concepts behind SQL and we'll take a brief look at some of the main commands used to create and modify databases. Throughout this article, please keep our goal in mind: we're trying to get the "big picture" of SQL -- not a mastery of the individual commands. We'll provide a few examples for illustrative purposes and explain the theory behind them, but don't feel frustrated if you can't write your own SQL commands after reading this article. We'll cover each of the major commands in detail in future weekly installments. If you'd like a reminder in your e-mail inbox each week when the next article is posted, please take a moment and subscribe to our newsletter. By the way, the correct pronunciation of SQL is a contentious issue within the database community. In their SQL standard, the American National Standards Institute declared that the official...
Words: 1859 - Pages: 8
...1. Explain DML, DDL, DCL and TCL statements with examples? Answer: DDL Data Definition Language (DDL) statements are used to define the database structure or schema. Some examples: * CREATE - to create objects in the database * ALTER - alters the structure of the database * DROP - delete objects from the database * TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed * COMMENT - add comments to the data dictionary * RENAME - rename an object DML Data Manipulation Language (DML) statements are used for managing data within schema objects. Some examples: * SELECT - retrieve data from the a database * INSERT - insert data into a table * UPDATE - updates existing data within a table * DELETE - deletes all records from a table, the space for the records remain * MERGE - UPSERT operation (insert or update) * CALL - call a PL/SQL or Java subprogram * EXPLAIN PLAN - explain access path to data * LOCK TABLE - control concurrency DCL DCL is abbreviation of Data Control Language. It is used to create roles, permissions, and referential integrity as well it is used to control access to database by securing it. * GRANT - gives user's access privileges to database * REVOKE - withdraw access privileges given with the GRANT command TCL Transaction Control (TCL) statements are used to manage the changes made by DML statements. It allows...
Words: 2240 - Pages: 9
...Review Questions: Chapter 1 1.1. Define the following terms: data, database, DBMS, database system, database catalog, program-data independence, user view, DBA, end user, canned transaction, deductive database system, persistent object, meta-data, and transaction-processing application. • Data – known facts that can be recorded and that have implicit meaning. • Database – a collection of related data with an implicit meaning. • DBMS – a collection of programs that enables users to create and maintain a database • Database system – not only contains the database itself bit also a complete definition or description of the database structure and constrains. • Database catalog – the information about the database structure is stored in the Database Catalog which contains the structure of each file, the type and storage format of each data item, and various constrains of the data. • Program-Data Independence – DBMS access programs do not require changes in all programs due to the change in the structure of a file because the structure of data files is stored in the DBMS catalog separately from the access programs. • User View – a database typically has many users, and each of whom may require a different perspective or view of the database. A view may be a subset of the database or it may contain virtual data the is derived from the database files but is not explicitly stored. • DBA – a database administrator (short form DBA) is a person...
Words: 2493 - Pages: 10
...' • View of Data • Data Models Chapter 1: Introduction $ $ • Purpose of Database Systems • Data Definition Language • Data Manipulation Language • Transaction Management & ' & • Storage Management • Database Administrator • Database Users • Overall System Structure 1.1 Silberschatz, Korth and Sudarshan c 1997 Database Systems Concepts Database Management System (DBMS) • Collection of interrelated data • Set of programs to access the data • DBMS contains information about a particular enterprise • DBMS provides an environment that it both convenient and efficient to use Database Systems Concepts 1.2 Silberschatz, Korth and Sudarshan c 1997 ' & ' & Purpose of Database Systems $ $ Database management systems were developed to handle the following difficulties of typical file-processing systems supported by conventional operating systems. • Data redundancy and inconsistency • Difficulty in accessing data • Data isolation – multiple files and formats • Integrity problems • Atomicity of updates • Concurrent access by multiple users • Security problems Database Systems Concepts 1.3 Silberschatz, Korth and Sudarshan c 1997 View of Data An architecture for a database system view level view 1 view 2 … view n logical level physical level Database Systems Concepts 1.4 Silberschatz, Korth and Sudarshan c 1997 ' & ' & Levels of Abstraction $ $ • Physical level: describes how a record (e.g., customer) is stored. • Logical level: describes data stored...
Words: 1023 - Pages: 5
...Jonathan Hindman PT2520 Chapter 4 10/18/13 Cardinality: Cardinality refers to the number of allowed instances of a relationship. In the usual cardinality of one to many, for instance, each record on the one side can have zero to any number of records on the many side. Cardinality can be more specific however. Each patron at a library can have only 20 items checked out at once. This has a cardinality of 0 to 20. Composite keys: In database design, a compound key is a key that consists of 2 or more attributes that uniquely identify an entity occurrence. Each attribute that makes up the compound key is a simple key in its own right. Crow’s feet notation: A type of notation for entity relationships in entity relation diagrams that depicts the many side of a relationship with a three-pronged end called a “crows foot.” This type of notation provides more information about the cardinality of a relationship than the arrow notation for relationships. Domain entities: Those database entities that relate directly to the business problem under consideration. Entity relation diagrams: A diagram that shows entities, their attributes, and the relationships among them. Linking entity: An entity used to resolve a many-to-many relationship into two one-to-many relationships. Logical entity: The design of a database without regard to the physical implementation of the database. Lookup entity: An entity used to store lookup values such as state names or zip codes. Maximum cardinality:...
Words: 1477 - Pages: 6
...ACCT 402 Check Figures from Publisher – 15th Edition (assigned problems in bold) Chapter 4. Job Costing 4-16 Job costing a c e g h k l n o p q r s u Process costing b d f i j m t 4-17 1. B 180% A 190% 2. A $127,000 N $124,000 3. N underallocated $145,000 4-18 1. B $50 A $47 2a. L $188,926 M $221,720 2b. L $186,166 M $218,600 4-19 1. $24 per mh 2. $4,080,000 3. overallocated $30,000 4-20 1. M $36 A 180% 2. $99,000 3. M $120,000 under; A $(260,000) over 4-21 1. 260% 2. 400% 3. TC $32,400; BP $36,000 4-22 1. 2Q $74; 3Q $99 2. 2Q $84; 3Q $84. 3. 2Q $109.20; 3Q $109.20 4-23 1. $22 per dlh 2. dr. WIP Control $4,664,000 (this would be the amount for the year) 3. cr. COGS $14,000 4-24 (Note: skip part 1) 2. (11) dr. MOH Allocated $2,080; cr. MOH Control $1,950; cr. COGS $130 4-25 8. dr. MOH Allocated $215,800; cr. MOH Control $202,900; cr. COGS $12,900 4-26 Skip part 1. 3. dr. MOH Allocated $93; dr. CGS $1; cr. MOH Control $94 4. $115 GM 4-27 1. M1 $561,000 M2 $419,000 2. $510 3. dr. FG Control $561,000 cr. WIP Control $561,000 4. $419,000 dr. balance 4-28 1. (a) $53; $48 (b) $53; $45 (c) $60; $45 3. (a) $18,685 (b) $18,130 (c) $19,425 4-29 1a. D: $25 I: $14 1b. D: $25 I: $15 1c. D: $26 I: $15 3a. $3,081 2b. $3,160 2c. $3,239 4-30 1. 50% 2. underallocated $3,000 ...
Words: 8482 - Pages: 34
...I bought a book from crossword; he packed the book and added two bookmarks into my pack. A thought came to my mind. Why do I need a bookmark? I can easily memorize the page number and the next time resume from the same page when I resume reading, or read them all over to reach to the point where I stopped reading. But not all have a blessed memory; moreover, there are better things to remember, my grandpa would rather bookmark and rely on it to help him resume reading. It’s a kind of simple index, isn’t it? This article focuses on how MS SQL Server uses indexes to read and write data. Data is arranged by SQL Server in the form of extents and pages. Each extent is of size 64 KB, having 8 pages of 8KB sizes. An extent may have data from multiple or same table, but each page holds data from a single table only. Logically, data is stored in record sets in the table. We have fields (columns) identifying the type of data contained in each of the record sets. A table is nothing but a collection of record sets; by default, rows are stored in the form of heaps unless a clustered index has been defined on the table, in which case, record sets are sorted and stored on the clustered index. The heaps structure is a simple arrangement where the inserted record is stored in the next available space on the table page. Heaps seem a great option when the motive is simply storing data, but when data retrieval steps in, this option back fires. An index acts as a fire fighter in this scenario. Indexes...
Words: 433 - Pages: 2