Thread: Ordering System in C with CRUD Feature

  1. #1
    Registered User
    Join Date
    Nov 2020
    Posts
    1

    Ordering System in C with CRUD Feature

    Hi, I am a computer science student who just started programming 2 weeks ago. We are given a task to create a simple CRUD program. Our professior wants us to create a program that shows a menu and asks the user to choose to either create, read, update and delete.

    My plan is to create an item ordering system wherein there's a static list of items a user can choose from. They could create orders, read all the existing orders created, update those orders (change the items, no. of items, etc.) and delete then as well. I'm thinking of having atleast 4 tables for products, customers, orders, and order items. Is it possible? I can't find a way to start with it. I really need some help how to do it. I appreciate if someone helps me and suggestions are a lot appreciated. Thank you.
    Last edited by encepalopatyh; 11-06-2020 at 09:15 AM. Reason: Wrong spelling

  2. #2
    Registered User
    Join Date
    May 2012
    Posts
    501
    Quote Originally Posted by encepalopatyh View Post
    Hi, I am a computer science student who just started programming 2 weeks ago. We are given a task to create a simple CRUD program. Our professior wants us to create a program that shows a menu and asks the user to choose to either create, read, update and delete.

    My plan is to create an item ordering system wherein there's a static list of items a user can choose from. They could create orders, read all the existing orders created, update those orders (change the items, no. of items, etc.) and delete then as well. I'm thinking of having atleast 4 tables for products, customers, orders, and order items. Is it possible? I can't find a way to start with it. I really need some help how to do it. I appreciate if someone helps me and suggestions are a lot appreciated. Thank you.

    Since you've only been programming for two weeks, I'd suggest something simple.
    Just declare a struct with no variable-length fields for your "record" type. Store the structs as a flat array in memory.
    Start by writing code to print out the entire table. Then write code to load and save it from disk.
    THen you need to handle create, read, update, delete. You may have been told what interface to use for these. It's clumsy with a command-line interface. With real program you would display a GUI with the fields and a search box, but that's too much for a first exercise.
    I'm the author of MiniBasic: How to write a script interpreter and Basic Algorithms
    Visit my website for lots of associated C programming resources.
    https://github.com/MalcolmMcLean


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. c-program for ordering system
    By primeG in forum C Programming
    Replies: 1
    Last Post: 03-01-2013, 09:28 AM
  2. Is is possible to specify the ordering of a std::map ?
    By manasij7479 in forum C++ Programming
    Replies: 26
    Last Post: 08-24-2011, 01:42 PM
  3. key ordering in map
    By m37h0d in forum C++ Programming
    Replies: 4
    Last Post: 04-07-2008, 08:28 AM

Tags for this Thread