1. Data, information, database and DBMS
Data are raw facts as recorded: the number, date, customer and amount of an invoice. Information is data processed (sorted, filtered, totalled, related) into a form that supports a decision: dues by customer, sales by city.
A database is an organised collection of related data stored together. A database management system (DBMS) is the software that defines the database, stores and retrieves records, enforces rules on them, lets many users share them and protects them. Accounting software is built on a DBMS: vouchers are stored once and ledgers, trial balance and statements are drawn from them.
Terms. A relational database stores data in tables (relations); each column is a field (attribute) with a data type; each row is a record (tuple). A field left empty holds NULL.
| Term | Meaning |
|---|---|
| Data | Raw, unprocessed facts (an invoice amount, a date, a code) |
| Information | Data processed into a meaningful form that supports a decision |
| Database | An organised collection of related data, stored together |
| DBMS | Software to define, store, retrieve, check, share and protect a database |
| Table (relation) | Data about one kind of thing, in rows and columns |
| Field (attribute) | A column: one item of data about each record, with a data type |
| Record (tuple) | A row: all the data about one thing (one customer, one invoice) |
| NULL | No value entered in a field |
| CustCode | CustName | City | CreditLimit | Agent |
|---|---|---|---|---|
| C01 | Anupam Annapurti | Sehore | 100000 | Anshul |
| C02 | Sanchi Provisions | Vidisha | 80000 | NULL |
| C03 | Saptarshi Traders | Begamganj | 120000 | Ruchika |
| C04 | Nirmay Stores | Sironj | 60000 | Anshul |
| C05 | Gaurang Mart | Vidisha | 80000 | NULL |
| C06 | Aarohi Foods | Ganjbasoda | 90000 | Ruchika |
Key terms
- Data
Raw, unprocessed facts.
- Information
Processed, meaningful data that supports a decision.
- DBMS
Software that defines, stores, retrieves, checks, shares and protects a database.
2. Types of DBMS
- Hierarchical: records form a tree; each child record has exactly one parent (region → depot → retailer). Fast top-down access; a record needing two parents must be repeated, and changes to the structure are hard.
- Network: records form a graph linked by pointers; a record may have several owners (a consignment owned by a customer and a truck). Flexible but complex.
- Relational: data is kept in tables linked by common key fields (CustCode in Customers and in Invoices). Simple to understand, flexible queries in SQL; the model used by most accounting software.
- Object-oriented: data is stored as objects that carry both their data and the operations on it; suits complex data such as designs and media.
| Type | Structure | Example at Monal | Strength / weakness |
|---|---|---|---|
| Hierarchical | Tree; each child has one parent | Region → depot → retailer | Fast top-down look-ups; a record with two parents must be repeated |
| Network | Graph; a record may have several owners (pointers) | A consignment linked to both its customer and its truck | Flexible; complex to design and change |
| Relational | Tables linked by common key fields | Customers, Invoices, Receipts linked by CustCode | Simple, flexible queries; the usual choice for accounting software |
| Object-oriented | Objects holding data and the operations on it | A Product object with its own pricing rules | Suits complex data such as drawings or media |
Key terms
- Hierarchical DBMS
Tree structure: one parent per record.
- Network DBMS
Graph structure: a record may have several owners.
- Relational DBMS
Tables linked through key fields.
3. Features and advantages (and limitations)
Features and advantages:
- Controlled redundancy and consistency: each fact stored once.
- Integrity: rules on keys, data types and links stop wrong entries.
- Data independence: programs do not change when storage changes.
- Sharing and concurrency control: many users at once, with record locking.
- Security: passwords, user rights, audit trail.
- Backup and recovery from a failure using backups and a transaction log.
- Query language and reports: information on demand.
Limitations: cost of software, hardware and training; complexity; dependence on one system, which must itself be secured and backed up.
| Feature | What it means at Monal |
|---|---|
| Controlled redundancy and consistency | A retailer’s name and city are stored once, in Customers; invoices carry only the code |
| Integrity rules | No duplicate or blank invoice number; no invoice for a customer who does not exist |
| Data independence | Reports keep working when the storage is moved or reorganised |
| Sharing and concurrency control | Several clerks enter invoices and receipts at the same time without clashes |
| Security | Passwords and user rights: a clerk may enter receipts but not delete customers |
| Backup and recovery | Regular copies and a transaction log restore the books after a failure |
| Query language and reports | Questions such as total dues by city are answered in seconds |
Key terms
- Data redundancy
The same data stored in more than one place.
- Data integrity
Accuracy and consistency of data, protected by rules.
- Data independence
Programs unaffected by changes in how data is stored.
4. Tables, data types and keys
Designing a table: name it after the thing it records; list its fields; give each a data type (text, number, currency, date, Yes/No); choose a primary key.
Keys:
- Primary key: a field whose value is unique and never blank in every record (CustCode, InvNo, AssetNo).
- Candidate key: any field that could be the primary key.
- Composite key: two or more fields unique only together (BoatCode + TripDate).
- Foreign key: a field that refers to the primary key of another table (CustCode in Invoices). It may repeat but must match an existing record.
Integrity rules the DBMS enforces (see the table): it refuses a duplicate or blank primary key, a foreign key with no matching parent, a value of the wrong type, and the deletion of a parent record still referred to.
| Key | Meaning | Monal example |
|---|---|---|
| Primary key | Field (or fields) whose value is unique and never blank in every record | CustCode in Customers; InvNo in Invoices |
| Candidate key | Any field that could serve as the primary key | InvNo; a GST number, if every customer had one |
| Composite key | Two or more fields that are unique only together | BoatCode + TripDate in a trips table |
| Foreign key | Field that refers to the primary key of another table | CustCode in Invoices and in Receipts |
| Data type | Use for | Example field |
|---|---|---|
| Text | Names, codes, addresses (labels, not quantities) | CustCode, CustName |
| Number | Counts and quantities | Quintals, Bags |
| Currency | Money amounts | Amount, CreditLimit |
| Date | Dates (sort and compare correctly) | InvDate, PurchaseDate |
| Yes/No | Two-way answers | Paid, InUse |
| Rule | Checked when | Refusal |
|---|---|---|
| Primary key unique | A record is added or its key changed | Duplicate primary key |
| Primary key not blank | A record is added | Primary key left blank |
| Foreign key matches | A child record is added | No matching record in the parent table |
| Data type | A value is entered | Wrong data type |
| Parent still referred to | A parent record is deleted | Refused while child records refer to it |
| Proposed change | DBMS verdict |
|---|---|
| Invoice 511, 2 May 2026, customer C07, ₹26,000 | Rejected: no matching record in Customers (foreign key) |
| Customer C03, Udaygiri Traders, Vidisha | Rejected: duplicate primary key |
| Invoice with no number, customer C02, ₹9,000 | Rejected: primary key left blank |
| Invoice 511, 2 May 2026, customer C04, ₹26,000 | Accepted |
| Delete customer C04 (invoice 506 is still on file) | Refused: 1 record(s) in Invoices refer to C04 |
Key terms
- Primary key
Unique, never blank; identifies each record.
- Foreign key
Refers to the primary key of another table.
- Composite key
Several fields that are unique only together.
5. Relationships, forms, reports and indexing
Relationships: one-to-one (an employee and one salary account), one-to-many (a customer and its invoices: the primary key of the one side goes into the many side as a foreign key), many-to-many (invoices and products: a linking table holds both keys).
Database objects:
- Form: screen for entering, viewing and editing one record at a time, with checks and drop-down lists.
- Query: a question asked of the data (in SQL).
- Report: formatted output of many records, grouped and sorted with subtotals and totals, for printing; may combine related tables (sales by city: invoices linked to customers).
- Index: a sorted list of a field’s values with pointers to records; speeds up searching and sorting, costs space and slows saving a little.
| Relationship | Meaning | Accounting example | How it is built |
|---|---|---|---|
| One-to-one | Each record matches at most one record on the other side | An employee and his single salary bank account | Same key in both tables, or a unique foreign key |
| One-to-many | One record matches many on the other side | A customer and his invoices | Primary key of the "one" side placed as a foreign key on the "many" side |
| Many-to-many | Many records match many | Invoices and the products on them | A third (linking) table holding both keys |
| Object | Purpose | Monal example |
|---|---|---|
| Table | Stores the records | Customers, Invoices, Receipts |
| Form | Screen to enter, view and edit one record at a time, with checks and drop-down lists | Invoice entry screen with a list of customer codes |
| Query | Question asked of the data | Invoices above ₹40,000 in April |
| Report | Formatted, grouped output with totals, for printing or sharing | Sales by city with a grand total |
| Index | Sorted list of a field’s values with pointers to the records | Index on CustCode in Invoices |
| CustCode (sorted) | Points to invoices |
|---|---|
| C01 | 501, 504 |
| C02 | 502, 507 |
| C03 | 503, 510 |
| C04 | 506 |
| C05 | 505, 509 |
| C06 | 508 |
| City | Sales (₹) |
|---|---|
| Sehore | 78,000 |
| Vidisha | 2,16,000 |
| Begamganj | 79,000 |
| Sironj | 22,000 |
| Ganjbasoda | 18,000 |
| Total | 4,13,000 |
Key terms
- One-to-many
One record on one side matches many on the other.
- Report
Formatted, grouped output with totals.
- Index
Sorted list of a field’s values pointing to the records.
6. SQL basics: SELECT, WHERE, AND, OR, UPDATE, DELETE
SELECT field1, field2 FROM table WHERE condition;shows the chosen fields of the records that meet the condition;SELECT *shows all fields. SELECT never changes data.- AND: both conditions true (narrows). OR: at least one true (widens). AND is applied before OR; use brackets to change the order.
UPDATE table SET field = value WHERE condition;changes values; the new value may use the old one (CreditLimit = CreditLimit + 20000).DELETE FROM table WHERE condition;removes records; the table design remains.- Without WHERE, UPDATE and DELETE act on every record. Run the same WHERE with SELECT first.
Text and dates are written in single quotes ('Vidisha', '2026-04-15'); numbers are not. Dates written year-month-day compare correctly.
| Statement / clause | What it does | Form |
|---|---|---|
| SELECT … FROM | Shows chosen fields (or * for all) of a table | SELECT InvNo, Amount FROM Invoices; |
| WHERE | Keeps only the records that meet a condition | WHERE Amount > 40000 |
| Comparison | Equal, not equal, less, greater, at most, at least | = <> < > <= >= |
| AND | Both conditions must be true | City = 'Vidisha' AND Amount > 40000 |
| OR | At least one condition must be true | CustCode = 'C02' OR CustCode = 'C05' |
| UPDATE … SET … WHERE | Changes values in the records that meet the condition | UPDATE Customers SET CreditLimit = 90000 WHERE CustCode = 'C04'; |
| DELETE FROM … WHERE | Removes the records that meet the condition | DELETE FROM Invoices WHERE InvNo = 506; |
| Operator | Meaning | Example |
|---|---|---|
| = | Equal to | City = 'Vidisha' |
| <> | Not equal to | Mode <> 'Cash' |
| < > | Less than, greater than | Amount > 40000 |
| <= >= | At most, at least | InvDate >= '2026-04-15' |
| IS NULL | No value entered | Agent IS NULL |
| InvNo | CustCode | Amount |
|---|---|---|
| 501 | C01 | 48000 |
| 503 | C03 | 52000 |
| 505 | C05 | 75000 |
| 507 | C02 | 41000 |
| 509 | C05 | 64000 |
| Query | Invoices returned | Rows |
|---|---|---|
SELECT InvNo FROM Invoices WHERE Amount > 40000 AND InvDate >= '2026-04-15'; | 505, 507, 509 | 3 |
SELECT InvNo FROM Invoices WHERE CustCode = 'C02' OR CustCode = 'C05'; | 502, 505, 507, 509 | 4 |
| Query | Read as | Returns |
|---|---|---|
SELECT InvNo FROM Invoices WHERE CustCode = 'C01' OR CustCode = 'C03' AND Amount > 30000; | C01, OR (C03 AND over 30000) | 501, 503, 504 |
SELECT InvNo FROM Invoices WHERE (CustCode = 'C01' OR CustCode = 'C03') AND Amount > 30000; | (C01 OR C03) AND over 30000 | 501, 503 |
| Statement (run in order) | Result |
|---|---|
UPDATE Customers SET CreditLimit = CreditLimit + 20000 WHERE City = 'Vidisha'; | 2 records changed (C02 now ₹1,00,000, C05 now ₹1,00,000) |
DELETE FROM Customers WHERE CustCode = 'C04'; | Refused: 1 record(s) in Invoices refer to C04 |
DELETE FROM Invoices WHERE InvNo = 506; | 1 record deleted |
DELETE FROM Customers WHERE CustCode = 'C04'; | 1 record deleted |
Key terms
- WHERE clause
The condition a record must meet.
- AND / OR
Both conditions / at least one condition.
- UPDATE
Statement that changes stored values.
7. Aggregate functions: COUNT, SUM, AVG, MAX, MIN
Aggregate functions return one value from many records: COUNT(*) (number of records), COUNT(field) (records with a value in that field), SUM(field), AVG(field), MAX(field), MIN(field).
- WHERE is applied first, then the function:
SELECT SUM(Amount) FROM Invoices WHERE CustCode = 'C05';gives the sales to one customer. - NULLs are skipped by every function except COUNT(*); AVG divides by the number of values present.
- Several functions may be used together:
SELECT MAX(Balance), MIN(Balance) FROM Debtors;.
Accounting uses: total sales or dues, number of invoices, average invoice, highest balance, smallest receipt.
| Query | Gives | Result |
|---|---|---|
SELECT COUNT(*) FROM Invoices; | Number of invoices | 10 |
SELECT SUM(Amount) FROM Invoices; | Total credit sales | 413000 |
SELECT AVG(Amount) FROM Invoices; | Average invoice | 41300 |
SELECT MAX(Amount) FROM Invoices; | Largest invoice | 75000 |
SELECT MIN(Amount) FROM Invoices; | Smallest invoice | 18000 |
SELECT SUM(Amount) FROM Invoices WHERE CustCode = 'C05'; | Sales to Gaurang Mart | 139000 |
| Query on Customers | Result | Why |
|---|---|---|
SELECT COUNT(*) FROM Customers; | 6 | Counts every record |
SELECT COUNT(Agent) FROM Customers; | 4 | Skips the two NULL agents (C02, C05) |
Key terms
- Aggregate function
A function that summarises many records into one value.
- COUNT(*)
Counts every record, blanks included.
8. DBMS in business: debtors and creditors, bank reconciliation, asset accounting
Accounting information. Each source document is entered once (through a form) into linked tables; ledgers, the trial balance, statements and management reports are drawn from them, so they always agree.
Debtors and creditors. Customers and Suppliers are master tables; invoices, bills, receipts and payments carry the party code as a foreign key. A report gives each balance (opening + invoices − receipts), dues past their date, and parties over their credit limit.
Bank reconciliation. The bank statement is imported as a table and matched with the bank column of the cash book on the reference. Unmatched items are the reconciling items: cheques issued but not presented and bank-only credits are added to the cash book balance; cheques deposited but not credited and bank-only debits are subtracted, giving the pass book balance.
Asset accounting. A fixed asset register table holds each asset’s number, category, date, cost, rate and location; the DBMS computes depreciation and written-down values and totals them by category.
| CustCode | Customer | Invoices | Receipts | Balance | Credit limit | Within limit? |
|---|---|---|---|---|---|---|
| C01 | Anupam Annapurti | 78,000 | 48,000 | 30,000 | 1,00,000 | Yes |
| C02 | Sanchi Provisions | 77,000 | 36,000 | 41,000 | 80,000 | Yes |
| C03 | Saptarshi Traders | 79,000 | 52,000 | 27,000 | 1,20,000 | Yes |
| C04 | Nirmay Stores | 22,000 | 0 | 22,000 | 60,000 | Yes |
| C05 | Gaurang Mart | 1,39,000 | 50,000 | 89,000 | 80,000 | No (over by 9,000) |
| C06 | Aarohi Foods | 18,000 | 0 | 18,000 | 90,000 | Yes |
| Ref | In cash book | In bank statement | Status |
|---|---|---|---|
| CH201 | 60,000 | 60,000 | Matched |
| CH202 | 25,000 | 25,000 | Matched |
| DP01 | 48,000 | 48,000 | Matched |
| DP02 | 36,000 | 36,000 | Matched |
| CH203 | 34,000 | — | Cheque not yet presented |
| DP03 | 50,000 | 50,000 | Matched |
| CH204 | 15,000 | — | Cheque not yet presented |
| DP04 | 52,000 | — | Deposit not yet credited |
| INT4 | — | 1,500 | Credited by bank only |
| CHG4 | — | 700 | Debited by bank only |
| INS4 | — | 4,800 | Debited by bank only |
| Particulars | ₹ | ₹ |
|---|---|---|
| Balance as per cash book (bank column), 30 April 2026 | 1,72,000 | |
| Add: cheques issued but not yet presented: CH203 34,000; CH204 15,000 | +49,000 | |
| Add: credited by the bank, not yet in the cash book: INT4 1,500 | +1,500 | |
| Less: cheques deposited but not yet credited: DP04 52,000 | −52,000 | |
| Less: debited by the bank, not yet in the cash book: CHG4 700; INS4 4,800 | −5,500 | |
| Balance as per pass book (bank statement), 30 April 2026 | 1,65,000 |
| AssetNo | Asset | Category | Cost | Rate % | Depreciation 2026-27 | WDV 31-3-2027 |
|---|---|---|---|---|---|---|
| A01 | Flour mill | Machinery | 2,40,000 | 10 | 24,000 | 1,44,000 |
| A02 | Pulse grader | Machinery | 2,60,000 | 10 | 26,000 | 1,82,000 |
| A03 | Office furniture | Furniture | 50,000 | 10 | 5,000 | 25,000 |
| A04 | Delivery truck | Vehicle | 6,00,000 | 15 | 90,000 | 4,20,000 |
| A05 | Weighbridge | Machinery | 1,20,000 | 10 | 12,000 | 84,000 |
| A06 | Billing computer | Computer | 80,000 | 20 | 16,000 | 48,000 |
| Total | 13,50,000 | 1,73,000 | 9,03,000 |
Key terms
- Asset register
Table of fixed assets with cost, date, rate and depreciation.
- Reconciling item
An entry found in only one of the cash book and the bank statement.
- Credit limit
The most a customer may owe at a time.
Exam tips
Common mistakes
- Calling a code field "number" because it holds digits: codes are text.
- Saying a foreign key must be unique (only the primary key must be).
- Forgetting that a primary key can never be blank.
- Mixing AND and OR without brackets, or forgetting that AND comes first.
- Writing text or dates without quotes, or numbers with them.
- Using UPDATE or DELETE without WHERE.
- Counting a NULL in COUNT(field) or dividing AVG by all the rows when some are NULL.
- In a bank reconciliation, adding a deposit not yet credited instead of subtracting it.
How marks are usually split
- 1 mark: a term, a key, a function, or the result of one simple query.
- 2 marks: a distinction (data and information, form and report), or one query with its result.
- 3 marks: three features or types, three key verdicts, or the outputs of three queries.
- 5 marks: a design (fields, types, keys and relationship), or queries with outputs, or a debtors report or bank reconciliation from tables.
Figures and firms in SOYL practice are imagined; software is described generically.