Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request Database abstraction and MySQL instance #7

Open
4 tasks
iankuan opened this issue Jul 27, 2017 · 7 comments
Open
4 tasks

Request Database abstraction and MySQL instance #7

iankuan opened this issue Jul 27, 2017 · 7 comments

Comments

@iankuan
Copy link
Member

iankuan commented Jul 27, 2017

Hello all,

Recently, we need a Database module to store the timestamps of attendance. We call for help to impl it with extensibility. However, it should contain database interface and MySQL instance basically in Python3. Please follow mail mechanism(previous work). PR would be accepted with these three components:

  1. Database interface
  2. (Either) MySQL instance
  3. (Either) SQLite instance
  4. Unittest

Note that if you work on it, please notify us, thanks.

@haha8x
Copy link

haha8x commented Jul 27, 2017

I think this should be a basic database to store student info

-- Database: `uscc_attendee`

-- Table structure for table `attendee`
CREATE TABLE `attendee` (
  `id` int(11) NOT NULL,
  `student_id` int(11) NOT NULL,
  `checkin_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `checkout_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Table structure for table `student`
CREATE TABLE `student` (
  `id` int(11) NOT NULL,
  `name` varchar(250) NOT NULL,
  `card_id` varchar(250) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE ADD CONSTRAINT attendee_studentid_fk FOREIGN KEY(student_id) REFERENCES student(id);

@iankuan
Copy link
Member Author

iankuan commented Jul 27, 2017

@haha8x Please tweak it with markdown format. There 's a useful and powerful markdown note editor, HackMD. Here is an overview and features,HackMD - feature. It would be helpful for you. Moreover, I would check it after you tweak it.

@iankuan
Copy link
Member Author

iankuan commented Jul 27, 2017

@haha8x Please check this, HackMD - feature - code block, and tweak it with sql=. Moreover, could you please just update the original comment rather than new one. It would make this issue too tedious to follow.

@iankuan
Copy link
Member Author

iankuan commented Oct 1, 2017

Pardon! Are you still working on it? If so, please notify me or I would assign this work to others.

@amikai
Copy link
Member

amikai commented Oct 7, 2017

My seafood, @yenwu. I suppose we should add a feature/database branch, and let someone else can PR to this branch.

@iankuan
Copy link
Member Author

iankuan commented Oct 7, 2017

@as23041248 , why we need that? Others could just PR to dev/master, are them?

Moreover, I create feature/serialization because this is the wanted feature in hurry and could collaborate with me. So why you suppose that?

By the way, you are already a committer, and you have full accessibility to this repository. If you hesitate to what you're going to do, you could ask me for suggestions. Just like this.

@iankuan
Copy link
Member Author

iankuan commented Oct 10, 2017

Update this issue. I found that SQLite is a good choice for us to omit complicated installation and have a lightweight database immediately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants